Changeset 65806 in webkit
- Timestamp:
- Aug 23, 2010 5:49:37 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r65804 r65806 1 2010-08-23 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: element's css: pseudo-class locations 6 https://bugs.webkit.org/show_bug.cgi?id=44344 7 8 Also contains a drive-by fix for 44301 (gray out read-only). 9 10 * inspector/front-end/StylesSidebarPane.js: 11 (WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback): 12 (WebInspector.StylesSidebarPane.prototype.update): 13 (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): 14 (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): 15 (WebInspector.StylePropertiesSection): 16 1 17 2010-08-23 Sheriff Bot <webkit.review.bot@gmail.com> 2 18 -
trunk/WebCore/inspector/front-end/StylesSidebarPane.js
r62630 r65806 144 144 if (computedStyle) 145 145 this._refreshUpdate(node, computedStyle, editedSection); 146 } ;146 } 147 147 148 148 if (refresh) … … 167 167 this.bodyElement.removeChildren(); 168 168 this._computedStylePane.bodyElement.removeChildren(); 169 169 170 var styleRules = this._rebuildStyleRules(node, styles); 170 171 var usedProperties = {}; … … 172 173 this._markUsedProperties(styleRules, usedProperties, disabledComputedProperties); 173 174 this.sections[0] = this._rebuildSectionsForStyleRules(styleRules, usedProperties, disabledComputedProperties, 0); 175 var anchorElement = this.sections[0].inheritedPropertiesSeparatorElement; 174 176 175 177 for (var i = 0; i < styles.pseudoElements.length; ++i) { … … 190 192 disabledComputedProperties = {}; 191 193 this._markUsedProperties(styleRules, usedProperties, disabledComputedProperties); 192 this.sections[pseudoId] = this._rebuildSectionsForStyleRules(styleRules, usedProperties, disabledComputedProperties, pseudoId );194 this.sections[pseudoId] = this._rebuildSectionsForStyleRules(styleRules, usedProperties, disabledComputedProperties, pseudoId, anchorElement); 193 195 } 194 196 }, … … 243 245 var rule = WebInspector.CSSStyleDeclaration.parseRule(styles.matchedCSSRules[i]); 244 246 styleRules.push({ style: rule.style, selectorText: rule.selectorText, parentStyleSheet: rule.parentStyleSheet, rule: rule }); 245 }246 247 // Collect used properties first in order to identify inherited ones.248 var userPropertyNames = {};249 for (var i = 0; i < styleRules.length; ++i) {250 var styleRule = styleRules[i];251 if (styleRule.computedStyle || styleRule.isStyleSeparator)252 continue;253 var style = styleRule.style;254 for (var j = 0; j < style.length; ++j)255 userPropertyNames[style[j]] = true;256 247 } 257 248 … … 403 394 }, 404 395 405 _rebuildSectionsForStyleRules: function(styleRules, usedProperties, disabledComputedProperties, pseudoId )396 _rebuildSectionsForStyleRules: function(styleRules, usedProperties, disabledComputedProperties, pseudoId, anchorElement) 406 397 { 407 398 // Make a property section for each style rule. … … 417 408 separatorElement.appendChild(document.createTextNode(WebInspector.UIString("Inherited from") + " ")); 418 409 separatorElement.appendChild(link); 410 if (!sections.inheritedPropertiesSeparatorElement) 411 sections.inheritedPropertiesSeparatorElement = separatorElement; 419 412 } else if ("pseudoId" in styleRule) { 420 413 var pseudoName = WebInspector.StylesSidebarPane.PseudoIdNames[styleRule.pseudoId]; … … 425 418 } else 426 419 separatorElement.textContent = styleRule.text; 427 this.bodyElement. appendChild(separatorElement);420 this.bodyElement.insertBefore(separatorElement, anchorElement); 428 421 lastWasSeparator = true; 429 422 continue; … … 446 439 lastWasSeparator = true; 447 440 } else { 448 this.bodyElement. appendChild(section.element);441 this.bodyElement.insertBefore(section.element, anchorElement); 449 442 lastWasSeparator = false; 450 443 } … … 678 671 if (this.subtitle) 679 672 this.identifier += ":" + this.subtitle; 673 674 if (!this.editable) 675 this.element.addStyleClass("read-only"); 680 676 } 681 677 -
trunk/WebCore/inspector/front-end/inspector.css
r64144 r65806 4080 4080 } 4081 4081 4082 .styles-section.read-only { 4083 background-color: rgb(240, 240, 240); 4084 } 4085 4082 4086 .styles-section .header { 4083 4087 white-space: nowrap;
Note: See TracChangeset
for help on using the changeset viewer.