Title: [251883] trunk/Source/WebInspectorUI
- Revision
- 251883
- Author
- drou...@apple.com
- Date
- 2019-10-31 15:00:22 -0700 (Thu, 31 Oct 2019)
Log Message
Web Inspector: REGRESSION(r251038): Elements: Computed: variables are shown in the Properties section instead of in the Variables section
https://bugs.webkit.org/show_bug.cgi?id=203668
Reviewed by Matt Baker.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.initialLayout):
* UserInterface/Views/ComputedStyleSection.js:
(WI.ComputedStyleSection):
(WI.ComputedStyleSection.prototype.set propertyVisibilityMode): Added.
(WI.ComputedStyleSection.prototype.get propertiesToRender):
Reintroduce the `propertyVisibilityMode` concept to `WI.ComputedStyleSection` so that the
Computed details panel can prevent CSS variables from being shown in the Properites section.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.get propertiesToRender):
Replace `variable` getter with `isVariable` to match r251038.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (251882 => 251883)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-10-31 21:53:18 UTC (rev 251882)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-10-31 22:00:22 UTC (rev 251883)
@@ -1,5 +1,25 @@
2019-10-31 Devin Rousso <drou...@apple.com>
+ Web Inspector: REGRESSION(r251038): Elements: Computed: variables are shown in the Properties section instead of in the Variables section
+ https://bugs.webkit.org/show_bug.cgi?id=203668
+
+ Reviewed by Matt Baker.
+
+ * UserInterface/Views/ComputedStyleDetailsPanel.js:
+ (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
+ * UserInterface/Views/ComputedStyleSection.js:
+ (WI.ComputedStyleSection):
+ (WI.ComputedStyleSection.prototype.set propertyVisibilityMode): Added.
+ (WI.ComputedStyleSection.prototype.get propertiesToRender):
+ Reintroduce the `propertyVisibilityMode` concept to `WI.ComputedStyleSection` so that the
+ Computed details panel can prevent CSS variables from being shown in the Properites section.
+
+ * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get propertiesToRender):
+ Replace `variable` getter with `isVariable` to match r251038.
+
+2019-10-31 Devin Rousso <drou...@apple.com>
+
Web Inspector: DOMDebugger: Node Removed breakpoints should fire whenever the node is removed from the main DOM tree, not just when it's removed from it's parent
https://bugs.webkit.org/show_bug.cgi?id=203349
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js (251882 => 251883)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js 2019-10-31 21:53:18 UTC (rev 251882)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js 2019-10-31 22:00:22 UTC (rev 251883)
@@ -104,6 +104,7 @@
this._computedStyleSection = new WI.ComputedStyleSection(this);
this._computedStyleSection.addEventListener(WI.ComputedStyleSection.Event.FilterApplied, this._handleEditorFilterApplied, this);
this._computedStyleSection.showsImplicitProperties = this._computedStyleShowAllSetting.value;
+ this._computedStyleSection.propertyVisibilityMode = WI.ComputedStyleSection.PropertyVisibilityMode.HideVariables;
this._computedStyleSection.showsShorthandsInsteadOfLonghands = this._computedStylePreferShorthandsSetting.value;
this._computedStyleSection.alwaysShowPropertyNames = ["display", "width", "height"];
this._computedStyleSection.hideFilterNonMatchingProperties = true;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleSection.js (251882 => 251883)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleSection.js 2019-10-31 21:53:18 UTC (rev 251882)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleSection.js 2019-10-31 22:00:22 UTC (rev 251883)
@@ -40,6 +40,7 @@
this._showsImplicitProperties = false;
this._showsShorthandsInsteadOfLonghands = false;
this._alwaysShowPropertyNames = new Set;
+ this._propertyVisibilityMode = WI.ComputedStyleSection.PropertyVisibilityMode.ShowAll;
this._hideFilterNonMatchingProperties = false;
this._filterText = null;
}
@@ -108,6 +109,16 @@
this.needsLayout();
}
+ set propertyVisibilityMode(propertyVisibilityMode)
+ {
+ if (this._propertyVisibilityMode === propertyVisibilityMode)
+ return;
+
+ this._propertyVisibilityMode = propertyVisibilityMode;
+
+ this.needsLayout();
+ }
+
set hideFilterNonMatchingProperties(value)
{
if (value === this._hideFilterNonMatchingProperties)
@@ -131,6 +142,9 @@
properties.sort((a, b) => a.name.extendedLocaleCompare(b.name));
+ let hideVariables = this._propertyVisibilityMode === ComputedStyleSection.PropertyVisibilityMode.HideVariables;
+ let hideNonVariables = this._propertyVisibilityMode === ComputedStyleSection.PropertyVisibilityMode.HideNonVariables;
+
return properties.filter((property) => {
if (this._alwaysShowPropertyNames.has(property.canonicalName))
return true;
@@ -144,6 +158,12 @@
} else if (property.isShorthand)
return false;
+ if (property.isVariable && hideVariables)
+ return false;
+
+ if (!property.isVariable && hideNonVariables)
+ return false;
+
return true;
});
}
@@ -271,3 +291,9 @@
};
WI.ComputedStyleSection.StyleClassName = "computed-style-section";
+
+WI.ComputedStyleSection.PropertyVisibilityMode = {
+ ShowAll: Symbol("variable-visibility-show-all"),
+ HideVariables: Symbol("variable-visibility-hide-variables"),
+ HideNonVariables: Symbol("variable-visibility-hide-non-variables"),
+};
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js (251882 => 251883)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js 2019-10-31 21:53:18 UTC (rev 251882)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js 2019-10-31 22:00:22 UTC (rev 251883)
@@ -233,11 +233,14 @@
if (this._sortPropertiesByName)
properties.sort((a, b) => a.name.extendedLocaleCompare(b.name));
+ let hideVariables = this._propertyVisibilityMode === SpreadsheetCSSStyleDeclarationEditor.PropertyVisibilityMode.HideVariables;
+ let hideNonVariables = this._propertyVisibilityMode === SpreadsheetCSSStyleDeclarationEditor.PropertyVisibilityMode.HideNonVariables;
+
return properties.filter((property) => {
- if (!property.variable && this._propertyVisibilityMode === WI.SpreadsheetCSSStyleDeclarationEditor.PropertyVisibilityMode.HideNonVariables)
+ if (!property.isVariable && hideNonVariables)
return false;
- if (property.variable && this._propertyVisibilityMode === WI.SpreadsheetCSSStyleDeclarationEditor.PropertyVisibilityMode.HideVariables)
+ if (property.isVariable && hideVariables)
return false;
return !property.implicit || this._showsImplicitProperties || this._alwaysShowPropertyNames.has(property.canonicalName);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes