Title: [248274] trunk
Revision
248274
Author
drou...@apple.com
Date
2019-08-05 15:44:10 -0700 (Mon, 05 Aug 2019)

Log Message

Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text
https://bugs.webkit.org/show_bug.cgi?id=200422

Reviewed by Joseph Pecoraro.

Source/_javascript_Core:

* inspector/protocol/Page.json:

Source/WebCore:

No observable change in functionality.

* inspector/agents/InspectorPageAgent.h:
* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::resourceTypeJSON):
(WebCore::InspectorPageAgent::inspectorResourceType):

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype._resourceAdded):
(WI.CSSManager.prototype._resourceTypeDidChange):
(WI.CSSManager.prototype._clearStyleSheetsForResource):
(WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):
* UserInterface/Models/CSSStyleSheet.js:
(WI.CSSStyleSheet.prototype.get displayName):
* UserInterface/Models/CollectionTypes.js:
(WI.CSSStyleSheetCollection.prototype.get displayName):
* UserInterface/Models/Resource.js:
(WI.Resource.displayNameForType):
(WI.Resource.prototype.get syntheticMIMEType):
* UserInterface/Models/ResourceCollection.js:
(WI.ResourceCollection.prototype.objectIsRequiredType):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
(WI.NetworkTableContentView.shortDisplayNameForResourceType):
* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView.prototype._contentViewForResourceType):
* UserInterface/Views/ResourceSidebarPanel.js:
(WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._save):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu):
* UserInterface/Views/StyleOriginView.js:
(WI.StyleOriginView.prototype.update):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype._shouldBeEditable):

* UserInterface/Views/CSSStyleSheetTreeElement.js:
(WI.CSSStyleSheetTreeElement):
* UserInterface/Views/ResourceIcons.css:
(:matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon): Added.
(.source-map-resource.resource-icon.resource-type-style-sheet .icon): Added.
(.large :matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon): Added.
(.large .source-map-resource.resource-icon.resource-type-style-sheet .icon): Added.
(:matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): Deleted.
(.source-map-resource.resource-icon.resource-type-stylesheet .icon): Deleted.
(.large :matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): Deleted.
(.large .source-map-resource.resource-icon.resource-type-stylesheet .icon): Deleted.

LayoutTests:

* inspector/unit-tests/resource-collection.html:
* http/tests/inspector/network/resource-mime-type.html:
* http/tests/inspector/network/resource-mime-type-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (248273 => 248274)


--- trunk/LayoutTests/ChangeLog	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/LayoutTests/ChangeLog	2019-08-05 22:44:10 UTC (rev 248274)
@@ -1,3 +1,14 @@
+2019-08-05  Devin Rousso  <drou...@apple.com>
+
+        Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text
+        https://bugs.webkit.org/show_bug.cgi?id=200422
+
+        Reviewed by Joseph Pecoraro.
+
+        * inspector/unit-tests/resource-collection.html:
+        * http/tests/inspector/network/resource-mime-type.html:
+        * http/tests/inspector/network/resource-mime-type-expected.txt:
+
 2019-08-05  John Wilander  <wilan...@apple.com>
 
         Resource Load Statistics: Re-introduce latch mode for subresource cookie blocking

Modified: trunk/LayoutTests/http/tests/inspector/network/resource-mime-type-expected.txt (248273 => 248274)


--- trunk/LayoutTests/http/tests/inspector/network/resource-mime-type-expected.txt	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/LayoutTests/http/tests/inspector/network/resource-mime-type-expected.txt	2019-08-05 22:44:10 UTC (rev 248274)
@@ -14,15 +14,15 @@
 PASS: Resource mimeType should be 'text/plain'.
 PASS: Resource syntheticMIMEType should be 'text/_javascript_'.
 
--- Running test case: Resource.MIMEType.Stylesheet.css
+-- Running test case: Resource.MIMEType.StyleSheet.css
 PASS: Resource should be created.
-PASS: Resource Type should be 'resource-type-stylesheet'.
+PASS: Resource Type should be 'resource-type-style-sheet'.
 PASS: Resource mimeType should be 'text/css'.
 PASS: Resource syntheticMIMEType should be 'text/css'.
 
--- Running test case: Resource.MIMEType.Stylesheet.txt
+-- Running test case: Resource.MIMEType.StyleSheet.txt
 PASS: Resource should be created.
