Commit af160b53 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

Web Inspector: [CodeMirror] CodeMirrorTextEditor.highlightRange has bugs

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

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-27
Reviewed by Vsevolod Vlasov.

No new tests.

- Append additional "<class>-start" class to the first highlighted span
and "<class>-end" class to the last highlighted span to provide a way
to set up a css classes with borders.
- Increment end column of the markup range to simulate inclusive range.

* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor.prototype.highlightRange):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0dcf07b4
2013-03-27 Andrey Lushnikov <lushnikov@chromium.org>
Web Inspector: [CodeMirror] CodeMirrorTextEditor.highlightRange has bugs
https://bugs.webkit.org/show_bug.cgi?id=113348
Reviewed by Vsevolod Vlasov.
No new tests.
- Append additional "<class>-start" class to the first highlighted span
and "<class>-end" class to the last highlighted span to provide a way
to set up a css classes with borders.
- Increment end column of the markup range to simulate inclusive range.
* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor.prototype.highlightRange):
2013-03-27 Andrey Lushnikov <lushnikov@chromium.org>
 
Web Inspector: Add isClean/markClean method pair to textEditor.js
......@@ -159,7 +159,12 @@ WebInspector.CodeMirrorTextEditor.prototype = {
highlightRange: function(range, cssClass)
{
var pos = this._toPos(range);
return this._codeMirror.markText(pos.start, pos.end, { className: cssClass });
++pos.end.ch;
return this._codeMirror.markText(pos.start, pos.end, {
className: cssClass,
startStyle: cssClass + "-start",
endStyle: cssClass + "-end"
});
},
/**
......
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