[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
pfeldman at chromium.org
pfeldman at chromium.org
Wed Dec 22 12:25:45 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit ff18ba14c75fdc86a199290e07b91c9aa8eb3b0b
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Aug 23 12:49:37 2010 +0000
2010-08-23 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: element's css: pseudo-class locations
https://bugs.webkit.org/show_bug.cgi?id=44344
Also contains a drive-by fix for 44301 (gray out read-only).
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback):
(WebInspector.StylesSidebarPane.prototype.update):
(WebInspector.StylesSidebarPane.prototype._rebuildUpdate):
(WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
(WebInspector.StylePropertiesSection):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b2c4dac..28f025a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-23 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: element's css: pseudo-class locations
+ https://bugs.webkit.org/show_bug.cgi?id=44344
+
+ Also contains a drive-by fix for 44301 (gray out read-only).
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback):
+ (WebInspector.StylesSidebarPane.prototype.update):
+ (WebInspector.StylesSidebarPane.prototype._rebuildUpdate):
+ (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
+ (WebInspector.StylePropertiesSection):
+
2010-08-23 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r65803.
diff --git a/WebCore/inspector/front-end/StylesSidebarPane.js b/WebCore/inspector/front-end/StylesSidebarPane.js
index 5f5a5ad..39352a1 100644
--- a/WebCore/inspector/front-end/StylesSidebarPane.js
+++ b/WebCore/inspector/front-end/StylesSidebarPane.js
@@ -143,7 +143,7 @@ WebInspector.StylesSidebarPane.prototype = {
{
if (computedStyle)
this._refreshUpdate(node, computedStyle, editedSection);
- };
+ }
if (refresh)
WebInspector.cssModel.getComputedStyleAsync(node.id, computedStyleCallback.bind(this));
@@ -166,11 +166,13 @@ WebInspector.StylesSidebarPane.prototype = {
{
this.bodyElement.removeChildren();
this._computedStylePane.bodyElement.removeChildren();
+
var styleRules = this._rebuildStyleRules(node, styles);
var usedProperties = {};
var disabledComputedProperties = {};
this._markUsedProperties(styleRules, usedProperties, disabledComputedProperties);
this.sections[0] = this._rebuildSectionsForStyleRules(styleRules, usedProperties, disabledComputedProperties, 0);
+ var anchorElement = this.sections[0].inheritedPropertiesSeparatorElement;
for (var i = 0; i < styles.pseudoElements.length; ++i) {
var pseudoElementCSSRules = styles.pseudoElements[i];
@@ -189,7 +191,7 @@ WebInspector.StylesSidebarPane.prototype = {
usedProperties = {};
disabledComputedProperties = {};
this._markUsedProperties(styleRules, usedProperties, disabledComputedProperties);
- this.sections[pseudoId] = this._rebuildSectionsForStyleRules(styleRules, usedProperties, disabledComputedProperties, pseudoId);
+ this.sections[pseudoId] = this._rebuildSectionsForStyleRules(styleRules, usedProperties, disabledComputedProperties, pseudoId, anchorElement);
}
},
@@ -244,17 +246,6 @@ WebInspector.StylesSidebarPane.prototype = {
styleRules.push({ style: rule.style, selectorText: rule.selectorText, parentStyleSheet: rule.parentStyleSheet, rule: rule });
}
- // Collect used properties first in order to identify inherited ones.
- var userPropertyNames = {};
- for (var i = 0; i < styleRules.length; ++i) {
- var styleRule = styleRules[i];
- if (styleRule.computedStyle || styleRule.isStyleSeparator)
- continue;
- var style = styleRule.style;
- for (var j = 0; j < style.length; ++j)
- userPropertyNames[style[j]] = true;
- }
-
// Walk the node structure and identify styles with inherited properties.
var parentStyles = styles.parent;
var parentNode = node.parentNode;
@@ -402,7 +393,7 @@ WebInspector.StylesSidebarPane.prototype = {
}
},
- _rebuildSectionsForStyleRules: function(styleRules, usedProperties, disabledComputedProperties, pseudoId)
+ _rebuildSectionsForStyleRules: function(styleRules, usedProperties, disabledComputedProperties, pseudoId, anchorElement)
{
// Make a property section for each style rule.
var sections = [];
@@ -416,6 +407,8 @@ WebInspector.StylesSidebarPane.prototype = {
var link = WebInspector.panels.elements.linkifyNodeReference(styleRule.node);
separatorElement.appendChild(document.createTextNode(WebInspector.UIString("Inherited from") + " "));
separatorElement.appendChild(link);
+ if (!sections.inheritedPropertiesSeparatorElement)
+ sections.inheritedPropertiesSeparatorElement = separatorElement;
} else if ("pseudoId" in styleRule) {
var pseudoName = WebInspector.StylesSidebarPane.PseudoIdNames[styleRule.pseudoId];
if (pseudoName)
@@ -424,7 +417,7 @@ WebInspector.StylesSidebarPane.prototype = {
separatorElement.textContent = WebInspector.UIString("Pseudo element");
} else
separatorElement.textContent = styleRule.text;
- this.bodyElement.appendChild(separatorElement);
+ this.bodyElement.insertBefore(separatorElement, anchorElement);
lastWasSeparator = true;
continue;
}
@@ -445,7 +438,7 @@ WebInspector.StylesSidebarPane.prototype = {
this._computedStylePane.bodyElement.appendChild(section.element);
lastWasSeparator = true;
} else {
- this.bodyElement.appendChild(section.element);
+ this.bodyElement.insertBefore(section.element, anchorElement);
lastWasSeparator = false;
}
sections.push(section);
@@ -677,6 +670,9 @@ WebInspector.StylePropertiesSection = function(styleRule, subtitle, computedStyl
this.identifier = styleRule.selectorText;
if (this.subtitle)
this.identifier += ":" + this.subtitle;
+
+ if (!this.editable)
+ this.element.addStyleClass("read-only");
}
WebInspector.StylePropertiesSection.prototype = {
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index 8c4a2ea..384be93 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -4079,6 +4079,10 @@ a.worker-item {
border-top: 1px solid rgb(191, 191, 191);
}
+.styles-section.read-only {
+ background-color: rgb(240, 240, 240);
+}
+
.styles-section .header {
white-space: nowrap;
-webkit-background-origin: padding;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list