Title: [288668] trunk/Source
Revision
288668
Author
grao...@webkit.org
Date
2022-01-26 23:21:34 -0800 (Wed, 26 Jan 2022)

Log Message

[Web Inspector] Update return value name for Animation.requestEffectTarget()
https://bugs.webkit.org/show_bug.cgi?id=235661

Reviewed by Devin Rousso.

Source/_javascript_Core:

I wrongly assumed the name of the return value was important for backward compatibility when
fixing bug 235234, but it's not, so let's use a better name which doesn't make any particular
assumption on the type.

* inspector/protocol/Animation.json:

Source/WebInspectorUI:

Update the parameter name to match the name used in the protocol.

* UserInterface/Models/Animation.js:
(WI.Animation.prototype.requestEffectTarget):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (288667 => 288668)


--- trunk/Source/_javascript_Core/ChangeLog	2022-01-27 06:59:03 UTC (rev 288667)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-01-27 07:21:34 UTC (rev 288668)
@@ -1,3 +1,16 @@
+2022-01-26  Antoine Quint  <grao...@webkit.org>
+
+        [Web Inspector] Update return value name for Animation.requestEffectTarget()
+        https://bugs.webkit.org/show_bug.cgi?id=235661
+
+        Reviewed by Devin Rousso.
+
+        I wrongly assumed the name of the return value was important for backward compatibility when
+        fixing bug 235234, but it's not, so let's use a better name which doesn't make any particular
+        assumption on the type.
+
+        * inspector/protocol/Animation.json:
+
 2022-01-26  Ross Kirsling  <ross.kirsl...@sony.com>
 
         Move leftover JSValue inlines from JSString.h to JSCJSValueInlines.h

Modified: trunk/Source/_javascript_Core/inspector/protocol/Animation.json (288667 => 288668)


--- trunk/Source/_javascript_Core/inspector/protocol/Animation.json	2022-01-27 06:59:03 UTC (rev 288667)
+++ trunk/Source/_javascript_Core/inspector/protocol/Animation.json	2022-01-27 07:21:34 UTC (rev 288668)
@@ -88,7 +88,7 @@
                 { "name": "animationId", "$ref": "AnimationId" }
             ],
             "returns": [
-                { "name": "nodeId", "$ref": "DOM.Styleable" }
+                { "name": "effectTarget", "$ref": "DOM.Styleable" }
             ]
         },
         {

Modified: trunk/Source/WebInspectorUI/ChangeLog (288667 => 288668)


--- trunk/Source/WebInspectorUI/ChangeLog	2022-01-27 06:59:03 UTC (rev 288667)
+++ trunk/Source/WebInspectorUI/ChangeLog	2022-01-27 07:21:34 UTC (rev 288668)
@@ -1,5 +1,17 @@
 2022-01-26  Antoine Quint  <grao...@webkit.org>
 
+        [Web Inspector] Update return value name for Animation.requestEffectTarget()
+        https://bugs.webkit.org/show_bug.cgi?id=235661
+
+        Reviewed by Devin Rousso.
+
+        Update the parameter name to match the name used in the protocol.
+
+        * UserInterface/Models/Animation.js:
+        (WI.Animation.prototype.requestEffectTarget):
+
+2022-01-26  Antoine Quint  <grao...@webkit.org>
+
         [Web Inspector] Graphics tab should display pseudo-elements for more than ::before and ::after
         https://bugs.webkit.org/show_bug.cgi?id=235234
         <rdar://87766777>

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Animation.js (288667 => 288668)


--- trunk/Source/WebInspectorUI/UserInterface/Models/Animation.js	2022-01-27 06:59:03 UTC (rev 288667)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Animation.js	2022-01-27 07:21:34 UTC (rev 288668)
@@ -191,7 +191,6 @@
         return WI.UIString("Animation %d").format(this._uniqueDisplayNameNumber);
     }
 
-    // COMPATIBILITY (iOS 15): effectTarget changed from DOM.NodeId to CSS.Styleable.
     requestEffectTarget(callback)
     {
         if (this._effectTarget !== undefined) {
@@ -209,12 +208,12 @@
         WI.domManager.ensureDocument();
 
         let target = WI.assumingMainTarget();
-        target.AnimationAgent.requestEffectTarget(this._animationId, (error, styleable) => {
-            // COMPATIBILITY (iOS 15): effectTarget changed from DOM.NodeId to DOM.Styleable.
-            if (!isNaN(styleable))
-                styleable = {nodeId: styleable};
+        target.AnimationAgent.requestEffectTarget(this._animationId, (error, effectTarget) => {
+            // COMPATIBILITY (iOS 15): nodeId was renamed to effectTarget and changed from DOM.NodeId to DOM.Styleable.
+            if (!isNaN(effectTarget))
+                effectTarget = {nodeId: effectTarget};
 
-            this._effectTarget = !error ? WI.DOMStyleable.fromPayload(styleable) : null;
+            this._effectTarget = !error ? WI.DOMStyleable.fromPayload(effectTarget) : null;
 
             for (let requestEffectTargetCallback of this._requestEffectTargetCallbacks)
                 requestEffectTargetCallback(this._effectTarget);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to