Changeset 106809 in webkit
- Timestamp:
- Feb 6, 2012 8:26:58 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106808 r106809 1 2012-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 1 18 2012-02-06 Alexei Filippov <alexeif@chromium.org> 2 19 -
trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js
r106560 r106809 334 334 var styleRules = this._refreshStyleRules(this.sections[pseudoId], computedStyle); 335 335 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); 339 338 } 340 339 // Trace the computed style. … … 351 350 var styleRules = this._rebuildStyleRules(node, styles); 352 351 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); 356 354 var anchorElement = this.sections[0].inheritedPropertiesSeparatorElement; 357 355 // Trace the computed style. … … 373 371 } 374 372 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); 378 375 } 379 376 … … 491 488 }, 492 489 493 _markUsedProperties: function(styleRules, usedProperties , disabledComputedProperties)490 _markUsedProperties: function(styleRules, usedProperties) 494 491 { 495 492 var priorityUsed = false; … … 558 555 }, 559 556 560 _refreshSectionsForStyleRules: function(styleRules, usedProperties, disabledComputedProperties,editedSection)557 _refreshSectionsForStyleRules: function(styleRules, usedProperties, editedSection) 561 558 { 562 559 // Walk the style rules and update the sections with new overloaded and used properties. … … 565 562 var section = styleRule.section; 566 563 if (styleRule.computedStyle) { 567 section._disabledComputedProperties = disabledComputedProperties;568 564 section._usedProperties = usedProperties; 569 565 section.update(); … … 575 571 }, 576 572 577 _rebuildSectionsForStyleRules: function(styleRules, usedProperties, disabledComputedProperties,pseudoId, anchorElement)573 _rebuildSectionsForStyleRules: function(styleRules, usedProperties, pseudoId, anchorElement) 578 574 { 579 575 // Make a property section for each style rule. … … 611 607 612 608 if (computedStyle) 613 var section = new WebInspector.ComputedStylePropertiesSection(styleRule, usedProperties , disabledComputedProperties);609 var section = new WebInspector.ComputedStylePropertiesSection(styleRule, usedProperties); 614 610 else 615 611 var section = new WebInspector.StylePropertiesSection(this, styleRule, editable, styleRule.isInherited, lastWasSeparator); … … 1054 1050 var property = this.uniqueProperties[i]; 1055 1051 var disabled = property.disabled; 1056 if (!disabled && this.disabledComputedProperties && !(property.name in this.usedProperties) && property.name in this.disabledComputedProperties)1057 disabled = true;1058 1059 1052 var shorthand = !disabled ? property.shorthand : null; 1060 1053 … … 1252 1245 * @extends {WebInspector.PropertiesSection} 1253 1246 */ 1254 WebInspector.ComputedStylePropertiesSection = function(styleRule, usedProperties , disabledComputedProperties)1247 WebInspector.ComputedStylePropertiesSection = function(styleRule, usedProperties) 1255 1248 { 1256 1249 WebInspector.PropertiesSection.call(this, ""); … … 1259 1252 this.styleRule = styleRule; 1260 1253 this._usedProperties = usedProperties; 1261 this._disabledComputedProperties = disabledComputedProperties;1262 1254 this._alwaysShowComputedProperties = { "display": true, "height": true, "width": true }; 1263 1255 this.computedStyle = true; … … 1274 1266 _isPropertyInherited: function(propertyName) 1275 1267 { 1276 return !(propertyName in this._usedProperties) && !(propertyName in this._alwaysShowComputedProperties) && !(propertyName in this._disabledComputedProperties);1268 return !(propertyName in this._usedProperties) && !(propertyName in this._alwaysShowComputedProperties); 1277 1269 }, 1278 1270
Note: See TracChangeset
for help on using the changeset viewer.