WebKit Bugzilla
Attachment 360504 Details for
Bug 193983
: Web Inspector: Styles: enable computed style cascades by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch.txt (text/plain), 9.99 KB, created by
Nikita Vasilyev
on 2019-01-29 15:04:25 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Nikita Vasilyev
Created:
2019-01-29 15:04:25 PST
Size:
9.99 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 1acf60b9568..df5bb59daba 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,31 @@ >+2019-01-29 Nikita Vasilyev <nvasilyev@apple.com> >+ >+ Web Inspector: Styles: enable computed style cascades by default >+ https://bugs.webkit.org/show_bug.cgi?id=193983 >+ <rdar://problem/47645821> >+ >+ Reviewed by Matt Baker. >+ >+ * Localizations/en.lproj/localizedStrings.js: >+ * UserInterface/Base/Setting.js: >+ * UserInterface/Views/ComputedStyleDetailsPanel.css: >+ (.computed-style-properties): >+ (.computed-style-properties .property .go-to-arrow): >+ (.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): >+ (.details-section.computed-style-properties > .content): >+ (@media (prefers-color-scheme: dark)): >+ (.computed-with-traces .computed-style-properties): Deleted. >+ (.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): Deleted. >+ (.computed-with-traces .details-section.computed-style-properties > .content): Deleted. >+ (.computed-with-traces .computed-style-properties .property .go-to-arrow): Deleted. >+ * UserInterface/Views/ComputedStyleDetailsPanel.js: >+ (WI.ComputedStyleDetailsPanel.prototype.refresh): >+ (WI.ComputedStyleDetailsPanel.prototype.initialLayout): >+ * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js: >+ (WI.ComputedStyleDetailsSidebarPanel): >+ * UserInterface/Views/SettingsTabContentView.js: >+ (WI.SettingsTabContentView.prototype._createExperimentalSettingsView): >+ > 2019-01-28 Joseph Pecoraro <pecoraro@apple.com> > > Web Inspector: Remove unnecessary promise rejection handlers now that we use the global onunhandledrejection handler >diff --git a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >index a84690dbbff..f3c8bafd71a 100644 >--- a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >+++ b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >@@ -372,7 +372,6 @@ localizedStrings["Elements"] = "Elements"; > localizedStrings["Enable Breakpoint"] = "Enable Breakpoint"; > localizedStrings["Enable Breakpoints"] = "Enable Breakpoints"; > localizedStrings["Enable Changes Panel"] = "Enable Changes Panel"; >-localizedStrings["Enable Computed Style Cascades"] = "Enable Computed Style Cascades"; > localizedStrings["Enable Event Listener"] = "Enable Event Listener"; > localizedStrings["Enable Layers Tab"] = "Enable Layers Tab"; > localizedStrings["Enable New Tab Bar"] = "Enable New Tab Bar"; >diff --git a/Source/WebInspectorUI/UserInterface/Base/Setting.js b/Source/WebInspectorUI/UserInterface/Base/Setting.js >index 1173fc812ff..a85b16978f9 100644 >--- a/Source/WebInspectorUI/UserInterface/Base/Setting.js >+++ b/Source/WebInspectorUI/UserInterface/Base/Setting.js >@@ -152,7 +152,6 @@ WI.settings = { > zoomFactor: new WI.Setting("zoom-factor", 1), > > // Experimental >- experimentalEnableComputedStyleCascades: new WI.Setting("experimental-enable-computed-style-cascades", false), > experimentalEnableChangesPanel: new WI.Setting("experimental-enable-changes-panel", false), > experimentalEnableLayersTab: new WI.Setting("experimental-enable-layers-tab", false), > experimentalEnableNewTabBar: new WI.Setting("experimental-enable-new-tab-bar", false), >diff --git a/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.css b/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.css >index 48b7e4a0ef9..8deec21303b 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.css >+++ b/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.css >@@ -27,11 +27,15 @@ > background-color: var(--background-color); > } > >+.computed-style-properties { >+ --disclosure-button-size: 15px; >+} >+ > .computed-style-properties .property .go-to-arrow { > display: none; > position: absolute; >- width: 12px; >- height: 12px; >+ width: var(--disclosure-button-size); >+ height: var(--disclosure-button-size); > vertical-align: text-bottom; > } > >@@ -39,25 +43,16 @@ > display: initial; > } > >-.computed-with-traces .computed-style-properties { >- --disclosure-button-size: 15px; >-} >- >-.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content) { >+.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content) { > background-color: hsl(0, 0%, 97%); > } > >-.computed-with-traces .details-section.computed-style-properties > .content { >+.details-section.computed-style-properties > .content { > font: 12px -webkit-system-font, sans-serif; > } > >-.computed-with-traces .computed-style-properties .property .go-to-arrow { >- width: var(--disclosure-button-size); >- height: var(--disclosure-button-size); >-} >- > @media (prefers-color-scheme: dark) { >- .computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content) { >+ .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content) { > background-color: var(--background-color); > } > } >diff --git a/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js b/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js >index fe0c520a187..1f311656b8d 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js >@@ -45,9 +45,7 @@ WI.ComputedStyleDetailsPanel = class ComputedStyleDetailsPanel extends WI.StyleD > return; > } > >- if (WI.settings.experimentalEnableComputedStyleCascades.value) >- this._computedStyleSection.styleTraces = this._computePropertyTraces(this.nodeStyles.uniqueOrderedStyles); >- >+ this._computedStyleSection.styleTraces = this._computePropertyTraces(this.nodeStyles.uniqueOrderedStyles); > this._computedStyleSection.style = this.nodeStyles.computedStyle; > > this._variablesTextEditor.style = this.nodeStyles.computedStyle; >@@ -103,17 +101,9 @@ WI.ComputedStyleDetailsPanel = class ComputedStyleDetailsPanel extends WI.StyleD > this._computedStyleShowAllCheckbox.addEventListener("change", this._computedStyleShowAllCheckboxValueChanged.bind(this)); > computedStyleShowAllLabel.appendChild(this._computedStyleShowAllCheckbox); > >- if (WI.settings.experimentalEnableComputedStyleCascades.value) { >- this._computedStyleSection = new WI.ComputedStyleSection(this); >- this._computedStyleSection.propertyVisibilityMode = WI.ComputedStyleSection.PropertyVisibilityMode.HideVariables; >- this._computedStyleSection.addEventListener(WI.ComputedStyleSection.Event.FilterApplied, this._handleEditorFilterApplied, this); >- } else { >- this._computedStyleSection = new WI.SpreadsheetCSSStyleDeclarationEditor(this); >- this._computedStyleSection.propertyVisibilityMode = WI.SpreadsheetCSSStyleDeclarationEditor.PropertyVisibilityMode.HideVariables; >- this._computedStyleSection.sortPropertiesByName = true; >- this._computedStyleSection.addEventListener(WI.SpreadsheetCSSStyleDeclarationEditor.Event.FilterApplied, this._handleEditorFilterApplied, this); >- } >- >+ this._computedStyleSection = new WI.ComputedStyleSection(this); >+ this._computedStyleSection.propertyVisibilityMode = WI.ComputedStyleSection.PropertyVisibilityMode.HideVariables; >+ this._computedStyleSection.addEventListener(WI.ComputedStyleSection.Event.FilterApplied, this._handleEditorFilterApplied, this); > this._computedStyleSection.showsImplicitProperties = this._computedStyleShowAllSetting.value; > this._computedStyleSection.alwaysShowPropertyNames = ["display", "width", "height"]; > this._computedStyleSection.hideFilterNonMatchingProperties = true; >diff --git a/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsSidebarPanel.js >index 9010ceb8d66..f53a1690ece 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsSidebarPanel.js >@@ -28,8 +28,5 @@ WI.ComputedStyleDetailsSidebarPanel = class ComputedStyleDetailsSidebarPanel ext > constructor() > { > super("style-computed", WI.UIString("Computed"), WI.ComputedStyleDetailsPanel); >- >- if (WI.settings.experimentalEnableComputedStyleCascades.value) >- this.element.classList.add("computed-with-traces"); > } > }; >diff --git a/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js b/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >index cd23b4e4e99..b440d77a7a0 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >@@ -255,7 +255,6 @@ WI.SettingsTabContentView = class SettingsTabContentView extends WI.TabContentVi > > if (window.CSSAgent) { > let group = experimentalSettingsView.addGroup(WI.UIString("Styles Sidebar:")); >- group.addSetting(WI.settings.experimentalEnableComputedStyleCascades, WI.UIString("Enable Computed Style Cascades")); > group.addSetting(WI.settings.experimentalEnableChangesPanel, WI.UIString("Enable Changes Panel")); > experimentalSettingsView.addSeparator(); > } >@@ -290,7 +289,6 @@ WI.SettingsTabContentView = class SettingsTabContentView extends WI.TabContentVi > }); > } > >- listenForChange(WI.settings.experimentalEnableComputedStyleCascades); > listenForChange(WI.settings.experimentalEnableChangesPanel); > listenForChange(WI.settings.experimentalEnableLayersTab); > listenForChange(WI.settings.experimentalEnableNewTabBar);
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 193983
:
360502
| 360504