Web Inspector: fix highlight bug in DTE.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Jan 2013 11:54:00 +0000 (11:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Jan 2013 11:54:00 +0000 (11:54 +0000)
commit5be752b08f0f0151631c9a1797d0c1f7bd125b69
tree417e85968f1b310a55fbacf46941602edde332d4
parent42f50aeaf381a81615e37fb478359700d010037f
Web Inspector: fix highlight bug in DTE.
https://bugs.webkit.org/show_bug.cgi?id=107433

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

Source/WebCore:

Do not re-create |state.ranges| array when it already contains highlight.

Test: inpector/editor/highlighter-chunk-limit.txt

* inspector/front-end/TextEditorHighlighter.js:
(WebInspector.TextEditorHighlighter.prototype._highlightLines):

LayoutTests:

Add a layout test to cover highlight bug specific situation.

* inspector/editor/highlighter-chunk-limit-expected.txt: Added.
* inspector/editor/highlighter-chunk-limit.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/editor/highlighter-chunk-limit-expected.txt [new file with mode: 0644]
LayoutTests/inspector/editor/highlighter-chunk-limit.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/TextEditorHighlighter.js