-PASS: Resource Type should be 'resource-type-stylesheet'.
+PASS: Resource Type should be 'resource-type-style-sheet'.
 PASS: Resource mimeType should be 'text/plain'.
 PASS: Resource syntheticMIMEType should be 'text/css'.
 

Modified: trunk/LayoutTests/http/tests/inspector/network/resource-mime-type.html (248273 => 248274)


--- trunk/LayoutTests/http/tests/inspector/network/resource-mime-type.html	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/LayoutTests/http/tests/inspector/network/resource-mime-type.html	2019-08-05 22:44:10 UTC (rev 248274)
@@ -108,20 +108,20 @@
         synthetic: "text/_javascript_",
     });
 
-    // Stylesheets.
+    // Style Sheets.
 
     addTestCase({
-        name: "Resource.MIMEType.Stylesheet.css",
+        name: "Resource.MIMEType.StyleSheet.css",
         _expression_: `loadStyleSheetWithURL("resources/stylesheet.css")`,
-        type: WI.Resource.Type.Stylesheet,
+        type: WI.Resource.Type.StyleSheet,
         mimeType: mimeTypeForExtension.css,
         synthetic: mimeTypeForExtension.css,
     });
 
     addTestCase({
-        name: "Resource.MIMEType.Stylesheet.txt",
+        name: "Resource.MIMEType.StyleSheet.txt",
         _expression_: `loadStyleSheetWithURL("resources/stylesheet.txt")`,
-        type: WI.Resource.Type.Stylesheet,
+        type: WI.Resource.Type.StyleSheet,
         mimeType: mimeTypeForExtension.txt,
         synthetic: "text/css",
     });

Modified: trunk/LayoutTests/inspector/unit-tests/resource-collection.html (248273 => 248274)


