Title: [233948] branches/safari-606-branch/Source/WebInspectorUI
Revision
233948
Author
[email protected]
Date
2018-07-18 18:59:19 -0700 (Wed, 18 Jul 2018)

Log Message

Cherry-pick r233861. rdar://problem/42345123

    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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233861 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-606-branch/Source/WebInspectorUI/ChangeLog (233947 => 233948)


--- branches/safari-606-branch/Source/WebInspectorUI/ChangeLog	2018-07-19 01:59:16 UTC (rev 233947)
+++ branches/safari-606-branch/Source/WebInspectorUI/ChangeLog	2018-07-19 01:59:19 UTC (rev 233948)
@@ -1,3 +1,36 @@
+2018-07-18  Babak Shafiei  <[email protected]>
+
+        Cherry-pick r233861. rdar://problem/42345123
+
+    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):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-07-16  Matt Baker  <[email protected]>
+
+            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):
+
 2018-07-16  Nikita Vasilyev  <[email protected]>
 
         Web Inspector: Dark Mode: Console filter field buttons should be darker

Modified: branches/safari-606-branch/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js (233947 => 233948)


--- branches/safari-606-branch/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js	2018-07-19 01:59:16 UTC (rev 233947)
+++ branches/safari-606-branch/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js	2018-07-19 01:59:19 UTC (rev 233948)
@@ -1413,8 +1413,7 @@
 
     textEditorExecutionHighlightRange(currentPosition, callback)
     {
-        let {line, ch} = this.currentPositionToOriginalPosition(currentPosition);
-        let position = new WI.SourceCodePosition(line, ch);
+        let position = this.currentPositionToOriginalPosition(currentPosition);
 
         let script = this._getAssociatedScript(position);
         if (!script) {
@@ -1491,7 +1490,7 @@
                 return aLength - bLength;
             });
 
-            let characterAtPosition = this.getTextInRange(currentPosition, {line: currentPosition.line, ch: currentPosition.ch + 1});
+            let characterAtPosition = this.getTextInRange(currentPosition, currentPosition.offsetColumn(1));
             let characterAtPositionIsDotOrBracket = characterAtPosition === "." || characterAtPosition === "[";
 
             for (let i = 0; i < nodes.length; ++i) {

Modified: branches/safari-606-branch/Source/WebInspectorUI/UserInterface/Views/TextEditor.js (233947 => 233948)


--- branches/safari-606-branch/Source/WebInspectorUI/UserInterface/Views/TextEditor.js	2018-07-19 01:59:16 UTC (rev 233947)
+++ branches/safari-606-branch/Source/WebInspectorUI/UserInterface/Views/TextEditor.js	2018-07-19 01:59:19 UTC (rev 233948)
@@ -784,8 +784,8 @@
         if (!this._formatterSourceMap)
             return position;
 
-        let location = this._formatterSourceMap.formattedToOriginal(position.line, position.ch);
-        return {line: location.lineNumber, ch: location.columnNumber};
+        let location = this._formatterSourceMap.formattedToOriginal(position.lineNumber, position.columnNumber);
+        return new WI.SourceCodePosition(location.lineNumber, location.columnNumber);
     }
 
     currentPositionToCurrentOffset(position)
@@ -1323,7 +1323,7 @@
         if (isNaN(this._executionLineNumber))
             return;
 
-        let currentPosition = {line: this._executionLineNumber, ch: this._executionColumnNumber};
+        let currentPosition = new WI.SourceCodePosition(this._executionLineNumber, this._executionColumnNumber);
 
         this._delegate.textEditorExecutionHighlightRange(currentPosition, (range) => {
             let start, end;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to