diff options
Diffstat (limited to 'WebCore/inspector/front-end/TextViewer.js')
-rw-r--r-- | WebCore/inspector/front-end/TextViewer.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/WebCore/inspector/front-end/TextViewer.js b/WebCore/inspector/front-end/TextViewer.js index 13b2836..9ad5e49 100644 --- a/WebCore/inspector/front-end/TextViewer.js +++ b/WebCore/inspector/front-end/TextViewer.js @@ -117,16 +117,22 @@ WebInspector.TextViewer.prototype = { highlightLine: function(lineNumber) { - if (typeof this._highlightedLine === "number") { - var chunk = this._makeLineAChunk(this._highlightedLine); - chunk.removeDecoration("webkit-highlighted-line"); - } + this.clearLineHighlight(); this._highlightedLine = lineNumber; this.revealLine(lineNumber); var chunk = this._makeLineAChunk(lineNumber); chunk.addDecoration("webkit-highlighted-line"); }, + clearLineHighlight: function() + { + if (typeof this._highlightedLine === "number") { + var chunk = this._makeLineAChunk(this._highlightedLine); + chunk.removeDecoration("webkit-highlighted-line"); + delete this._highlightedLine; + } + }, + freeCachedElements: function() { this._cachedSpans = []; |