Title: [241225] trunk/Source/WebInspectorUI
Revision
241225
Author
[email protected]
Date
2019-02-08 17:30:16 -0800 (Fri, 08 Feb 2019)

Log Message

Web Inspector: Debugger Popover should work with value in template string `${identifier}`
https://bugs.webkit.org/show_bug.cgi?id=194459
<rdar://problem/47932564>

Patch by Joseph Pecoraro <[email protected]> on 2019-02-08
Reviewed by Devin Rousso.

* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WI.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
When walking backwards to get the full _expression_ we were walking outside
of the interpolation group `outside ${inside}`. Stop walking backwards once
we cross the boundary.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (241224 => 241225)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-02-09 01:29:22 UTC (rev 241224)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-02-09 01:30:16 UTC (rev 241225)
@@ -1,5 +1,19 @@
 2019-02-08  Joseph Pecoraro  <[email protected]>
 
+        Web Inspector: Debugger Popover should work with value in template string `${identifier}`
+        https://bugs.webkit.org/show_bug.cgi?id=194459
+        <rdar://problem/47932564>
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
+        (WI.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
+        When walking backwards to get the full _expression_ we were walking outside
+        of the interpolation group `outside ${inside}`. Stop walking backwards once
+        we cross the boundary.
+
+2019-02-08  Joseph Pecoraro  <[email protected]>
+
         Web Inspector: Import / Export Heap Snapshots
         https://bugs.webkit.org/show_bug.cgi?id=194448
         <rdar://problem/47928093>

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js (241224 => 241225)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js	2019-02-09 01:29:22 UTC (rev 241224)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js	2019-02-09 01:30:16 UTC (rev 241225)
@@ -578,11 +578,17 @@
             if (!isDot && !isExpression)
                 break;
 
-            // Disallow operators. We want the hovered _expression_ to be just a single operand.
-            // Also, some operators can modify values, such as pre-increment and assignment operators.
-            if (isExpression && token.type.includes("operator"))
-                break;
+            if (isExpression) {
+                // Disallow operators. We want the hovered _expression_ to be just a single operand.
+                // Also, some operators can modify values, such as pre-increment and assignment operators.
+                if (token.type.includes("operator"))
+                    break;
 
+                // Don't break out of a template string quasi group.
+                if (token.type.includes("string-2"))
+                    break;
+            }
+
             _expression_ = token.string + _expression_;
             expressionStartPosition.ch = token.start;
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to