[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
apavlov at chromium.org
apavlov at chromium.org
Fri Jan 21 14:40:56 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 0cf84d099b626fccc9695f8dc90c8f71dfb35bc7
Author: apavlov at chromium.org <apavlov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 24 12:02:31 2010 +0000
2010-12-23 Alexander Pavlov <apavlov at chromium.org>
Reviewed by Maciej Stachowiak.
Web Inspector: CSS shorthand properties expand unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=36304
"border-radius" is a shorthand property that has a "non-standard" format and longhands, see
http://www.w3.org/TR/css3-background/#border-radius for reference. CSSParser does not use the
standard parseShorthand() or parse4Values() methods but instead a custom parseBorderRadius() method.
This method didn't use to create a ShorthandScope instance and set the m_implicitShorthand value
appropriately when adding implicit longhands, thus they were added as normal properties
found in the CSS (neither implicit, nor longhands). This is now fixed.
WebCore:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseBorderRadius):
LayoutTests:
* inspector/elements-panel-styles-expected.txt:
* inspector/resources/elements-panel-styles.css:
(.foo):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 82d5947..96da5aa 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-12-23 Alexander Pavlov <apavlov at chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Web Inspector: CSS shorthand properties expand unnecessarily
+ https://bugs.webkit.org/show_bug.cgi?id=36304
+
+ * inspector/elements-panel-styles-expected.txt:
+ * inspector/resources/elements-panel-styles.css:
+ (.foo):
+
2010-12-24 Justin Schuh <jschuh at chromium.org>
Reviewed by Darin Adler.
diff --git a/LayoutTests/inspector/elements-panel-styles-expected.txt b/LayoutTests/inspector/elements-panel-styles-expected.txt
index 32c6fce..41f343c 100644
--- a/LayoutTests/inspector/elements-panel-styles-expected.txt
+++ b/LayoutTests/inspector/elements-panel-styles-expected.txt
@@ -1,8 +1,16 @@
Tests that elements panel shows proper styles in the sidebar panel.
[expanded] ()
+border-bottom-left-radius: 5px;
+ .foo - 5px 5px elements-panel-styles.css:10
+border-bottom-right-radius: 5px;
+ .foo - 5px 5px elements-panel-styles.css:10
+border-top-left-radius: 5px;
+ .foo - 5px 5px elements-panel-styles.css:10
+border-top-right-radius: 5px;
+ .foo - 5px 5px elements-panel-styles.css:10
color: blue;
- .foo, .foo::before - blue elements-panel-styles.css:15
+ .foo, .foo::before - blue elements-panel-styles.css:16
/-- overloaded --/ .foo - black elements-panel-styles.css:10
display: none;
element.style - none
@@ -25,9 +33,9 @@ margin-top: 10px;
display: none;
======== Matched CSS Rules ========
-[expanded] .foo { (elements-panel-styles.css:33)
+[expanded] .foo { (elements-panel-styles.css:34)
-[expanded] .foo, .foo::before { (elements-panel-styles.css:15)
+[expanded] .foo, .foo::before { (elements-panel-styles.css:16)
content: "[before Foo]";
color: blue;
@@ -38,6 +46,11 @@ margin: 10px 0 2px;
margin-right: 0px;
margin-bottom: 2px;
margin-left: 0px;
+border-radius: 5px;
+ border-top-left-radius: 5px 5px;
+ border-top-right-radius: 5px 5px;
+ border-bottom-right-radius: 5px 5px;
+ border-bottom-left-radius: 5px 5px;
[expanded] div { (user agent stylesheet)
/-- overloaded --/ display: block;
@@ -53,22 +66,22 @@ font-size: 14px;
======== Pseudo ::before element ========
-[expanded] .foo::before { (elements-panel-styles.css:37)
+[expanded] .foo::before { (elements-panel-styles.css:38)
-[expanded] .foo::before { (elements-panel-styles.css:20)
+[expanded] .foo::before { (elements-panel-styles.css:21)
color: red;
-[expanded] .foo, .foo::before { (elements-panel-styles.css:15)
+[expanded] .foo, .foo::before { (elements-panel-styles.css:16)
content: "[before Foo]";
/-- overloaded --/ color: blue;
======== Pseudo ::after element ========
-[expanded] .foo::after { (elements-panel-styles.css:28)
+[expanded] .foo::after { (elements-panel-styles.css:29)
font-family: courier;
content: "[after Foo 2]";
-[expanded] .foo::after { (elements-panel-styles.css:24)
+[expanded] .foo::after { (elements-panel-styles.css:25)
/-- overloaded --/ content: "[after Foo]";
color: green;
diff --git a/LayoutTests/inspector/resources/elements-panel-styles.css b/LayoutTests/inspector/resources/elements-panel-styles.css
index 1b30663..b1b3035 100644
--- a/LayoutTests/inspector/resources/elements-panel-styles.css
+++ b/LayoutTests/inspector/resources/elements-panel-styles.css
@@ -10,6 +10,7 @@ body {
.foo {
color: black;
margin: 10px 0 2px;
+ border-radius: 5px;
}
.foo, .foo::before {
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4683aaf..c17c50c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-12-23 Alexander Pavlov <apavlov at chromium.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Web Inspector: CSS shorthand properties expand unnecessarily
+ https://bugs.webkit.org/show_bug.cgi?id=36304
+
+ "border-radius" is a shorthand property that has a "non-standard" format and longhands, see
+ http://www.w3.org/TR/css3-background/#border-radius for reference. CSSParser does not use the
+ standard parseShorthand() or parse4Values() methods but instead a custom parseBorderRadius() method.
+ This method didn't use to create a ShorthandScope instance and set the m_implicitShorthand value
+ appropriately when adding implicit longhands, thus they were added as normal properties
+ found in the CSS (neither implicit, nor longhands). This is now fixed.
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseBorderRadius):
+
2010-12-24 Justin Schuh <jschuh at chromium.org>
Reviewed by Darin Adler.
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index a36ad3c..71a4ad2 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -4561,6 +4561,7 @@ bool CSSParser::parseBorderRadius(int propId, bool important)
if (num > 9)
return false;
+ ShorthandScope scope(this, propId);
RefPtr<CSSPrimitiveValue> radii[2][4];
unsigned indexAfterSlash = 0;
@@ -4605,10 +4606,12 @@ bool CSSParser::parseBorderRadius(int propId, bool important)
} else
completeBorderRadii(radii[1]);
+ m_implicitShorthand = true;
addProperty(CSSPropertyBorderTopLeftRadius, CSSPrimitiveValue::create(Pair::create(radii[0][0].release(), radii[1][0].release())), important);
addProperty(CSSPropertyBorderTopRightRadius, CSSPrimitiveValue::create(Pair::create(radii[0][1].release(), radii[1][1].release())), important);
addProperty(CSSPropertyBorderBottomRightRadius, CSSPrimitiveValue::create(Pair::create(radii[0][2].release(), radii[1][2].release())), important);
addProperty(CSSPropertyBorderBottomLeftRadius, CSSPrimitiveValue::create(Pair::create(radii[0][3].release(), radii[1][3].release())), important);
+ m_implicitShorthand = false;
return true;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list