Changeset 233861 in webkit


Ignore:
Timestamp:
Jul 16, 2018 1:06:52 PM (6 years ago)
Author:
Matt Baker
Message:

Web Inspector: Fix execution highlighting after r233820
https://bugs.webkit.org/show_bug.cgi?id=187703
<rdar://problem/42246167>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.currentPositionToOriginalPosition):
(WI.TextEditor.prototype._updateExecutionRangeHighlight):

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r233858 r233861  
     12018-07-16  Matt Baker  <mattbaker@apple.com>
     2
     3        Web Inspector: Fix execution highlighting after r233820
     4        https://bugs.webkit.org/show_bug.cgi?id=187703
     5        <rdar://problem/42246167>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * UserInterface/Views/SourceCodeTextEditor.js:
     10        (WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
     11        * UserInterface/Views/TextEditor.js:
     12        (WI.TextEditor.prototype.currentPositionToOriginalPosition):
     13        (WI.TextEditor.prototype._updateExecutionRangeHighlight):
     14
    1152018-07-16  Aaron Chu  <aaron_chu@apple.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js

    r233817 r233861  
    14141414    textEditorExecutionHighlightRange(currentPosition, callback)
    14151415    {
    1416         let {line, ch} = this.currentPositionToOriginalPosition(currentPosition);
    1417         let position = new WI.SourceCodePosition(line, ch);
     1416        let position = this.currentPositionToOriginalPosition(currentPosition);
    14181417
    14191418        let script = this._getAssociatedScript(position);
     
    14921491            });
    14931492
    1494             let characterAtPosition = this.getTextInRange(currentPosition, {line: currentPosition.line, ch: currentPosition.ch + 1});
     1493            let characterAtPosition = this.getTextInRange(currentPosition, currentPosition.offsetColumn(1));
    14951494            let characterAtPositionIsDotOrBracket = characterAtPosition === "." || characterAtPosition === "[";
    14961495
  • trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js

    r233820 r233861  
    785785            return position;
    786786
    787         let location = this._formatterSourceMap.formattedToOriginal(position.line, position.ch);
    788         return {line: location.lineNumber, ch: location.columnNumber};
     787        let location = this._formatterSourceMap.formattedToOriginal(position.lineNumber, position.columnNumber);
     788        return new WI.SourceCodePosition(location.lineNumber, location.columnNumber);
    789789    }
    790790
     
    13241324            return;
    13251325
    1326         let currentPosition = {line: this._executionLineNumber, ch: this._executionColumnNumber};
     1326        let currentPosition = new WI.SourceCodePosition(this._executionLineNumber, this._executionColumnNumber);
    13271327
    13281328        this._delegate.textEditorExecutionHighlightRange(currentPosition, (range) => {
Note: See TracChangeset for help on using the changeset viewer.