Web Inspector: Styles: refactor properties/allProperties/visibleProperties/allVisible...
authornvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2019 01:46:01 +0000 (01:46 +0000)
committernvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2019 01:46:01 +0000 (01:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193615

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Remove unused visibleProperties.

Rename:
- properties to enabledProperties;
- allProperties to properties;
- allVisibleProperties to visibleProperties.

* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype._prependSemicolonIfNeeded):
(WI.CSSProperty):
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration):
(WI.CSSStyleDeclaration.prototype.get enabledProperties):
(WI.CSSStyleDeclaration.prototype.get properties):
(WI.CSSStyleDeclaration.prototype.propertyForName):
(WI.CSSStyleDeclaration.prototype.newBlankProperty):
(WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
(WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
(WI.DOMNodeStyles.prototype._markOverriddenProperties):
(WI.DOMNodeStyles.prototype._associateRelatedProperties):
(WI.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
(WI.DOMNodeStyles):
* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype._computePropertyTraces):
* UserInterface/Views/ComputedStyleSection.js:
(WI.ComputedStyleSection.prototype.get propertiesToRender):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.updateStatus):

LayoutTests:

Rename:
- properties to enabledProperties;
- allProperties to properties.

* inspector/css/css-property-expected.txt:
* inspector/css/css-property.html:
* inspector/css/force-page-appearance.html:
* inspector/css/matched-style-properties.html:
* inspector/css/modify-css-property.html:
* inspector/css/shadow-scoped-style.html:

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

17 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/css/css-property-expected.txt
LayoutTests/inspector/css/css-property.html
LayoutTests/inspector/css/force-page-appearance.html
LayoutTests/inspector/css/matched-style-properties.html
LayoutTests/inspector/css/modify-css-property.html
LayoutTests/inspector/css/shadow-scoped-style.html
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/CSSProperty.js
Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js
Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js
Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js
Source/WebInspectorUI/UserInterface/Views/ComputedStyleSection.js
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js
Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js
Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js

index 18cbf30..aae3ca8 100644 (file)
@@ -1,3 +1,21 @@
+2019-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
+
+        Web Inspector: Styles: refactor properties/allProperties/visibleProperties/allVisibleProperties
+        https://bugs.webkit.org/show_bug.cgi?id=193615
+
+        Reviewed by Devin Rousso.
+
+        Rename:
+        - properties to enabledProperties;
+        - allProperties to properties.
+
+        * inspector/css/css-property-expected.txt:
+        * inspector/css/css-property.html:
+        * inspector/css/force-page-appearance.html:
+        * inspector/css/matched-style-properties.html:
+        * inspector/css/modify-css-property.html:
+        * inspector/css/shadow-scoped-style.html:
+
 2019-01-22  Sihui Liu  <sihui_liu@apple.com>
 
         Layout test storage/indexeddb/open-during-transaction-private.html is failing
index 7b7d402..af85013 100644 (file)
@@ -51,6 +51,6 @@ PASS: "background-repeat-y" has the text "".
 PASS: "background-repeat-y" has the _text (private) "".
 
 -- Running test case: CSSProperty.prototype.remove
-PASS: The removed property should no longer be in allProperties array.
+PASS: The removed property should no longer be in properties array.
 PASS: The second property should shift and become the first.
 
index 0ce1bff..51d8ebd 100644 (file)
@@ -16,7 +16,7 @@ function test() {
                 if (rule.selectorText !== "div#x")
                     continue;
 
-                for (let property of rule.style.properties) {
+                for (let property of rule.style.enabledProperties) {
                     switch (property.name) {
                     case "background-repeat":
                         InspectorTest.expectThat(property.valid, `"${property.name}" is a valid property.`);
@@ -42,7 +42,7 @@ function test() {
                 if (rule.selectorText !== "div#x")
                     continue;
 
-                for (let property of rule.style.properties) {
+                for (let property of rule.style.enabledProperties) {
                     switch (property.name) {
                     case "background-repeat":
                     case "background-repeat-x":
@@ -68,7 +68,7 @@ function test() {
                 if (rule.selectorText !== "div#x")
                     continue;
 
-                for (let property of rule.style.properties) {
+                for (let property of rule.style.enabledProperties) {
                     switch (property.name) {
                     case "background-repeat":
                     case "background-repeat-x":
@@ -94,7 +94,7 @@ function test() {
                 if (rule.selectorText !== "div#x")
                     continue;
 
-                for (let property of rule.style.properties) {
+                for (let property of rule.style.enabledProperties) {
                     switch (property.name) {
                     case "background-repeat":
                     case "background-repeat-x":
@@ -118,7 +118,7 @@ function test() {
                 if (rule.selectorText !== "div#x")
                     continue;
 
-                for (let property of rule.style.allProperties) {
+                for (let property of rule.style.properties) {
                     switch (property.name) {
                     case "background-repeat":
                     case "background-repeat-x":
@@ -145,7 +145,7 @@ function test() {
                 if (rule.selectorText !== "div#x")
                     continue;
 
-                for (let property of rule.style.allProperties) {
+                for (let property of rule.style.properties) {
                     switch (property.name) {
                     case "background-repeat":
                     case "background-repeat-x":
@@ -176,7 +176,7 @@ function test() {
                 // synthesize a value for the CSSProperty if it is falsy.  This is used for cases
                 // where a shorthand property is written in the style, since the longhand properties
                 // (with corresponding values) are still sent to the frontend.
-                for (let property of rule.style.properties) {
+                for (let property of rule.style.enabledProperties) {
                     switch (property.name) {
                     case "background-repeat":
                         InspectorTest.expectEqual(property.text, "background-repeat: repeat;", `"${property.name}" has the text "background-repeat: repeat;".`);
@@ -210,14 +210,14 @@ function test() {
                 if (rule.selectorText !== "div#x")
                     continue;
 
-                let propertiesLength = rule.style.allProperties.length;
-                let firstProperty = rule.style.allProperties[0];
-                let secondProperty = rule.style.allProperties[1];
+                let propertiesLength = rule.style.properties.length;
+                let firstProperty = rule.style.properties[0];
+                let secondProperty = rule.style.properties[1];
 
-                rule.style.allProperties[0].remove();
+                rule.style.properties[0].remove();
 
-                InspectorTest.expectEqual(rule.style.allProperties.length, propertiesLength - 1, "The removed property should no longer be in allProperties array.");
-                InspectorTest.expectEqual(rule.style.allProperties[0], secondProperty, "The second property should shift and become the first.");
+                InspectorTest.expectEqual(rule.style.properties.length, propertiesLength - 1, "The removed property should no longer be in properties array.");
+                InspectorTest.expectEqual(rule.style.properties[0], secondProperty, "The second property should shift and become the first.");
             }
 
             resolve();
index 178b4c0..aaa561c 100644 (file)
@@ -14,7 +14,7 @@ function test() {
 
     let getProperty = (propertyName) => {
         let styleDeclaration = nodeStyles.computedStyle;
-        for (let property of styleDeclaration.properties) {
+        for (let property of styleDeclaration.enabledProperties) {
             if (property.name === propertyName)
                 return property;
         }
index b2e69de..b5d8c10 100644 (file)
@@ -40,8 +40,8 @@ function test() {
             if (rule.type !== WI.CSSStyleSheet.Type.Author)
                 continue;
 
-            for (var j = 0; j < rule.style.properties.length; ++j) {
-                var property = rule.style.properties[j];
+            for (var j = 0; j < rule.style.enabledProperties.length; ++j) {
+                var property = rule.style.enabledProperties[j];
 
                 if (property.anonymous)
                     continue;
index 5226658..c181702 100644 (file)
@@ -29,7 +29,7 @@ function test() {
 
             let getProperty = (propertyName) => {
                 let styleDeclaration = getMatchedStyleDeclaration();
-                for (let property of styleDeclaration.properties) {
+                for (let property of styleDeclaration.enabledProperties) {
                     if (property.name === propertyName)
                         return property;
                 }
@@ -64,7 +64,7 @@ function test() {
 
             let getProperty = (propertyName) => {
                 let styleDeclaration = getMatchedStyleDeclaration();
-                for (let property of styleDeclaration.properties) {
+                for (let property of styleDeclaration.enabledProperties) {
                     if (property.name === propertyName)
                         return property;
                 }
@@ -107,7 +107,7 @@ function test() {
 
             let getProperty = (propertyName) => {
                 let styleDeclaration = getInlineStyleDeclaration();
-                for (let property of styleDeclaration.properties) {
+                for (let property of styleDeclaration.enabledProperties) {
                     if (property.name === propertyName)
                         return property;
                 }
@@ -153,7 +153,7 @@ function test() {
 
             let getProperty = (propertyName) => {
                 let styleDeclaration = getMatchedStyleDeclaration();
-                for (let property of styleDeclaration.allProperties) {
+                for (let property of styleDeclaration.properties) {
                     if (property.name === propertyName)
                         return property;
                 }
@@ -200,7 +200,7 @@ function test() {
 
             let getProperty = (propertyName) => {
                 let styleDeclaration = getMatchedStyleDeclaration();
-                for (let property of styleDeclaration.allProperties) {
+                for (let property of styleDeclaration.properties) {
                     if (property.name === propertyName)
                         return property;
                 }
index e4dc2db..284b815 100644 (file)
@@ -13,7 +13,7 @@ function test()
 
     function generateCSSRuleString(style) {
         let styleText = style.selectorText + " {\n";
-        for (let property of style.properties) {
+        for (let property of style.enabledProperties) {
             if (property.anonymous)
                 continue;
 
index 67cdda3..78e34aa 100644 (file)
@@ -1,3 +1,47 @@
+2019-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
+
+        Web Inspector: Styles: refactor properties/allProperties/visibleProperties/allVisibleProperties
+        https://bugs.webkit.org/show_bug.cgi?id=193615
+
+        Reviewed by Devin Rousso.
+
+        Remove unused visibleProperties.
+
+        Rename:
+        - properties to enabledProperties;
+        - allProperties to properties;
+        - allVisibleProperties to visibleProperties.
+
+        * UserInterface/Models/CSSProperty.js:
+        (WI.CSSProperty.prototype._prependSemicolonIfNeeded):
+        (WI.CSSProperty):
+        * UserInterface/Models/CSSStyleDeclaration.js:
+        (WI.CSSStyleDeclaration):
+        (WI.CSSStyleDeclaration.prototype.get enabledProperties):
+        (WI.CSSStyleDeclaration.prototype.get properties):
+        (WI.CSSStyleDeclaration.prototype.propertyForName):
+        (WI.CSSStyleDeclaration.prototype.newBlankProperty):
+        (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
+        (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
+        * UserInterface/Models/DOMNodeStyles.js:
+        (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
+        (WI.DOMNodeStyles.prototype._markOverriddenProperties):
+        (WI.DOMNodeStyles.prototype._associateRelatedProperties):
+        (WI.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
+        (WI.DOMNodeStyles):
+        * UserInterface/Views/BoxModelDetailsSectionRow.js:
+        (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
+        * UserInterface/Views/ComputedStyleDetailsPanel.js:
+        (WI.ComputedStyleDetailsPanel.prototype._computePropertyTraces):
+        * UserInterface/Views/ComputedStyleSection.js:
+        (WI.ComputedStyleSection.prototype.get propertiesToRender):
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
+        * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
+        (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
+        * UserInterface/Views/SpreadsheetStyleProperty.js:
+        (WI.SpreadsheetStyleProperty.prototype.updateStatus):
+
 2019-01-22  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Network Table appears broken after filter - rows look collapsed
index 4ba36ef..172a134 100644 (file)
@@ -392,7 +392,7 @@ WI.CSSProperty = class CSSProperty extends WI.Object
     _prependSemicolonIfNeeded()
     {
         for (let i = this.index - 1; i >= 0; --i) {
-            let property = this._ownerStyle.allProperties[i];
+            let property = this._ownerStyle.properties[i];
             if (!property.enabled)
                 continue;
 
index 62f1140..1ddc3ff 100644 (file)
@@ -44,8 +44,9 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object
         this._pendingProperties = [];
         this._propertyNameMap = {};
 
-        this._allProperties = [];
-        this._allVisibleProperties = null;
+        this._properties = [];
+        this._enabledProperties = [];
+        this._visibleProperties = null;
 
         this.update(text, properties, styleSheetTextRange, {dontFireEvents: true});
     }
@@ -114,18 +115,17 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object
         var oldText = this._text;
 
         this._text = text;
-        this._properties = properties.filter((property) => property.enabled);
-        this._allProperties = properties;
+        this._properties = properties;
+        this._enabledProperties = properties.filter((property) => property.enabled);
 
         this._styleSheetTextRange = styleSheetTextRange;
         this._propertyNameMap = {};
 
-        delete this._visibleProperties;
-        this._allVisibleProperties = null;
+        this._visibleProperties = null;
 
         var editable = this.editable;
 
-        for (let property of this._allProperties) {
+        for (let property of this._properties) {
             property.ownerStyle = this;
 
             // Store the property in a map if we aren't editable. This
@@ -144,7 +144,7 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object
         for (var i = 0; i < oldProperties.length; ++i) {
             var oldProperty = oldProperties[i];
 
-            if (!this._properties.includes(oldProperty)) {
+            if (!this._enabledProperties.includes(oldProperty)) {
                 // Clear the index, since it is no longer valid.
                 oldProperty.index = NaN;
 
@@ -161,9 +161,9 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object
             return;
 
         var addedProperties = [];
-        for (var i = 0; i < this._properties.length; ++i) {
-            if (!oldProperties.includes(this._properties[i]))
-                addedProperties.push(this._properties[i]);
+        for (var i = 0; i < this._enabledProperties.length; ++i) {
+            if (!oldProperties.includes(this._enabledProperties[i]))
+                addedProperties.push(this._enabledProperties[i]);
         }
 
         // Don't fire the event if there is text and it hasn't changed.
@@ -220,20 +220,12 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object
         this._nodeStyles.changeStyleText(this, text);
     }
 
-    get properties()
+    get enabledProperties()
     {
-        return this._properties;
+        return this._enabledProperties;
     }
 
-    get allProperties() { return this._allProperties; }
-
-    get allVisibleProperties()
-    {
-        if (!this._allVisibleProperties)
-            this._allVisibleProperties = this._allProperties.filter((property) => !!property.styleDeclarationTextRange);
-
-        return this._allVisibleProperties;
-    }
+    get properties() { return this._properties; }
 
     get visibleProperties()
     {
@@ -293,7 +285,7 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object
 
         var bestMatchProperty = null;
 
-        findMatch(this._properties);
+        findMatch(this._enabledProperties);
 
         if (bestMatchProperty)
             return bestMatchProperty;
@@ -314,11 +306,6 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object
         return newProperty;
     }
 
-    hasProperties()
-    {
-        return !!this._properties.length;
-    }
-
     newBlankProperty(propertyIndex)
     {
         let text, name, value, priority, overridden, implicit, anonymous;
@@ -328,11 +315,11 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object
 
         let property = new WI.CSSProperty(propertyIndex, text, name, value, priority, enabled, overridden, implicit, anonymous, valid, styleSheetTextRange);
 
-        this._allProperties.insertAtIndex(property, propertyIndex);
-        for (let index = propertyIndex + 1; index < this._allProperties.length; index++)
-            this._allProperties[index].index = index;
+        this._properties.insertAtIndex(property, propertyIndex);
+        for (let index = propertyIndex + 1; index < this._properties.length; index++)
+            this._properties[index].index = index;
 
-        this.update(this._text, this._allProperties, this._styleSheetTextRange, {dontFireEvents: true, suppressLock: true});
+        this.update(this._text, this._properties, this._styleSheetTextRange, {dontFireEvents: true, suppressLock: true});
 
         return property;
     }
@@ -340,14 +327,14 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object
     shiftPropertiesAfter(cssProperty, lineDelta, columnDelta, propertyWasRemoved)
     {
         // cssProperty.index could be set to NaN by WI.CSSStyleDeclaration.prototype.update.
-        let realIndex = this._allProperties.indexOf(cssProperty);
+        let realIndex = this._properties.indexOf(cssProperty);
         if (realIndex === -1)
             return;
 
         let endLine = cssProperty.styleSheetTextRange.endLine;
 
-        for (let i = realIndex + 1; i < this._allProperties.length; i++) {
-            let property = this._allProperties[i];
+        for (let i = realIndex + 1; i < this._properties.length; i++) {
+            let property = this._properties[i];
 
             if (property._styleSheetTextRange) {
                 if (property.styleSheetTextRange.startLine === endLine) {
@@ -362,10 +349,10 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object
         }
 
         if (propertyWasRemoved)
-            this._allProperties.splice(realIndex, 1);
+            this._properties.splice(realIndex, 1);
 
         // Invalidate cached properties.
-        this._allVisibleProperties = null;
+        this._visibleProperties = null;
     }
 
     // Protected
@@ -382,10 +369,10 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object
         if (index < 0)
             return this._styleSheetTextRange.collapseToStart();
 
-        if (index >= this.allVisibleProperties.length)
+        if (index >= this.visibleProperties.length)
             return this._styleSheetTextRange.collapseToEnd();
 
-        let property = this.allVisibleProperties[index];
+        let property = this.visibleProperties[index];
         return property.styleSheetTextRange.collapseToEnd();
     }
 };
index f44b056..16cf2ff 100644 (file)
@@ -536,7 +536,7 @@ WI.DOMNodeStyles = class DOMNodeStyles extends WI.Object
 
         if (styleDeclaration) {
             // Use propertyForName when the index is NaN since propertyForName is fast in that case.
-            var property = isNaN(index) ? styleDeclaration.propertyForName(name, true) : styleDeclaration.properties[index];
+            var property = isNaN(index) ? styleDeclaration.propertyForName(name, true) : styleDeclaration.enabledProperties[index];
 
             // Reuse a property if the index and name matches. Otherwise it is a different property
             // and should be created from scratch. This works in the simple cases where only existing
@@ -880,7 +880,7 @@ WI.DOMNodeStyles = class DOMNodeStyles extends WI.Object
 
         for (var i = 0; i < styles.length; ++i) {
             var style = styles[i];
-            var properties = style.properties;
+            var properties = style.enabledProperties;
 
             for (var j = 0; j < properties.length; ++j) {
                 var property = properties[j];
@@ -922,7 +922,7 @@ WI.DOMNodeStyles = class DOMNodeStyles extends WI.Object
     _associateRelatedProperties(styles, propertyNameToEffectiveProperty)
     {
         for (var i = 0; i < styles.length; ++i) {
-            var properties = styles[i].properties;
+            var properties = styles[i].enabledProperties;
 
             var knownShorthands = {};
 
@@ -979,7 +979,7 @@ WI.DOMNodeStyles = class DOMNodeStyles extends WI.Object
     _isPropertyFoundInMatchingRules(propertyName)
     {
         return this._orderedStyles.some((style) => {
-            return style.properties.some((property) => property.name === propertyName);
+            return style.enabledProperties.some((property) => property.name === propertyName);
         });
     }
 };
index 9441b2a..e8b9388 100644 (file)
@@ -200,7 +200,7 @@ WI.BoxModelDetailsSectionRow = class BoxModelDetailsSectionRow extends WI.Detail
 
         this._boxElements = [];
 
-        if (!style.hasProperties()) {
+        if (style.enabledProperties.length === 0) {
             this.showEmptyMessage();
             return;
         }
index fa6903f..fe0c520 100644 (file)
@@ -166,7 +166,7 @@ WI.ComputedStyleDetailsPanel = class ComputedStyleDetailsPanel extends WI.StyleD
     {
         let result = new Map();
         for (let rule of orderedDeclarations) {
-            for (let property of rule.allProperties) {
+            for (let property of rule.properties) {
                 let properties = result.get(property.name);
                 if (!properties) {
                     properties = [];
index a207220..486fa31 100644 (file)
@@ -125,9 +125,9 @@ WI.ComputedStyleSection = class ComputedStyleSection extends WI.View
             return properties;
 
         if (this._style._styleSheetTextRange)
-            properties = this._style.allVisibleProperties;
+            properties = this._style.visibleProperties;
         else
-            properties = this._style.allProperties;
+            properties = this._style.properties;
 
         properties.sort((a, b) => a.name.extendedLocaleCompare(b.name));
 
index 2411bfe..52d494a 100644 (file)
@@ -222,9 +222,9 @@ WI.SpreadsheetCSSStyleDeclarationEditor = class SpreadsheetCSSStyleDeclarationEd
             return properties;
 
         if (this._style._styleSheetTextRange)
-            properties = this._style.allVisibleProperties;
+            properties = this._style.visibleProperties;
         else
-            properties = this._style.allProperties;
+            properties = this._style.properties;
 
         if (this._sortPropertiesByName)
             properties.sort((a, b) => a.name.extendedLocaleCompare(b.name));
index d8f0a5a..3f99aa0 100644 (file)
@@ -236,7 +236,7 @@ WI.SpreadsheetRulesStyleDetailsPanel = class SpreadsheetRulesStyleDetailsPanel e
 
             section.addEventListener(WI.SpreadsheetCSSStyleDeclarationSection.Event.FilterApplied, this._handleSectionFilterApplied, this);
 
-            if (this._newRuleSelector === style.selectorText && !style.hasProperties())
+            if (this._newRuleSelector === style.selectorText && style.enabledProperties.length === 0)
                 section.startEditingRuleSelector();
 
             this.addSubview(section);
index 8529fa3..611d816 100644 (file)
@@ -247,7 +247,7 @@ WI.SpreadsheetStyleProperty = class SpreadsheetStyleProperty extends WI.Object
         let duplicatePropertyExistsBelow = (cssProperty) => {
             let propertyFound = false;
 
-            for (let property of this._property.ownerStyle.properties) {
+            for (let property of this._property.ownerStyle.enabledProperties) {
                 if (property === cssProperty)
                     propertyFound = true;
                 else if (property.name === cssProperty.name && propertyFound)