Changeset 106809 in webkit


Ignore:
Timestamp:
Feb 6, 2012 8:26:58 AM (12 years ago)
Author:
apavlov@chromium.org
Message:

Web Inspector: Remove unused disabledComputedProperties from methods in StylesSidebarPane
https://bugs.webkit.org/show_bug.cgi?id=77876

Reviewed by Pavel Feldman.

  • inspector/front-end/StylesSidebarPane.js:

(WebInspector.StylesSidebarPane.prototype._refreshUpdate):
(WebInspector.StylesSidebarPane.prototype._rebuildUpdate):
(WebInspector.StylesSidebarPane.prototype._markUsedProperties):
(WebInspector.StylesSidebarPane.prototype._refreshSectionsForStyleRules):
(WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
(WebInspector.StylePropertiesSection.prototype.onpopulate):
(WebInspector.ComputedStylePropertiesSection):
(WebInspector.ComputedStylePropertiesSection.prototype._isPropertyInherited):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r106808 r106809  
     12012-02-06  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Web Inspector: Remove unused disabledComputedProperties from methods in StylesSidebarPane
     4        https://bugs.webkit.org/show_bug.cgi?id=77876
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * inspector/front-end/StylesSidebarPane.js:
     9        (WebInspector.StylesSidebarPane.prototype._refreshUpdate):
     10        (WebInspector.StylesSidebarPane.prototype._rebuildUpdate):
     11        (WebInspector.StylesSidebarPane.prototype._markUsedProperties):
     12        (WebInspector.StylesSidebarPane.prototype._refreshSectionsForStyleRules):
     13        (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
     14        (WebInspector.StylePropertiesSection.prototype.onpopulate):
     15        (WebInspector.ComputedStylePropertiesSection):
     16        (WebInspector.ComputedStylePropertiesSection.prototype._isPropertyInherited):
     17
    1182012-02-06  Alexei Filippov  <alexeif@chromium.org>
    219
  • trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js

    r106560 r106809  
    334334            var styleRules = this._refreshStyleRules(this.sections[pseudoId], computedStyle);
    335335            var usedProperties = {};
    336             var disabledComputedProperties = {};
    337             this._markUsedProperties(styleRules, usedProperties, disabledComputedProperties);
    338             this._refreshSectionsForStyleRules(styleRules, usedProperties, disabledComputedProperties, editedSection);
     336            this._markUsedProperties(styleRules, usedProperties);
     337            this._refreshSectionsForStyleRules(styleRules, usedProperties, editedSection);
    339338        }
    340339        // Trace the computed style.
     
    351350        var styleRules = this._rebuildStyleRules(node, styles);
    352351        var usedProperties = {};
    353         var disabledComputedProperties = {};
    354         this._markUsedProperties(styleRules, usedProperties, disabledComputedProperties);
    355         this.sections[0] = this._rebuildSectionsForStyleRules(styleRules, usedProperties, disabledComputedProperties, 0, null);
     352        this._markUsedProperties(styleRules, usedProperties);
     353        this.sections[0] = this._rebuildSectionsForStyleRules(styleRules, usedProperties, 0, null);
    356354        var anchorElement = this.sections[0].inheritedPropertiesSeparatorElement;
    357355        // Trace the computed style.
     
    373371            }
    374372            usedProperties = {};
    375             disabledComputedProperties = {};
    376             this._markUsedProperties(styleRules, usedProperties, disabledComputedProperties);
    377             this.sections[pseudoId] = this._rebuildSectionsForStyleRules(styleRules, usedProperties, disabledComputedProperties, pseudoId, anchorElement);
     373            this._markUsedProperties(styleRules, usedProperties);
     374            this.sections[pseudoId] = this._rebuildSectionsForStyleRules(styleRules, usedProperties, pseudoId, anchorElement);
    378375        }
    379376
     
    491488    },
    492489
    493     _markUsedProperties: function(styleRules, usedProperties, disabledComputedProperties)
     490    _markUsedProperties: function(styleRules, usedProperties)
    494491    {
    495492        var priorityUsed = false;
     
    558555    },
    559556
    560     _refreshSectionsForStyleRules: function(styleRules, usedProperties, disabledComputedProperties, editedSection)
     557    _refreshSectionsForStyleRules: function(styleRules, usedProperties, editedSection)
    561558    {
    562559        // Walk the style rules and update the sections with new overloaded and used properties.
     
    565562            var section = styleRule.section;
    566563            if (styleRule.computedStyle) {
    567                 section._disabledComputedProperties = disabledComputedProperties;
    568564                section._usedProperties = usedProperties;
    569565                section.update();
     
    575571    },
    576572
    577     _rebuildSectionsForStyleRules: function(styleRules, usedProperties, disabledComputedProperties, pseudoId, anchorElement)
     573    _rebuildSectionsForStyleRules: function(styleRules, usedProperties, pseudoId, anchorElement)
    578574    {
    579575        // Make a property section for each style rule.
     
    611607
    612608            if (computedStyle)
    613                 var section = new WebInspector.ComputedStylePropertiesSection(styleRule, usedProperties, disabledComputedProperties);
     609                var section = new WebInspector.ComputedStylePropertiesSection(styleRule, usedProperties);
    614610            else
    615611                var section = new WebInspector.StylePropertiesSection(this, styleRule, editable, styleRule.isInherited, lastWasSeparator);
     
    10541050            var property = this.uniqueProperties[i];
    10551051            var disabled = property.disabled;
    1056             if (!disabled && this.disabledComputedProperties && !(property.name in this.usedProperties) && property.name in this.disabledComputedProperties)
    1057                 disabled = true;
    1058 
    10591052            var shorthand = !disabled ? property.shorthand : null;
    10601053
     
    12521245 * @extends {WebInspector.PropertiesSection}
    12531246 */
    1254 WebInspector.ComputedStylePropertiesSection = function(styleRule, usedProperties, disabledComputedProperties)
     1247WebInspector.ComputedStylePropertiesSection = function(styleRule, usedProperties)
    12551248{
    12561249    WebInspector.PropertiesSection.call(this, "");
     
    12591252    this.styleRule = styleRule;
    12601253    this._usedProperties = usedProperties;
    1261     this._disabledComputedProperties = disabledComputedProperties;
    12621254    this._alwaysShowComputedProperties = { "display": true, "height": true, "width": true };
    12631255    this.computedStyle = true;
     
    12741266    _isPropertyInherited: function(propertyName)
    12751267    {
    1276         return !(propertyName in this._usedProperties) && !(propertyName in this._alwaysShowComputedProperties) && !(propertyName in this._disabledComputedProperties);
     1268        return !(propertyName in this._usedProperties) && !(propertyName in this._alwaysShowComputedProperties);
    12771269    },
    12781270
Note: See TracChangeset for help on using the changeset viewer.