Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Aug 2019 22:44:10 +0000 (22:44 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Aug 2019 22:44:10 +0000 (22:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=200422

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

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

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

25 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/resource-mime-type-expected.txt
LayoutTests/http/tests/inspector/network/resource-mime-type.html
LayoutTests/inspector/unit-tests/resource-collection.html
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/protocol/Page.json
Source/WebCore/ChangeLog
Source/WebCore/inspector/agents/InspectorPageAgent.cpp
Source/WebCore/inspector/agents/InspectorPageAgent.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js
Source/WebInspectorUI/UserInterface/Models/CSSStyleSheet.js
Source/WebInspectorUI/UserInterface/Models/CollectionTypes.js
Source/WebInspectorUI/UserInterface/Models/Resource.js
Source/WebInspectorUI/UserInterface/Models/ResourceCollection.js
Source/WebInspectorUI/UserInterface/Views/CSSStyleSheetTreeElement.js
Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js
Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js
Source/WebInspectorUI/UserInterface/Views/ResourceIcons.css
Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js
Source/WebInspectorUI/UserInterface/Views/StyleOriginView.js
Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js

index 4f796df..00dc98d 100644 (file)
@@ -1,3 +1,14 @@
+2019-08-05  Devin Rousso  <drousso@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  <wilander@apple.com>
 
         Resource Load Statistics: Re-introduce latch mode for subresource cookie blocking
index 9fd2edb..d8fc258 100644 (file)
@@ -14,15 +14,15 @@ PASS: Resource Type should be 'resource-type-script'.
 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'.
 
index 246748d..a243f77 100644 (file)
@@ -108,20 +108,20 @@ function test()
         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",
     });
index f613304..d236640 100644 (file)
@@ -34,16 +34,16 @@ function test()
         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);
index 561393c..c21e037 100644 (file)
@@ -1,3 +1,12 @@
+2019-08-05  Devin Rousso  <drousso@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  <msaboff@apple.com>
 
         JSC: assertion failure in SpeculativeJIT::compileGetByValOnIntTypedArray
index 8c64cfc..f3e6a20 100644 (file)
@@ -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."
         },
         {
index 19bf6bb..a18fb73 100644 (file)
@@ -1,3 +1,17 @@
+2019-08-05  Devin Rousso  <drousso@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.Komori@sony.com>
 
         [Curl] implement CertificateInfo::summaryInfo
index 6246dbf..24024f6 100644 (file)
@@ -233,8 +233,8 @@ Inspector::Protocol::Page::ResourceType InspectorPageAgent::resourceTypeJSON(Ins
         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 @@ InspectorPageAgent::ResourceType InspectorPageAgent::inspectorResourceType(Cache
     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:
index 0ff4578..c5f7bce 100644 (file)
@@ -60,7 +60,7 @@ public:
 
     enum ResourceType {
         DocumentResource,
-        StylesheetResource,
+        StyleSheetResource,
         ImageResource,
         FontResource,
         ScriptResource,
index 5691be6..e823fe6 100644 (file)
@@ -1,3 +1,55 @@
+2019-08-05  Devin Rousso  <drousso@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  <drousso@apple.com>
 
         Web Inspector: Elements: Styles: move psuedo-selector rules before inherited rules
index 3f0a310..c2f9ba3 100644 (file)
@@ -127,7 +127,7 @@ localizedStrings["Animation Frame Fired"] = "Animation Frame Fired";
 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 Error: %s"] = "Audit Error: %s";
 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 Network Tab"] = "Reveal in Network Tab";
 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["Stopping the \u201C%s\u201D audit"] = "Stopping the \u201C%s\u
 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 Recalculated"] = "Styles Recalculated";
 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 Mock Capture Devices"] = "Use Mock Capture Devices";
 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";
index f9b2397..087d9d7 100644 (file)
@@ -545,7 +545,7 @@ WI.CSSManager = class CSSManager extends WI.Object
         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 @@ WI.CSSManager = class CSSManager extends WI.Object
         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 @@ WI.CSSManager = class CSSManager extends WI.Object
 
     _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 @@ WI.CSSManager = class CSSManager extends WI.Object
         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 @@ WI.CSSManager = class CSSManager extends WI.Object
 
                 // 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.PseudoSelectorNames = {
 
 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");
index 7a75cef..f260050 100644 (file)
@@ -94,7 +94,7 @@ WI.CSSStyleSheet = class CSSStyleSheet extends WI.SourceCode
         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 = class CSSStyleSheet extends WI.SourceCode
 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"
 };
index d05d6ed..cd7ef1f 100644 (file)
@@ -60,7 +60,7 @@ WI.CSSStyleSheetCollection = class CSSStyleSheetCollection extends WI.Collection
 
     get displayName()
     {
-        return WI.UIString("Stylesheets");
+        return WI.UIString("Style Sheets");
     }
 
     objectIsRequiredType(object)
index 8f632c5..1ff1671 100644 (file)
@@ -134,10 +134,10 @@ WI.Resource = class Resource extends WI.SourceCode
             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 @@ WI.Resource = class Resource extends WI.SourceCode
         // 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 @@ WI.Resource.Event = {
 // 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 @@ WI.Resource.Type = {
     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 @@ WI.Resource._mimeTypeMap = {
     "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,
index 2daeef6..96b1543 100644 (file)
@@ -47,7 +47,7 @@ WI.ResourceCollection = class ResourceCollection extends WI.Collection
 
     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))
index 288fb46..6b6180a 100644 (file)
@@ -30,6 +30,6 @@ WI.CSSStyleSheetTreeElement = class CSSStyleSheetTreeElement extends WI.SourceCo
         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"));
     }
 };
