Title: [117958] trunk
- Revision
- 117958
- Author
- [email protected]
- Date
- 2012-05-22 05:22:10 -0700 (Tue, 22 May 2012)
Log Message
Web Inspector: [Styles] Odd synthetic shorthands may appear in the style
https://bugs.webkit.org/show_bug.cgi?id=87081
Reviewed by Vsevolod Vlasov.
Source/WebCore:
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertiesSection.prototype.onpopulate):
LayoutTests:
* inspector/elements/elements-panel-styles-expected.txt:
* inspector/elements/resources/elements-panel-styles.css:
(.foo):
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (117957 => 117958)
--- trunk/LayoutTests/ChangeLog 2012-05-22 12:14:41 UTC (rev 117957)
+++ trunk/LayoutTests/ChangeLog 2012-05-22 12:22:10 UTC (rev 117958)
@@ -1,3 +1,14 @@
+2012-05-22 Alexander Pavlov <[email protected]>
+
+ Web Inspector: [Styles] Odd synthetic shorthands may appear in the style
+ https://bugs.webkit.org/show_bug.cgi?id=87081
+
+ Reviewed by Vsevolod Vlasov.
+
+ * inspector/elements/elements-panel-styles-expected.txt:
+ * inspector/elements/resources/elements-panel-styles.css:
+ (.foo):
+
2012-05-22 Hayato Ito <[email protected]>
Fix crashes when a mouse points a <svg> element in shadow DOM subtree.
Modified: trunk/LayoutTests/inspector/elements/elements-panel-styles-expected.txt (117957 => 117958)
--- trunk/LayoutTests/inspector/elements/elements-panel-styles-expected.txt 2012-05-22 12:14:41 UTC (rev 117957)
+++ trunk/LayoutTests/inspector/elements/elements-panel-styles-expected.txt 2012-05-22 12:22:10 UTC (rev 117958)
@@ -10,7 +10,7 @@
border-top-right-radius: 5px;
.foo - 5px elements-panel-styles.css:14
color: blue;
- .foo, .foo::before - blue elements-panel-styles.css:21
+ .foo, .foo::before - blue elements-panel-styles.css:22
/-- overloaded --/ .foo - black elements-panel-styles.css:14
display: none;
element.style - none
@@ -26,7 +26,7 @@
margin-bottom: 2px;
.foo - 2px elements-panel-styles.css:14
margin-left: 0px;
- .foo - 0px elements-panel-styles.css:14
+ .foo - 1px elements-panel-styles.css:14
margin-right: 0px;
.foo - 0px elements-panel-styles.css:14
margin-top: 10px;
@@ -44,21 +44,22 @@
font-style: italic !important;
[expanded]
-.foo { (elements-panel-styles.css:39)
+.foo { (elements-panel-styles.css:40)
[expanded]
-.foo, .foo::before { (elements-panel-styles.css:21)
+.foo, .foo::before { (elements-panel-styles.css:22)
content: "[before Foo]";
color: blue;
[expanded]
.foo { (elements-panel-styles.css:14)
/-- overloaded --/ color: black;
+margin-left: 1px;
margin: 10px 0 2px;
+ margin-left: 1px;
margin-top: 10px;
margin-right: 0px;
margin-bottom: 2px;
- margin-left: 0px;
border-radius: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
@@ -88,26 +89,26 @@
======== Pseudo ::before element ========
[expanded]
-.foo::before { (elements-panel-styles.css:43)
+.foo::before { (elements-panel-styles.css:44)
[expanded]
-.foo::before { (elements-panel-styles.css:26)
+.foo::before { (elements-panel-styles.css:27)
color: red;
[expanded]
-.foo, .foo::before { (elements-panel-styles.css:21)
+.foo, .foo::before { (elements-panel-styles.css:22)
content: "[before Foo]";
/-- overloaded --/ color: blue;
======== Pseudo ::after element ========
[expanded]
-.foo::after { (elements-panel-styles.css:34)
+.foo::after { (elements-panel-styles.css:35)
font-family: courier;
content: "[after Foo 2]";
[expanded]
-.foo::after { (elements-panel-styles.css:30)
+.foo::after { (elements-panel-styles.css:31)
/-- overloaded --/ content: "[after Foo]";
color: green;
Modified: trunk/LayoutTests/inspector/elements/resources/elements-panel-styles.css (117957 => 117958)
--- trunk/LayoutTests/inspector/elements/resources/elements-panel-styles.css 2012-05-22 12:14:41 UTC (rev 117957)
+++ trunk/LayoutTests/inspector/elements/resources/elements-panel-styles.css 2012-05-22 12:22:10 UTC (rev 117958)
@@ -13,6 +13,7 @@
.foo {
color: black;
+ margin-left: 1px;
margin: 10px 0 2px;
border-radius: 5px;
font-style: normal !important;
Modified: trunk/Source/WebCore/ChangeLog (117957 => 117958)
--- trunk/Source/WebCore/ChangeLog 2012-05-22 12:14:41 UTC (rev 117957)
+++ trunk/Source/WebCore/ChangeLog 2012-05-22 12:22:10 UTC (rev 117958)
@@ -1,3 +1,13 @@
+2012-05-22 Alexander Pavlov <[email protected]>
+
+ Web Inspector: [Styles] Odd synthetic shorthands may appear in the style
+ https://bugs.webkit.org/show_bug.cgi?id=87081
+
+ Reviewed by Vsevolod Vlasov.
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertiesSection.prototype.onpopulate):
+
2012-05-22 Hayato Ito <[email protected]>
Fix crashes when a mouse points a <svg> element in shadow DOM subtree.
Modified: trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js (117957 => 117958)
--- trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2012-05-22 12:14:41 UTC (rev 117957)
+++ trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2012-05-22 12:22:10 UTC (rev 117958)
@@ -1140,16 +1140,16 @@
// Create property tree elements.
for (var i = 0; i < this.uniqueProperties.length; ++i) {
var property = this.uniqueProperties[i];
- var disabled = property.disabled;
- var shorthand = !disabled ? property.shorthand : null;
+ var shorthand = !property.disabled && !property.inactive ? property.shorthand : null;
- if (shorthand && shorthand in handledProperties)
- continue;
-
if (shorthand) {
- property = style.getLiveProperty(shorthand);
- if (!property)
+ if (shorthand in handledProperties)
+ continue;
+ // We should only create synthetic shorthands if they are not present in the style source (i.e. we are dealing with a source-less style).
+ if (!style.getLiveProperty(shorthand))
property = new WebInspector.CSSProperty(style, style.allProperties.length, shorthand, style.getShorthandValue(shorthand), style.getShorthandPriority(shorthand), "style", true, true, "", undefined);
+ else
+ shorthand = null;
}
// BUG71275: Never show purely style-based properties in editable rules.
@@ -1157,6 +1157,8 @@
continue;
var isShorthand = !!(property.isLive && (shorthand || shorthandNames[property.name]));
+ if (isShorthand && (property.name in handledProperties))
+ continue;
var inherited = this.isPropertyInherited(property.name);
var overloaded = this.isPropertyOverloaded(property.name, isShorthand);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes