Title: [92192] trunk
- Revision
- 92192
- Author
- [email protected]
- Date
- 2011-08-02 08:51:31 -0700 (Tue, 02 Aug 2011)
Log Message
Web Inspector: img[width=90] or align attributes shouldnt be shown above element.style block (as they have lower specificity)
https://bugs.webkit.org/show_bug.cgi?id=65514
Reviewed by Pavel Feldman.
Source/WebCore:
* inspector/front-end/StylesSidebarPane.js:
LayoutTests:
* inspector/elements/elements-panel-styles-expected.txt:
* inspector/elements/elements-panel-styles.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (92191 => 92192)
--- trunk/LayoutTests/ChangeLog 2011-08-02 15:25:33 UTC (rev 92191)
+++ trunk/LayoutTests/ChangeLog 2011-08-02 15:51:31 UTC (rev 92192)
@@ -1,3 +1,13 @@
+2011-08-02 Alexander Pavlov <[email protected]>
+
+ Web Inspector: img[width=90] or align attributes shouldnt be shown above element.style block (as they have lower specificity)
+ https://bugs.webkit.org/show_bug.cgi?id=65514
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/elements/elements-panel-styles-expected.txt:
+ * inspector/elements/elements-panel-styles.html:
+
2011-08-01 Andrey Kosyakov <[email protected]>
Web Inspector: [Extensions API] webInspector.inspectedPage.reload() is broken
Modified: trunk/LayoutTests/inspector/elements/elements-panel-styles-expected.txt (92191 => 92192)
--- trunk/LayoutTests/inspector/elements/elements-panel-styles-expected.txt 2011-08-02 15:25:33 UTC (rev 92191)
+++ trunk/LayoutTests/inspector/elements/elements-panel-styles-expected.txt 2011-08-02 15:51:31 UTC (rev 92192)
@@ -31,6 +31,8 @@
.foo - 0px elements-panel-styles.css:14
margin-top: 10px;
.foo - 10px elements-panel-styles.css:14
+text-align: -webkit-left;
+ div[align=left] - -webkit-left
[expanded] element.style { ()
display: none;
@@ -62,6 +64,9 @@
[expanded] div { (user agent stylesheet)
/-- overloaded --/ display: block;
+[expanded] div[align=left] { ()
+text-align: -webkit-left;
+
======== Inherited from div#container ========
[expanded] #container { (elements-panel-styles.css:5)
font-family: serif;
Modified: trunk/LayoutTests/inspector/elements/elements-panel-styles.html (92191 => 92192)
--- trunk/LayoutTests/inspector/elements/elements-panel-styles.html 2011-08-02 15:25:33 UTC (rev 92191)
+++ trunk/LayoutTests/inspector/elements/elements-panel-styles.html 2011-08-02 15:51:31 UTC (rev 92192)
@@ -26,7 +26,7 @@
</p>
<div id="container">
- <div id="foo" class="foo" style="display:none">Foo</div>
+ <div id="foo" class="foo" style="display:none" align="left">Foo</div>
</div>
</body>
Modified: trunk/Source/WebCore/ChangeLog (92191 => 92192)
--- trunk/Source/WebCore/ChangeLog 2011-08-02 15:25:33 UTC (rev 92191)
+++ trunk/Source/WebCore/ChangeLog 2011-08-02 15:51:31 UTC (rev 92192)
@@ -1,3 +1,12 @@
+2011-08-02 Alexander Pavlov <[email protected]>
+
+ Web Inspector: img[width=90] or align attributes shouldnt be shown above element.style block (as they have lower specificity)
+ https://bugs.webkit.org/show_bug.cgi?id=65514
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/StylesSidebarPane.js:
+
2011-08-02 Gyuyoung Kim <[email protected]>
[EFL] Add fullscreen button to media control UI.
Modified: trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js (92191 => 92192)
--- trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2011-08-02 15:25:33 UTC (rev 92191)
+++ trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2011-08-02 15:51:31 UTC (rev 92192)
@@ -366,17 +366,7 @@
styleRules.push({ computedStyle: true, selectorText: "", style: nodeComputedStyle, editable: false });
- var styleAttributes = {};
- for (var name in styles.styleAttributes) {
- var attrStyle = { style: styles.styleAttributes[name], editable: false };
- attrStyle.selectorText = WebInspector.panels.elements.treeOutline.nodeNameToCorrectCase(node.nodeName()) + "[" + name;
- if (node.getAttribute(name))
- attrStyle.selectorText += "=" + node.getAttribute(name);
- attrStyle.selectorText += "]";
- styleRules.push(attrStyle);
- }
-
- // Show element's Style Attributes
+ // Inline style has the greatest specificity.
if (styles.inlineStyle && node.nodeType() === Node.ELEMENT_NODE) {
var inlineStyle = { selectorText: "element.style", style: styles.inlineStyle, isAttribute: true };
styleRules.push(inlineStyle);
@@ -390,6 +380,17 @@
styleRules.push({ style: rule.style, selectorText: rule.selectorText, sourceURL: rule.sourceURL, rule: rule, editable: !!(rule.style && rule.style.id) });
}
+ // Show element's Style Attributes after all rules.
+ var styleAttributes = {};
+ for (var name in styles.styleAttributes) {
+ var attrStyle = { style: styles.styleAttributes[name], editable: false };
+ attrStyle.selectorText = WebInspector.panels.elements.treeOutline.nodeNameToCorrectCase(node.nodeName()) + "[" + name;
+ if (node.getAttribute(name))
+ attrStyle.selectorText += "=" + node.getAttribute(name);
+ attrStyle.selectorText += "]";
+ styleRules.push(attrStyle);
+ }
+
// Walk the node structure and identify styles with inherited properties.
var parentNode = node.parentNode;
function insertInheritedNodeSeparator(node)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes