Title: [252491] trunk/Source/WebInspectorUI
Revision
252491
Author
[email protected]
Date
2019-11-15 11:34:44 -0800 (Fri, 15 Nov 2019)

Log Message

Web Inspector: Sources: "Style Sheet" appears twice in the resource type scope bar
https://bugs.webkit.org/show_bug.cgi?id=204172

Reviewed by Joseph Pecoraro.

* UserInterface/Models/Resource.js:
(WI.Resource):
(WI.Resource.prototype.updateForResponse):
Remove compatibility `WI.Resource.Type.Stylesheet` (which previously existed since the
protocol values for `Page.ResourceType` match the keys) and instead add compatibility cases
at the necessary callsites.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (252490 => 252491)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-11-15 19:18:52 UTC (rev 252490)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-11-15 19:34:44 UTC (rev 252491)
@@ -1,3 +1,17 @@
+2019-11-15  Devin Rousso  <[email protected]>
+
+        Web Inspector: Sources: "Style Sheet" appears twice in the resource type scope bar
+        https://bugs.webkit.org/show_bug.cgi?id=204172
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Models/Resource.js:
+        (WI.Resource):
+        (WI.Resource.prototype.updateForResponse):
+        Remove compatibility `WI.Resource.Type.Stylesheet` (which previously existed since the
+        protocol values for `Page.ResourceType` match the keys) and instead add compatibility cases
+        at the necessary callsites.
+
 2019-11-13  Nikita Vasilyev  <[email protected]>
 
         Web Inspector: "aqua" and "fuchsia" aren't detected as colors

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js (252490 => 252491)


--- trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js	2019-11-15 19:18:52 UTC (rev 252490)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js	2019-11-15 19:34:44 UTC (rev 252491)
@@ -34,6 +34,10 @@
 
         if (type in WI.Resource.Type)
             type = WI.Resource.Type[type];
+        else if (type === "Stylesheet") {
+            // COMPATIBILITY (iOS 13): Page.ResourceType.Stylesheet was renamed to Page.ResourceType.StyleSheet.
+            type = WI.Resource.Type.StyleSheet;
+        }
 
         this._url = url;
         this._urlComponents = null;
@@ -725,6 +729,10 @@
 
         if (type in WI.Resource.Type)
             type = WI.Resource.Type[type];
+        else if (type === "Stylesheet") {
+            // COMPATIBILITY (iOS 13): Page.ResourceType.Stylesheet was renamed to Page.ResourceType.StyleSheet.
+            type = WI.Resource.Type.StyleSheet;
+        }
 
         if (url)
             this._url = url;
@@ -1216,9 +1224,6 @@
     Beacon: "resource-type-beacon",
     WebSocket: "resource-type-websocket",
     Other: "resource-type-other",
-
-    // COMPATIBILITY (iOS 13): Page.ResourceType.Stylesheet was renamed to Page.ResourceType.StyleSheet.
-    Stylesheet: "resource-type-style-sheet",
 };
 
 WI.Resource.ResponseSource = {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to