index e27ae10..44bfc0e 100644 (file)
@@ -61,14 +61,14 @@ WI.NetworkTableContentView = class NetworkTableContentView extends WI.ContentVie
 
         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],
             ["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 @@ WI.NetworkTableContentView = class NetworkTableContentView extends WI.ContentVie
         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:
index 074ac84..847a93d 100644 (file)
@@ -208,7 +208,7 @@ WI.ResourceClusterContentView = class ResourceClusterContentView extends WI.Clus
         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:
index a16bc58..9a072bc 100644 (file)
@@ -39,7 +39,7 @@
     content: image-set(url(../Images/DocumentFont.png) 1x, url(../Images/DocumentFont@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/DocumentCSS@2x.png) 2x);
 }
 
@@ -55,7 +55,7 @@
     content: image-set(url(../Images/ClippingGeneric.png) 1x, url(../Images/ClippingGeneric@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/ClippingCSS@2x.png) 2x);
 }
 
@@ -98,7 +98,7 @@
     content: image-set(url(../Images/DocumentFontLarge.png) 1x, url(../Images/DocumentFontLarge@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/DocumentCSSLarge@2x.png) 2x);
 }
 
     content: image-set(url(../Images/ClippingGenericLarge.png) 1x, url(../Images/ClippingGenericLarge@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/ClippingCSSLarge@2x.png) 2x);
 }
 
index 7b1d610..aa74c68 100644 (file)
@@ -244,7 +244,7 @@ WI.ResourceSidebarPanel = class ResourceSidebarPanel extends WI.NavigationSideba
                 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))
index dde30e7..0ff6f6f 100644 (file)
@@ -552,7 +552,7 @@ WI.SourcesNavigationSidebarPanel = class SourcesNavigationSidebarPanel extends W
                 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))
index ab9add5..0adc227 100644 (file)
@@ -421,7 +421,7 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS
         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 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS
 
             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
index f98f63c..c2627b0 100644 (file)
@@ -61,15 +61,15 @@ WI.StyleOriginView = class StyleOriginView
 
                 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 @@ WI.StyleOriginView = class StyleOriginView
                 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");
 
index e9796ea..f04ad01 100644 (file)
@@ -295,8 +295,8 @@ WI.TextResourceContentView = class TextResourceContentView extends WI.ResourceCo
         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.