Changeset 251883 in webkit
- Timestamp:
- Oct 31, 2019 3:00:22 PM (4 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r251871 r251883 1 2019-10-31 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: REGRESSION(r251038): Elements: Computed: variables are shown in the Properties section instead of in the Variables section 4 https://bugs.webkit.org/show_bug.cgi?id=203668 5 6 Reviewed by Matt Baker. 7 8 * UserInterface/Views/ComputedStyleDetailsPanel.js: 9 (WI.ComputedStyleDetailsPanel.prototype.initialLayout): 10 * UserInterface/Views/ComputedStyleSection.js: 11 (WI.ComputedStyleSection): 12 (WI.ComputedStyleSection.prototype.set propertyVisibilityMode): Added. 13 (WI.ComputedStyleSection.prototype.get propertiesToRender): 14 Reintroduce the `propertyVisibilityMode` concept to `WI.ComputedStyleSection` so that the 15 Computed details panel can prevent CSS variables from being shown in the Properites section. 16 17 * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: 18 (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get propertiesToRender): 19 Replace `variable` getter with `isVariable` to match r251038. 20 1 21 2019-10-31 Devin Rousso <drousso@apple.com> 2 22 -
trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js
r251038 r251883 105 105 this._computedStyleSection.addEventListener(WI.ComputedStyleSection.Event.FilterApplied, this._handleEditorFilterApplied, this); 106 106 this._computedStyleSection.showsImplicitProperties = this._computedStyleShowAllSetting.value; 107 this._computedStyleSection.propertyVisibilityMode = WI.ComputedStyleSection.PropertyVisibilityMode.HideVariables; 107 108 this._computedStyleSection.showsShorthandsInsteadOfLonghands = this._computedStylePreferShorthandsSetting.value; 108 109 this._computedStyleSection.alwaysShowPropertyNames = ["display", "width", "height"]; -
trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleSection.js
r251038 r251883 41 41 this._showsShorthandsInsteadOfLonghands = false; 42 42 this._alwaysShowPropertyNames = new Set; 43 this._propertyVisibilityMode = WI.ComputedStyleSection.PropertyVisibilityMode.ShowAll; 43 44 this._hideFilterNonMatchingProperties = false; 44 45 this._filterText = null; … … 105 106 { 106 107 this._alwaysShowPropertyNames = new Set(propertyNames); 108 109 this.needsLayout(); 110 } 111 112 set propertyVisibilityMode(propertyVisibilityMode) 113 { 114 if (this._propertyVisibilityMode === propertyVisibilityMode) 115 return; 116 117 this._propertyVisibilityMode = propertyVisibilityMode; 107 118 108 119 this.needsLayout(); … … 132 143 properties.sort((a, b) => a.name.extendedLocaleCompare(b.name)); 133 144 145 let hideVariables = this._propertyVisibilityMode === ComputedStyleSection.PropertyVisibilityMode.HideVariables; 146 let hideNonVariables = this._propertyVisibilityMode === ComputedStyleSection.PropertyVisibilityMode.HideNonVariables; 147 134 148 return properties.filter((property) => { 135 149 if (this._alwaysShowPropertyNames.has(property.canonicalName)) … … 143 157 return false; 144 158 } else if (property.isShorthand) 159 return false; 160 161 if (property.isVariable && hideVariables) 162 return false; 163 164 if (!property.isVariable && hideNonVariables) 145 165 return false; 146 166 … … 272 292 273 293 WI.ComputedStyleSection.StyleClassName = "computed-style-section"; 294 295 WI.ComputedStyleSection.PropertyVisibilityMode = { 296 ShowAll: Symbol("variable-visibility-show-all"), 297 HideVariables: Symbol("variable-visibility-hide-variables"), 298 HideNonVariables: Symbol("variable-visibility-hide-non-variables"), 299 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js
r248537 r251883 234 234 properties.sort((a, b) => a.name.extendedLocaleCompare(b.name)); 235 235 236 let hideVariables = this._propertyVisibilityMode === SpreadsheetCSSStyleDeclarationEditor.PropertyVisibilityMode.HideVariables; 237 let hideNonVariables = this._propertyVisibilityMode === SpreadsheetCSSStyleDeclarationEditor.PropertyVisibilityMode.HideNonVariables; 238 236 239 return properties.filter((property) => { 237 if (!property. variable && this._propertyVisibilityMode === WI.SpreadsheetCSSStyleDeclarationEditor.PropertyVisibilityMode.HideNonVariables)240 if (!property.isVariable && hideNonVariables) 238 241 return false; 239 242 240 if (property. variable && this._propertyVisibilityMode === WI.SpreadsheetCSSStyleDeclarationEditor.PropertyVisibilityMode.HideVariables)243 if (property.isVariable && hideVariables) 241 244 return false; 242 245
Note: See TracChangeset
for help on using the changeset viewer.