Changeset 82824 in webkit
- Timestamp:
- Apr 4, 2011 5:40:12 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r82822 r82824 1 2011-04-04 Andrey Adaikin <aandrey@google.com> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: Highlighted search tokens would not be shown on long lines in the text viewer 6 https://bugs.webkit.org/show_bug.cgi?id=57749 7 8 * inspector/front-end/TextViewer.js: 9 (WebInspector.TextEditorMainPanel.prototype.markAndRevealRange): 10 (WebInspector.TextEditorMainPanel.prototype._paintLine): 11 1 12 2011-04-04 Alexander Pavlov <apavlov@chromium.org> 2 13 -
trunk/Source/WebCore/inspector/front-end/TextViewer.js
r82808 r82824 775 775 if (this._rangeToMark) { 776 776 var markedLine = this._rangeToMark.startLine; 777 this._rangeToMark = null; 778 this._paintLines(markedLine, markedLine + 1); 777 delete this._rangeToMark; 778 // Remove the marked region immediately. 779 if (!this._dirtyLines) { 780 this.beginDomUpdates(); 781 var chunk = this.chunkForLine(markedLine); 782 var wasExpanded = chunk.expanded; 783 chunk.expanded = false; 784 chunk.updateCollapsedLineRow(); 785 chunk.expanded = wasExpanded; 786 this.endDomUpdates(); 787 } else 788 this._paintLines(markedLine, markedLine + 1); 779 789 } 780 790 … … 782 792 this._rangeToMark = range; 783 793 this.revealLine(range.startLine); 784 this._paintLines(range.startLine, range.startLine + 1); 794 var chunk = this.makeLineAChunk(range.startLine); 795 this._paintLine(chunk.element); 785 796 if (this._markedRangeElement) 786 797 this._markedRangeElement.scrollIntoViewIfNeeded(); … … 964 975 { 965 976 var lineNumber = lineRow.lineNumber; 966 if (this._dirtyLines || this._scheduledPaintLines || this._paintLinesOperationsCredit < 0) {977 if (this._dirtyLines) { 967 978 this._schedulePaintLines(lineNumber, lineNumber + 1); 968 979 return; … … 971 982 this.beginDomUpdates(); 972 983 try { 984 if (this._scheduledPaintLines || this._paintLinesOperationsCredit < 0) { 985 this._schedulePaintLines(lineNumber, lineNumber + 1); 986 return; 987 } 988 973 989 var highlight = this._textModel.getAttribute(lineNumber, "highlight"); 974 if (!highlight) { 975 if (this._rangeToMark && this._rangeToMark.startLine === lineNumber) 976 this._markedRangeElement = highlightSearchResult(lineRow, this._rangeToMark.startColumn, this._rangeToMark.endColumn - this._rangeToMark.startColumn); 990 if (!highlight) 977 991 return; 978 }979 992 980 993 lineRow.removeChildren(); … … 1011 1024 --this._paintLinesOperationsCredit; 1012 1025 } 1013 if (this._rangeToMark && this._rangeToMark.startLine === lineNumber)1014 this._markedRangeElement = highlightSearchResult(lineRow, this._rangeToMark.startColumn, this._rangeToMark.endColumn - this._rangeToMark.startColumn);1015 1026 if (lineRow.decorationsElement) 1016 1027 lineRow.appendChild(lineRow.decorationsElement); 1017 1028 } finally { 1029 if (this._rangeToMark && this._rangeToMark.startLine === lineNumber) 1030 this._markedRangeElement = highlightSearchResult(lineRow, this._rangeToMark.startColumn, this._rangeToMark.endColumn - this._rangeToMark.startColumn); 1018 1031 this.endDomUpdates(); 1019 1032 }
Note: See TracChangeset
for help on using the changeset viewer.