WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-193743-20190123160346.patch (text/plain), 8.22 KB, created by
Devin Rousso
on 2019-01-23 16:03:47 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-01-23 16:03:47 PST
Size:
8.22 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 2c0371f0c1bf89256cf6a19d28e32783ba97d03f..0cd19025cc359f57a456611d54c3b6fd899b370b 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,28 @@ >+2019-01-23 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 NOBODY (OOPS!). >+ >+ * 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): Deleted. >+ >+ * UserInterface/Views/SettingsTabContentView.js: >+ (WI.SettingsTabContentView.prototype._createExperimentalSettingsView): >+ >+ * Localizations/en.lproj/localizedStrings.js: >+ > 2019-01-23 Devin Rousso <drousso@apple.com> > > WebInspector: Confusingly nested events in the timeline for Mutation Observers >diff --git a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >index a6ac3b2ca2d6546e686146245cb351a03b66c5ed..32e21122b29fba49f13bd25388e33c4e56548011 100644 >--- a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >+++ b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >@@ -132,7 +132,6 @@ localizedStrings["Attribute Modified"] = "Attribute Modified"; > localizedStrings["Attributes"] = "Attributes"; > localizedStrings["Audit"] = "Audit"; > localizedStrings["Audit error: %s"] = "Audit error: %s"; >-localizedStrings["Audit:"] = "Audit:"; > localizedStrings["Audits"] = "Audits"; > localizedStrings["Author Stylesheet"] = "Author Stylesheet"; > localizedStrings["Auto Increment"] = "Auto Increment"; >@@ -357,7 +356,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"; >diff --git a/Source/WebInspectorUI/UserInterface/Base/Main.js b/Source/WebInspectorUI/UserInterface/Base/Main.js >index 81b06dd502e8ae5793ca26cc1745f07fc2eb3e6a..e6e778a5f49f251441b79cb7bfcd3dee878f0f2e 100644 >--- a/Source/WebInspectorUI/UserInterface/Base/Main.js >+++ b/Source/WebInspectorUI/UserInterface/Base/Main.js >@@ -146,6 +146,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); >diff --git a/Source/WebInspectorUI/UserInterface/Base/Setting.js b/Source/WebInspectorUI/UserInterface/Base/Setting.js >index c9d5140f19148e1320abb07cdbf107d92cf68499..17c67e1b8bcf76f0c9e8b7370a936a9dc2982903 100644 >--- a/Source/WebInspectorUI/UserInterface/Base/Setting.js >+++ b/Source/WebInspectorUI/UserInterface/Base/Setting.js >@@ -37,23 +37,30 @@ WI.Setting = class Setting extends WI.Object > > this._name = name; > >- let inspectionLevel = InspectorFrontendHost ? InspectorFrontendHost.inspectionLevel() : 1; >- let levelString = inspectionLevel > 1 ? "-" + inspectionLevel : ""; >- this._localStorageKey = `com.apple.WebInspector${levelString}.${name}`; >+ this._localStorageKey = WI.Setting.localStorageKey(this._name); > this._defaultValue = defaultValue; > } > > // Static > >+ static localStorageKey(name) >+ { >+ let inspectionLevel = InspectorFrontendHost ? InspectorFrontendHost.inspectionLevel() : 1; >+ let levelString = inspectionLevel > 1 ? "-" + inspectionLevel : ""; >+ return `com.apple.WebInspector${levelString}.${name}`; >+ } >+ > static migrateValue(key) > { >+ let localStorageKey = WI.Setting.localStorageKey(key); >+ > let value = undefined; >- if (!window.InspectorTest && window.localStorage && key in window.localStorage) { >+ if (!window.InspectorTest && window.localStorage && localStorageKey in window.localStorage) { > try { >- value = JSON.parse(window.localStorage[key]); >+ value = JSON.parse(window.localStorage[localStorageKey]); > } catch { } > >- window.localStorage.removeItem(key); >+ window.localStorage.removeItem(localStorageKey); > } > return value; > } >@@ -148,7 +155,6 @@ WI.settings = { > experimentalEnableComputedStyleCascades: new WI.Setting("experimental-enable-computed-style-cascades", false), > experimentalEnableLayersTab: new WI.Setting("experimental-enable-layers-tab", false), > experimentalEnableNewTabBar: new WI.Setting("experimental-enable-new-tab-bar", false), >- experimentalEnableAuditTab: new WI.Setting("experimental-enable-audit-tab", false), > > // DebugUI > autoLogProtocolMessages: new WI.Setting("auto-collect-protocol-messages", false), >diff --git a/Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js b/Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js >index 8c4226823c14a46788775b85ec6ccdbf3333dac6..d596a4dad9c48768d8a693adf4000178df66287c 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js >@@ -47,11 +47,6 @@ WI.AuditTabContentView = class AuditTabContentView extends WI.ContentBrowserTabC > }; > } > >- static isTabAllowed() >- { >- return !!window.RuntimeAgent && WI.settings.experimentalEnableAuditTab.value; >- } >- > // Public > > get type() >diff --git a/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js b/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >index d123dc00b75c6e96dfe4415e7274274aeb1a82e1..f5f815b2a4181ea0cc0b3cac52bf9b355d2f0508 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >@@ -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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193743
:
359967
|
360151