Changeset 207227 in webkit
- Timestamp:
- Oct 12, 2016 11:43:19 AM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r207165 r207227 1 2016-10-12 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Whole program sometimes highlighted instead of just first statement 4 https://bugs.webkit.org/show_bug.cgi?id=163300 5 <rdar://problem/28723162> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Views/SourceCodeTextEditor.js: 10 (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange): 11 Avoid highlighting the entire program by skipping a Program type Node. 12 13 * UserInterface/Views/TextEditor.js: 14 (WebInspector.TextEditor.prototype.setExecutionLineAndColumn): 15 Avoid unnecessary work before content has loaded. 16 17 (WebInspector.TextEditor.prototype.currentPositionToOriginalOffset): 18 Avoid unnecessary indirection to get the CodeMirror editor. 19 1 20 2016-10-11 Joseph Pecoraro <pecoraro@apple.com> 2 21 -
trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js
r206655 r207227 1236 1236 1237 1237 // Find a node starting at this offset. 1238 // Avoid highlighting the entire program if this is the start of the first statement. 1238 1239 for (let node of nodes) { 1239 1240 let startOffset = node.range[0]; 1240 if (startOffset === offset ) {1241 if (startOffset === offset && node.type !== WebInspector.ScriptSyntaxTree.NodeType.Program) { 1241 1242 callback(convertRangeOffsetsToSourceCodeOffsets(node.range)); 1242 1243 return; -
trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js
r207165 r207227 337 337 this._executionColumnNumber = columnNumber; 338 338 339 this._updateExecutionLine(); 340 this._updateExecutionRangeHighlight(); 339 if (!this._initialStringNotSet) { 340 this._updateExecutionLine(); 341 this._updateExecutionRangeHighlight(); 342 } 341 343 342 344 // Still dispatch the event even if the number didn't change. The execution state still … … 704 706 offset = this._formatterSourceMap.formattedToOriginalOffset(position.line, position.ch); 705 707 else 706 offset = this. tokenTrackingController._codeMirror.getDoc().indexFromPos(position);708 offset = this._codeMirror.getDoc().indexFromPos(position); 707 709 708 710 return offset;
Note: See TracChangeset
for help on using the changeset viewer.