Web Inspector: Audit: remove experimental setting
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Jan 2019 21:49:03 +0000 (21:49 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Jan 2019 21:49:03 +0000 (21:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193743
<rdar://problem/28234022>

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Setting.js:
(WI.Setting):
(WI.Setting.localStorageKey): Added.
(WI.Setting.migrateValue):
Drive-by: add the localStorage key prefix to the key passed into `WI.Setting.migrateValue`.
* UserInterface/Base/Main.js:
(WI.loaded):

* UserInterface/Views/AuditTabContentView.js:
(WI.AuditTabContentView.isTabAllowed):

* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

* Localizations/en.lproj/localizedStrings.js:

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js
Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js

index ee56505..5ae32ce 100644 (file)
@@ -1,5 +1,30 @@
 2019-01-25  Devin Rousso  <drousso@apple.com>
 
+        Web Inspector: Audit: remove experimental setting
+        https://bugs.webkit.org/show_bug.cgi?id=193743
+        <rdar://problem/28234022>
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Base/Setting.js:
+        (WI.Setting):
+        (WI.Setting.localStorageKey): Added.
+        (WI.Setting.migrateValue):
+        Drive-by: add the localStorage key prefix to the key passed into `WI.Setting.migrateValue`.
+
+        * UserInterface/Base/Main.js:
+        (WI.loaded):
+
+        * UserInterface/Views/AuditTabContentView.js:
+        (WI.AuditTabContentView.isTabAllowed):
+
+        * UserInterface/Views/SettingsTabContentView.js:
+        (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
+
+        * Localizations/en.lproj/localizedStrings.js:
+
+2019-01-25  Devin Rousso  <drousso@apple.com>
+
         Web Inspector: show uncaught exception view for unhandled promise rejections
         https://bugs.webkit.org/show_bug.cgi?id=193832
 
index 14150cd..b4962b8 100644 (file)
@@ -133,7 +133,6 @@ localizedStrings["Attributes"] = "Attributes";
 localizedStrings["Audit"] = "Audit";
 localizedStrings["Audit Error: %s"] = "Audit Error: %s";
 localizedStrings["Audit Warning: %s"] = "Audit Warning: %s";
-localizedStrings["Audit:"] = "Audit:";
 localizedStrings["Audits"] = "Audits";
 localizedStrings["Author Stylesheet"] = "Author Stylesheet";
 localizedStrings["Auto Increment"] = "Auto Increment";
@@ -361,7 +360,6 @@ localizedStrings["Element is the root element"] = "Element is the root element";
 localizedStrings["Element may overlap another compositing element"] = "Element may overlap another compositing element";
 localizedStrings["Element overlaps other compositing element"] = "Element overlaps other compositing element";
 localizedStrings["Elements"] = "Elements";
-localizedStrings["Enable Audit Tab"] = "Enable Audit Tab";
 localizedStrings["Enable Breakpoint"] = "Enable Breakpoint";
 localizedStrings["Enable Breakpoints"] = "Enable Breakpoints";
 localizedStrings["Enable Computed Style Cascades"] = "Enable Computed Style Cascades";
index 71cb8ed..e8cad52 100644 (file)
@@ -148,6 +148,7 @@ WI.loaded = function()
         WI.TimelineTabContentView.Type,
         WI.StorageTabContentView.Type,
         WI.CanvasTabContentView.Type,
+        WI.AuditTabContentView.Type,
         WI.ConsoleTabContentView.Type,
     ]);
     this._selectedTabIndexSetting = new WI.Setting("selected-tab-index", 0);
index 8c42268..9a9e68e 100644 (file)
@@ -49,7 +49,7 @@ WI.AuditTabContentView = class AuditTabContentView extends WI.ContentBrowserTabC
 
     static isTabAllowed()
     {
-        return !!window.RuntimeAgent && WI.settings.experimentalEnableAuditTab.value;
+        return WI.sharedApp.debuggableType === WI.DebuggableType.Web;
     }
 
     // Public
index d123dc0..f5f815b 100644 (file)
@@ -264,9 +264,6 @@ WI.SettingsTabContentView = class SettingsTabContentView extends WI.TabContentVi
             experimentalSettingsView.addSeparator();
         }
 
-        experimentalSettingsView.addSetting(WI.UIString("Audit:"), WI.settings.experimentalEnableAuditTab, WI.UIString("Enable Audit Tab"));
-        experimentalSettingsView.addSeparator();
-
         experimentalSettingsView.addSetting(WI.UIString("User Interface:"), WI.settings.experimentalEnableNewTabBar, WI.UIString("Enable New Tab Bar"));
         experimentalSettingsView.addSeparator();
 
@@ -277,8 +274,6 @@ WI.SettingsTabContentView = class SettingsTabContentView extends WI.TabContentVi
             let newTabs = WI._openTabsSetting.value.slice();
             if (!initialValues.get(WI.settings.experimentalEnableLayersTab) && window.LayerTreeAgent && WI.settings.experimentalEnableLayersTab.value)
                 newTabs.push(WI.LayersTabContentView.Type);
-            if (!initialValues.get(WI.settings.experimentalEnableAuditTab) && WI.settings.experimentalEnableAuditTab.value)
-                newTabs.push(WI.AuditTabContentView.Type);
             WI._openTabsSetting.value = newTabs;
 
             InspectorFrontendHost.reopen();
@@ -296,7 +291,6 @@ WI.SettingsTabContentView = class SettingsTabContentView extends WI.TabContentVi
 
         listenForChange(WI.settings.experimentalEnableComputedStyleCascades);
         listenForChange(WI.settings.experimentalEnableLayersTab);
-        listenForChange(WI.settings.experimentalEnableAuditTab);
         listenForChange(WI.settings.experimentalEnableNewTabBar);
 
         this.addSettingsView(experimentalSettingsView);