--- trunk/LayoutTests/inspector/unit-tests/resource-collection.html	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/LayoutTests/inspector/unit-tests/resource-collection.html	2019-08-05 22:44:10 UTC (rev 248274)
@@ -34,16 +34,16 @@
         test(resolve, reject) {
             let collection = new WI.ResourceCollection;
             collection.add(createResource("one", WI.Resource.Type.Image));
-            collection.add(createResource("two", WI.Resource.Type.Stylesheet));
+            collection.add(createResource("two", WI.Resource.Type.StyleSheet));
             collection.add(createResource("three", WI.Resource.Type.Image));
             collection.add(createResource("four", WI.Resource.Type.Document));
-            collection.add(createResource("five", WI.Resource.Type.Stylesheet));
+            collection.add(createResource("five", WI.Resource.Type.StyleSheet));
 
             logResourceNames(collection.resourceCollectionForType(WI.Resource.Type.Image));
 
             let typedCollection = new WI.ResourceCollection(WI.Resource.Type.Image);
             typedCollection.add(createResource("one", WI.Resource.Type.Image));
-            typedCollection.add(createResource("two", WI.Resource.Type.Stylesheet));
+            typedCollection.add(createResource("two", WI.Resource.Type.StyleSheet));
             typedCollection.add(createResource("three", WI.Resource.Type.Image));
 
             logResourceNames(typedCollection);

Modified: trunk/Source/_javascript_Core/ChangeLog (248273 => 248274)


--- trunk/Source/_javascript_Core/ChangeLog	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-08-05 22:44:10 UTC (rev 248274)
@@ -1,3 +1,12 @@
+2019-08-05  Devin Rousso  <drou...@apple.com>
+
+        Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text
+        https://bugs.webkit.org/show_bug.cgi?id=200422
+
+        Reviewed by Joseph Pecoraro.
+
+        * inspector/protocol/Page.json:
+
 2019-08-05  Michael Saboff  <msab...@apple.com>
 
         JSC: assertion failure in SpeculativeJIT::compileGetByValOnIntTypedArray

Modified: trunk/Source/_javascript_Core/inspector/protocol/Page.json (248273 => 248274)


--- trunk/Source/_javascript_Core/inspector/protocol/Page.json	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/_javascript_Core/inspector/protocol/Page.json	2019-08-05 22:44:10 UTC (rev 248274)
@@ -22,7 +22,7 @@
         {
             "id": "ResourceType",
             "type": "string",
-            "enum": ["Document", "Stylesheet", "Image", "Font", "Script", "XHR", "Fetch", "Ping", "Beacon", "WebSocket", "Other"],
+            "enum": ["Document", "StyleSheet", "Image", "Font", "Script", "XHR", "Fetch", "Ping", "Beacon", "WebSocket", "Other"],
             "description": "Resource type as it was perceived by the rendering engine."
         },
         {

Modified: trunk/Source/WebCore/ChangeLog (248273 => 248274)


--- trunk/Source/WebCore/ChangeLog	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebCore/ChangeLog	2019-08-05 22:44:10 UTC (rev 248274)
@@ -1,3 +1,17 @@
+2019-08-05  Devin Rousso  <drou...@apple.com>
+
+        Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text
+        https://bugs.webkit.org/show_bug.cgi?id=200422
+
+        Reviewed by Joseph Pecoraro.
+
+        No observable change in functionality.
+
+        * inspector/agents/InspectorPageAgent.h:
+        * inspector/agents/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::resourceTypeJSON):
+        (WebCore::InspectorPageAgent::inspectorResourceType):
+
 2019-08-05  Takashi Komori  <takashi.kom...@sony.com>
 
         [Curl] implement CertificateInfo::summaryInfo

Modified: trunk/Source/WebCore/inspector/agents/InspectorPageAgent.cpp (248273 => 248274)


--- trunk/Source/WebCore/inspector/agents/InspectorPageAgent.cpp	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebCore/inspector/agents/InspectorPageAgent.cpp	2019-08-05 22:44:10 UTC (rev 248274)
@@ -233,8 +233,8 @@
         return Inspector::Protocol::Page::ResourceType::Image;
     case FontResource:
         return Inspector::Protocol::Page::ResourceType::Font;
-    case StylesheetResource:
-        return Inspector::Protocol::Page::ResourceType::Stylesheet;
+    case StyleSheetResource:
+        return Inspector::Protocol::Page::ResourceType::StyleSheet;
     case ScriptResource:
         return Inspector::Protocol::Page::ResourceType::Script;
     case XHRResource:
@@ -271,7 +271,7 @@
     case CachedResource::Type::XSLStyleSheet:
 #endif
     case CachedResource::Type::CSSStyleSheet:
-        return InspectorPageAgent::StylesheetResource;
+        return InspectorPageAgent::StyleSheetResource;
     case CachedResource::Type::Script:
         return InspectorPageAgent::ScriptResource;
     case CachedResource::Type::MainResource:

Modified: trunk/Source/WebCore/inspector/agents/InspectorPageAgent.h (248273 => 248274)


--- trunk/Source/WebCore/inspector/agents/InspectorPageAgent.h	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebCore/inspector/agents/InspectorPageAgent.h	2019-08-05 22:44:10 UTC (rev 248274)
@@ -60,7 +60,7 @@
 
     enum ResourceType {
         DocumentResource,
-        StylesheetResource,
+        StyleSheetResource,
         ImageResource,
         FontResource,
         ScriptResource,

Modified: trunk/Source/WebInspectorUI/ChangeLog (248273 => 248274)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-08-05 22:44:10 UTC (rev 248274)
@@ -1,3 +1,55 @@
+2019-08-05  Devin Rousso  <drou...@apple.com>
+
+        Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text
+        https://bugs.webkit.org/show_bug.cgi?id=200422
+
+        Reviewed by Joseph Pecoraro.
+
+        * Localizations/en.lproj/localizedStrings.js:
+
+        * UserInterface/Controllers/CSSManager.js:
+        (WI.CSSManager.prototype._resourceAdded):
+        (WI.CSSManager.prototype._resourceTypeDidChange):
+        (WI.CSSManager.prototype._clearStyleSheetsForResource):
+        (WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):
+        * UserInterface/Models/CSSStyleSheet.js:
+        (WI.CSSStyleSheet.prototype.get displayName):
+        * UserInterface/Models/CollectionTypes.js:
+        (WI.CSSStyleSheetCollection.prototype.get displayName):
+        * UserInterface/Models/Resource.js:
+        (WI.Resource.displayNameForType):
+        (WI.Resource.prototype.get syntheticMIMEType):
+        * UserInterface/Models/ResourceCollection.js:
+        (WI.ResourceCollection.prototype.objectIsRequiredType):
+        * UserInterface/Views/NetworkTableContentView.js:
+        (WI.NetworkTableContentView):
+        (WI.NetworkTableContentView.shortDisplayNameForResourceType):
+        * UserInterface/Views/ResourceClusterContentView.js:
+        (WI.ResourceClusterContentView.prototype._contentViewForResourceType):
+        * UserInterface/Views/ResourceSidebarPanel.js:
+        (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
+        * UserInterface/Views/SourcesNavigationSidebarPanel.js:
+        (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
+        (WI.SpreadsheetCSSStyleDeclarationSection.prototype._save):
+        (WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu):
+        * UserInterface/Views/StyleOriginView.js:
+        (WI.StyleOriginView.prototype.update):
+        * UserInterface/Views/TextResourceContentView.js:
+        (WI.TextResourceContentView.prototype._shouldBeEditable):
+
+        * UserInterface/Views/CSSStyleSheetTreeElement.js:
+        (WI.CSSStyleSheetTreeElement):
+        * UserInterface/Views/ResourceIcons.css:
+        (:matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon): Added.
+        (.source-map-resource.resource-icon.resource-type-style-sheet .icon): Added.
+        (.large :matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon): Added.
+        (.large .source-map-resource.resource-icon.resource-type-style-sheet .icon): Added.
+        (:matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): Deleted.
+        (.source-map-resource.resource-icon.resource-type-stylesheet .icon): Deleted.
+        (.large :matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): Deleted.
+        (.large .source-map-resource.resource-icon.resource-type-stylesheet .icon): Deleted.
+
 2019-08-03  Devin Rousso  <drou...@apple.com>
 
         Web Inspector: Elements: Styles: move psuedo-selector rules before inherited rules

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -127,7 +127,7 @@
 localizedStrings["Animation Frame Requested"] = "Animation Frame Requested";
 localizedStrings["Anonymous Script %d"] = "Anonymous Script %d";
 localizedStrings["Anonymous Scripts"] = "Anonymous Scripts";
-localizedStrings["Anonymous StyleSheet %d"] = "Anonymous StyleSheet %d";
+localizedStrings["Anonymous Style Sheet %d"] = "Anonymous Style Sheet %d";
 localizedStrings["Application Cache"] = "Application Cache";
 /* Approximate count of events */
 localizedStrings["Approximate Number"] = "~%s";
@@ -150,7 +150,7 @@
 localizedStrings["Audit Warning: %s"] = "Audit Warning: %s";
 localizedStrings["Audit version: %s"] = "Audit version: %s";
 localizedStrings["Audits"] = "Audits";
-localizedStrings["Author Stylesheet"] = "Author Stylesheet";
+localizedStrings["Author Style Sheet"] = "Author Style Sheet";
 localizedStrings["Auto"] = "Auto";
 localizedStrings["Auto - %s"] = "Auto - %s";
 localizedStrings["Auto Increment"] = "Auto Increment";
@@ -911,7 +911,7 @@
 localizedStrings["Reveal in Original Resource"] = "Reveal in Original Resource";
 localizedStrings["Reveal in Resources Tab"] = "Reveal in Resources Tab";
 localizedStrings["Reveal in Sources Tab"] = "Reveal in Sources Tab";
-localizedStrings["Reveal in Stylesheet"] = "Reveal in Stylesheet";
+localizedStrings["Reveal in Style Sheet"] = "Reveal in Style Sheet";
 localizedStrings["Role"] = "Role";
 localizedStrings["Run %d"] = "Run %d";
 localizedStrings["Run console commands as if inside a user gesture"] = "Run console commands as if inside a user gesture";
@@ -1061,6 +1061,8 @@
 localizedStrings["Storage"] = "Storage";
 /* CSS properties defined via HTML style attribute */
 localizedStrings["Style Attribute"] = "Style Attribute";
+localizedStrings["Style Sheet"] = "Style Sheet";
+localizedStrings["Style Sheets"] = "Style Sheets";
 localizedStrings["Style rule"] = "Style rule";
 localizedStrings["Styles"] = "Styles";
 localizedStrings["Styles Invalidated"] = "Styles Invalidated";
@@ -1068,8 +1070,6 @@
 localizedStrings["Styles \u2014 Computed"] = "Styles \u2014 Computed";
 localizedStrings["Styles \u2014 Rules"] = "Styles \u2014 Rules";
 localizedStrings["Styles:"] = "Styles:";
-localizedStrings["Stylesheet"] = "Stylesheet";
-localizedStrings["Stylesheets"] = "Stylesheets";
 localizedStrings["Subject"] = "Subject";
 /* A submenu item of 'Break On' that breaks (pauses) before child DOM node is modified */
 localizedStrings["Subtree Modified"] = "Subtree Modified";
@@ -1192,10 +1192,10 @@
 localizedStrings["Use default media styles"] = "Use default media styles";
 localizedStrings["Use the resource cache when loading resources"] = "Use the resource cache when loading resources";
 localizedStrings["User Agent"] = "User Agent";
-localizedStrings["User Agent Stylesheet"] = "User Agent Stylesheet";
+localizedStrings["User Agent Style Sheet"] = "User Agent Style Sheet";
 localizedStrings["User Agent:"] = "User Agent:";
 localizedStrings["User Interface:"] = "User Interface:";
-localizedStrings["User Stylesheet"] = "User Stylesheet";
+localizedStrings["User Style Sheet"] = "User Style Sheet";
 localizedStrings["Valid From"] = "Valid From";
 localizedStrings["Valid Until"] = "Valid Until";
 localizedStrings["Value"] = "Value";

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -545,7 +545,7 @@
         var resource = event.data.resource;
         console.assert(resource);
 
-        if (resource.type !== WI.Resource.Type.Stylesheet)
+        if (resource.type !== WI.Resource.Type.StyleSheet)
             return;
 
         this._clearStyleSheetsForResource(resource);
@@ -556,7 +556,7 @@
         console.assert(event.target instanceof WI.Resource);
 
         var resource = event.target;
-        if (resource.type !== WI.Resource.Type.Stylesheet)
+        if (resource.type !== WI.Resource.Type.StyleSheet)
             return;
 
         this._clearStyleSheetsForResource(resource);
@@ -564,7 +564,7 @@
 
     _clearStyleSheetsForResource(resource)
     {
-        // Clear known stylesheets for this URL and frame. This will cause the stylesheets to
+        // Clear known stylesheets for this URL and frame. This will cause the style sheets to
         // be updated next time _fetchInfoForAllStyleSheets is called.
         this._styleSheetIdentifierMap.delete(this._frameURLMapKey(resource.parentFrame, resource.url));
     }
@@ -638,8 +638,8 @@
         if (resource === this._ignoreResourceContentDidChangeEventForResource)
             return;
 
-        // Ignore if it isn't a CSS stylesheet.
-        if (resource.type !== WI.Resource.Type.Stylesheet || resource.syntheticMIMEType !== "text/css")
+        // Ignore if it isn't a CSS style sheet.
+        if (resource.type !== WI.Resource.Type.StyleSheet || resource.syntheticMIMEType !== "text/css")
             return;
 
         function applyStyleSheetChanges()
@@ -688,7 +688,7 @@
 
                 // Only try to update stylesheet resources. Other resources, like documents, can contain
                 // multiple stylesheets and we don't have the source ranges to update those.
-                if (representedObject.type !== WI.Resource.Type.Stylesheet)
+                if (representedObject.type !== WI.Resource.Type.StyleSheet)
                     return;
             }
 
@@ -758,4 +758,4 @@
 
 WI.CSSManager.PseudoElementNames = ["before", "after"];
 WI.CSSManager.ForceablePseudoClasses = ["active", "focus", "hover", "visited"];
-WI.CSSManager.PreferredInspectorStyleSheetSymbol = Symbol("css-manager-preferred-inspector-stylesheet");
+WI.CSSManager.PreferredInspectorStyleSheetSymbol = Symbol("css-manager-preferred-inspector-style-sheet");

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleSheet.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleSheet.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleSheet.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -94,7 +94,7 @@
         if (!this._uniqueDisplayNameNumber)
             this._uniqueDisplayNameNumber = this.constructor._nextUniqueDisplayNameNumber++;
 
-        return WI.UIString("Anonymous StyleSheet %d").format(this._uniqueDisplayNameNumber);
+        return WI.UIString("Anonymous Style Sheet %d").format(this._uniqueDisplayNameNumber);
     }
 
     get startLineNumber()
@@ -219,12 +219,12 @@
 WI.CSSStyleSheet._nextUniqueDisplayNameNumber = 1;
 
 WI.CSSStyleSheet.Event = {
-    ContentDidChange: "stylesheet-content-did-change"
+    ContentDidChange: "css-style-sheet-content-did-change"
 };
 
 WI.CSSStyleSheet.Type = {
-    Author: "css-stylesheet-type-author",
-    User: "css-stylesheet-type-user",
-    UserAgent: "css-stylesheet-type-user-agent",
-    Inspector: "css-stylesheet-type-inspector"
+    Author: "css-style-sheet-type-author",
+    User: "css-style-sheet-type-user",
+    UserAgent: "css-style-sheet-type-user-agent",
+    Inspector: "css-style-sheet-type-inspector"
 };

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CollectionTypes.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Models/CollectionTypes.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CollectionTypes.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -60,7 +60,7 @@
 
     get displayName()
     {
-        return WI.UIString("Stylesheets");
+        return WI.UIString("Style Sheets");
     }
 
     objectIsRequiredType(object)

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -134,10 +134,10 @@
             if (plural)
                 return WI.UIString("Documents");
             return WI.UIString("Document");
-        case WI.Resource.Type.Stylesheet:
+        case WI.Resource.Type.StyleSheet:
             if (plural)
-                return WI.UIString("Stylesheets");
-            return WI.UIString("Stylesheet");
+                return WI.UIString("Style Sheets");
+            return WI.UIString("Style Sheet");
         case WI.Resource.Type.Image:
             if (plural)
                 return WI.UIString("Images");
@@ -384,7 +384,7 @@
         // Return the default MIME-types for the Resource.Type, since the current MIME-type
         // does not match what is expected for the Resource.Type.
         switch (this._type) {
-        case WI.Resource.Type.Stylesheet:
+        case WI.Resource.Type.StyleSheet:
             return "text/css";
         case WI.Resource.Type.Script:
             return "text/_javascript_";
@@ -1164,7 +1164,7 @@
 // Keep these in sync with the "ResourceType" enum defined by the "Page" domain.
 WI.Resource.Type = {
     Document: "resource-type-document",
-    Stylesheet: "resource-type-stylesheet",
+    StyleSheet: "resource-type-style-sheet",
     Image: "resource-type-image",
     Font: "resource-type-font",
     Script: "resource-type-script",
@@ -1174,6 +1174,9 @@
     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 = {
@@ -1204,11 +1207,11 @@
     "text/plain": WI.Resource.Type.Document,
     "application/xhtml+xml": WI.Resource.Type.Document,
 
-    "text/css": WI.Resource.Type.Stylesheet,
-    "text/xsl": WI.Resource.Type.Stylesheet,
-    "text/x-less": WI.Resource.Type.Stylesheet,
-    "text/x-sass": WI.Resource.Type.Stylesheet,
-    "text/x-scss": WI.Resource.Type.Stylesheet,
+    "text/css": WI.Resource.Type.StyleSheet,
+    "text/xsl": WI.Resource.Type.StyleSheet,
+    "text/x-less": WI.Resource.Type.StyleSheet,
+    "text/x-sass": WI.Resource.Type.StyleSheet,
+    "text/x-scss": WI.Resource.Type.StyleSheet,
 
     "application/pdf": WI.Resource.Type.Image,
     "image/svg+xml": WI.Resource.Type.Image,

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ResourceCollection.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Models/ResourceCollection.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ResourceCollection.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -47,7 +47,7 @@
 
     objectIsRequiredType(object)
     {
-        if (this._resourceType === WI.Resource.Type.Stylesheet && object instanceof WI.CSSStyleSheet)
+        if (this._resourceType === WI.Resource.Type.StyleSheet && object instanceof WI.CSSStyleSheet)
             return true;
 
         if (!(object instanceof WI.Resource))

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleSheetTreeElement.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleSheetTreeElement.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleSheetTreeElement.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -30,6 +30,6 @@
         console.assert(styleSheet instanceof WI.CSSStyleSheet);
         console.assert(styleSheet.isInspectorStyleSheet());
 
-        super(styleSheet, ["stylesheet", "stylesheet-icon"], WI.UIString("Inspector Style Sheet"));
+        super(styleSheet, ["style-sheet", "style-sheet-icon"], WI.UIString("Inspector Style Sheet"));
     }
 };

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -61,7 +61,7 @@
 
         let uniqueTypes = [
             ["Document", (type) => type === WI.Resource.Type.Document],
-            ["Stylesheet", (type) => type === WI.Resource.Type.Stylesheet],
+            ["StyleSheet", (type) => type === WI.Resource.Type.StyleSheet],
             ["Image", (type) => type === WI.Resource.Type.Image],
             ["Font", (type) => type === WI.Resource.Type.Font],
             ["Script", (type) => type === WI.Resource.Type.Script],
@@ -68,7 +68,7 @@
             ["XHR", (type) => type === WI.Resource.Type.XHR || type === WI.Resource.Type.Fetch],
             ["Other", (type) => {
                 return type !== WI.Resource.Type.Document
-                    && type !== WI.Resource.Type.Stylesheet
+                    && type !== WI.Resource.Type.StyleSheet
                     && type !== WI.Resource.Type.Image
                     && type !== WI.Resource.Type.Font
                     && type !== WI.Resource.Type.Script
@@ -199,16 +199,16 @@
         switch (type) {
         case WI.Resource.Type.Document:
             return WI.UIString("Document");
-        case WI.Resource.Type.Stylesheet:
-            return "CSS";
+        case WI.Resource.Type.StyleSheet:
+            return WI.unlocalizedString("CSS");
         case WI.Resource.Type.Image:
             return WI.UIString("Image");
         case WI.Resource.Type.Font:
             return WI.UIString("Font");
         case WI.Resource.Type.Script:
-            return "JS";
+            return WI.unlocalizedString("JS");
         case WI.Resource.Type.XHR:
-            return "XHR";
+            return WI.unlocalizedString("XHR");
         case WI.Resource.Type.Fetch:
             return WI.repeatedUIString.fetch();
         case WI.Resource.Type.Ping:

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -208,7 +208,7 @@
         switch (type) {
         case WI.Resource.Type.Document:
         case WI.Resource.Type.Script:
-        case WI.Resource.Type.Stylesheet:
+        case WI.Resource.Type.StyleSheet:
             return new WI.TextResourceContentView(this._resource);
 
         case WI.Resource.Type.Image:

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceIcons.css (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceIcons.css	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceIcons.css	2019-08-05 22:44:10 UTC (rev 248274)
@@ -39,7 +39,7 @@
     content: image-set(url(../Images/DocumentFont.png) 1x, url(../Images/documentf...@2x.png) 2x);
 }
 
-:matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon {
+:matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon {
     content: image-set(url(../Images/DocumentCSS.png) 1x, url(../Images/document...@2x.png) 2x);
 }
 
@@ -55,7 +55,7 @@
     content: image-set(url(../Images/ClippingGeneric.png) 1x, url(../Images/clippinggene...@2x.png) 2x);
 }
 
-.source-map-resource.resource-icon.resource-type-stylesheet .icon {
+.source-map-resource.resource-icon.resource-type-style-sheet .icon {
     content: image-set(url(../Images/ClippingCSS.png) 1x, url(../Images/clipping...@2x.png) 2x);
 }
 
@@ -98,7 +98,7 @@
     content: image-set(url(../Images/DocumentFontLarge.png) 1x, url(../Images/documentfontla...@2x.png) 2x);
 }
 
-.large :matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon {
+.large :matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon {
     content: image-set(url(../Images/DocumentCSSLarge.png) 1x, url(../Images/documentcssla...@2x.png) 2x);
 }
 
@@ -114,7 +114,7 @@
     content: image-set(url(../Images/ClippingGenericLarge.png) 1x, url(../Images/clippinggenericla...@2x.png) 2x);
 }
 
-.large .source-map-resource.resource-icon.resource-type-stylesheet .icon {
+.large .source-map-resource.resource-icon.resource-type-style-sheet .icon {
     content: image-set(url(../Images/ClippingCSSLarge.png) 1x, url(../Images/clippingcssla...@2x.png) 2x);
 }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -244,7 +244,7 @@
                 return selectedScopeBarItem[WI.ResourceSidebarPanel.ResourceTypeSymbol] === WI.Resource.Type.Script;
 
             if (treeElement instanceof WI.CSSStyleSheetTreeElement)
-                return selectedScopeBarItem[WI.ResourceSidebarPanel.ResourceTypeSymbol] === WI.Resource.Type.Stylesheet;
+                return selectedScopeBarItem[WI.ResourceSidebarPanel.ResourceTypeSymbol] === WI.Resource.Type.StyleSheet;
 
             console.assert(treeElement instanceof WI.ResourceTreeElement, "Unknown treeElement", treeElement);
             if (!(treeElement instanceof WI.ResourceTreeElement))

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -552,7 +552,7 @@
                 return selectedScopeBarItem[WI.SourcesNavigationSidebarPanel.ResourceTypeSymbol] === WI.Resource.Type.Script;
 
             if (treeElement instanceof WI.CSSStyleSheetTreeElement)
-                return selectedScopeBarItem[WI.SourcesNavigationSidebarPanel.ResourceTypeSymbol] === WI.Resource.Type.Stylesheet;
+                return selectedScopeBarItem[WI.SourcesNavigationSidebarPanel.ResourceTypeSymbol] === WI.Resource.Type.StyleSheet;
 
             console.assert(treeElement instanceof WI.ResourceTreeElement, "Unknown treeElement", treeElement);
             if (!(treeElement instanceof WI.ResourceTreeElement))

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -421,7 +421,7 @@
         console.assert(this._style.ownerRule.sourceCodeLocation instanceof WI.SourceCodeLocation);
 
         let sourceCode = this._style.ownerRule.sourceCodeLocation.sourceCode;
-        if (sourceCode.type !== WI.Resource.Type.Stylesheet) {
+        if (sourceCode.type !== WI.Resource.Type.StyleSheet) {
             // FIXME: Can't save CSS inside style="" <https://webkit.org/b/150357>
             InspectorFrontendHost.beep();
             return;
@@ -561,8 +561,8 @@
 
             let label = null;
             let sourceCode = this._style.ownerRule.sourceCodeLocation.displaySourceCode;
-            if (sourceCode instanceof WI.CSSStyleSheet || (sourceCode instanceof WI.Resource && sourceCode.type === WI.Resource.Type.Stylesheet))
-                label = WI.UIString("Reveal in Stylesheet");
+            if (sourceCode instanceof WI.CSSStyleSheet || (sourceCode instanceof WI.Resource && sourceCode.type === WI.Resource.Type.StyleSheet))
+                label = WI.UIString("Reveal in Style Sheet");
             else if (WI.settings.experimentalEnableSourcesTab.value)
                 label = WI.UIString("Reveal in Sources Tab");
             else

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/StyleOriginView.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Views/StyleOriginView.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/StyleOriginView.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -61,15 +61,15 @@
 
                 switch (style.ownerRule.type) {
                 case WI.CSSStyleSheet.Type.Author:
-                    originString = WI.UIString("Author Stylesheet");
+                    originString = WI.UIString("Author Style Sheet");
                     break;
 
                 case WI.CSSStyleSheet.Type.User:
-                    originString = WI.UIString("User Stylesheet");
+                    originString = WI.UIString("User Style Sheet");
                     break;
 
                 case WI.CSSStyleSheet.Type.UserAgent:
-                    originString = WI.UIString("User Agent Stylesheet");
+                    originString = WI.UIString("User Agent Style Sheet");
                     break;
 
                 case WI.CSSStyleSheet.Type.Inspector:
@@ -84,7 +84,7 @@
                 if (!style.editable) {
                     let styleTitle = "";
                     if (style.ownerRule && style.ownerRule.type === WI.CSSStyleSheet.Type.UserAgent)
-                        styleTitle = WI.UIString("User Agent Stylesheet");
+                        styleTitle = WI.UIString("User Agent Style Sheet");
                     else
                         styleTitle = WI.UIString("Style rule");
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js (248273 => 248274)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js	2019-08-05 21:33:51 UTC (rev 248273)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js	2019-08-05 22:44:10 UTC (rev 248274)
@@ -295,8 +295,8 @@
         if (this.resource instanceof WI.CSSStyleSheet)
             return true;
 
-        // Check the MIME-type for CSS since Resource.Type.Stylesheet also includes XSL, which we can't edit yet.
-        if (this.resource.type === WI.Resource.Type.Stylesheet && this.resource.syntheticMIMEType === "text/css")
+        // Check the MIME-type for CSS since Resource.Type.StyleSheet also includes XSL, which we can't edit yet.
+        if (this.resource.type === WI.Resource.Type.StyleSheet && this.resource.syntheticMIMEType === "text/css")
             return true;
 
         // Allow editing any local file since edits can be saved and reloaded right from the Inspector.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to