Web Inspector: expand more chunks in DTE

https://bugs.webkit.org/show_bug.cgi?id=107698

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-01-24
Reviewed by Pavel Feldman.

Source/WebCore:

Mock DefaultTextEditor visible area as if it is slightly larger than real one and
do all chunk expandings and repaints based on this new area.

No new tests: no change in behaviour.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorChunkedPanel.prototype.findVisibleChunks):

LayoutTests:

Correct text expectation as we change amount of expanded chunks.

* inspector/editor/text-editor-selection-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4b0d8a23
2013-01-24 Andrey Lushnikov <lushnikov@chromium.org>
Web Inspector: expand more chunks in DTE
https://bugs.webkit.org/show_bug.cgi?id=107698
Reviewed by Pavel Feldman.
Correct text expectation as we change amount of expanded chunks.
* inspector/editor/text-editor-selection-expected.txt:
2013-01-24 Ádám Kallai <kadam@inf.u-szeged.hu>
[Qt] Unreviewed gardening. Added platform specific expectation after r140174.
......@@ -2,7 +2,7 @@ This test checks the text editor selection calculation.
Chunk model
Chunk [0] 0:9 (expanded)
Chunk [1] 9:18 (collapsed)
Chunk [1] 9:18 (expanded)
Chunk [2] 18:27 (collapsed)
Chunk [3] 27:34 (collapsed)
......
2013-01-24 Andrey Lushnikov <lushnikov@chromium.org>
Web Inspector: expand more chunks in DTE
https://bugs.webkit.org/show_bug.cgi?id=107698
Reviewed by Pavel Feldman.
Mock DefaultTextEditor visible area as if it is slightly larger than real one and
do all chunk expandings and repaints based on this new area.
No new tests: no change in behaviour.
* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorChunkedPanel.prototype.findVisibleChunks):
2013-01-24 Victor Jaquez <vjaquez@igalia.com>
[GStreamer] Implement setPreservesPitch()
......@@ -894,6 +894,10 @@ WebInspector.TextEditorChunkedPanel.prototype = {
*/
findVisibleChunks: function(visibleFrom, visibleTo)
{
var span = (visibleTo - visibleFrom) * 0.5;
visibleFrom = Math.max(visibleFrom - span, 0);
visibleTo = visibleTo + span;
var from = this._findFirstVisibleChunkNumber(visibleFrom);
for (var to = from + 1; to < this._textChunks.length; ++to) {
if (this._textChunks[to].offsetTop >= visibleTo)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment