Commit c20916e7 authored by bdakin@apple.com's avatar bdakin@apple.com

WebCore: Fix for <rdar://problem/7264725> Re-add a vendor prefix to box-

shadow (29927)
-and corresponding-
https://bugs.webkit.org/show_bug.cgi?id=29927

Reviewed by Dan Bernstein.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::ShadowParseContext::ShadowParseContext):
(WebCore::ShadowParseContext::commitValue):
(WebCore::ShadowParseContext::commitLength):
(WebCore::ShadowParseContext::commitColor):
(WebCore::cssPropertyID):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* page/animation/AnimationBase.cpp:
(WebCore::ensurePropertyMap):

LayoutTests: Updated test results for <rdar://problem/7264725> Re-add a vendor 
prefix to box-shadow (29927)
-and corresponding-
https://bugs.webkit.org/show_bug.cgi?id=29927

Reviewed by Dan Bernstein.

* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/qt/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/qt/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 34cd2f31
2009-10-01 Beth Dakin <bdakin@apple.com>
Reviewed by Dan Bernstein.
Updated test results for <rdar://problem/7264725> Re-add a vendor
prefix to box-shadow (29927)
-and corresponding-
https://bugs.webkit.org/show_bug.cgi?id=29927
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/qt/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/qt/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:
2009-10-01 Brian Weinstein <bweinstein@apple.com> 2009-10-01 Brian Weinstein <bweinstein@apple.com>
Rubber-stamped by Adam Roben. Rubber-stamped by Adam Roben.
......
...@@ -26,7 +26,6 @@ border-top-right-radius: 0px; ...@@ -26,7 +26,6 @@ border-top-right-radius: 0px;
border-top-style: none; border-top-style: none;
border-top-width: 0px; border-top-width: 0px;
bottom: auto; bottom: auto;
box-shadow: none;
caption-side: top; caption-side: top;
clear: none; clear: none;
clip: auto; clip: auto;
...@@ -119,6 +118,7 @@ zoom: 1; ...@@ -119,6 +118,7 @@ zoom: 1;
-webkit-box-orient: horizontal; -webkit-box-orient: horizontal;
-webkit-box-pack: start; -webkit-box-pack: start;
-webkit-box-reflect: none; -webkit-box-reflect: none;
-webkit-box-shadow: none;
-webkit-box-sizing: content-box; -webkit-box-sizing: content-box;
-webkit-column-break-after: auto; -webkit-column-break-after: auto;
-webkit-column-break-before: auto; -webkit-column-break-before: auto;
......
...@@ -25,7 +25,6 @@ Computed style of an element whose parent's 'display' value is 'none': ...@@ -25,7 +25,6 @@ Computed style of an element whose parent's 'display' value is 'none':
border-top-style: solid border-top-style: solid
border-top-width: 16px border-top-width: 16px
bottom: auto bottom: auto
box-shadow: none
caption-side: top caption-side: top
clear: none clear: none
clip: auto clip: auto
...@@ -118,6 +117,7 @@ Computed style of an element whose parent's 'display' value is 'none': ...@@ -118,6 +117,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-box-orient: horizontal -webkit-box-orient: horizontal
-webkit-box-pack: start -webkit-box-pack: start
-webkit-box-reflect: none -webkit-box-reflect: none
-webkit-box-shadow: none
-webkit-box-sizing: content-box -webkit-box-sizing: content-box
-webkit-column-break-after: auto -webkit-column-break-after: auto
-webkit-column-break-before: auto -webkit-column-break-before: auto
......
...@@ -26,7 +26,6 @@ border-top-right-radius: 0px; ...@@ -26,7 +26,6 @@ border-top-right-radius: 0px;
border-top-style: none; border-top-style: none;
border-top-width: 0px; border-top-width: 0px;
bottom: auto; bottom: auto;
box-shadow: none;
caption-side: top; caption-side: top;
clear: none; clear: none;
clip: auto; clip: auto;
...@@ -118,6 +117,7 @@ zoom: 1; ...@@ -118,6 +117,7 @@ zoom: 1;
-webkit-box-orient: horizontal; -webkit-box-orient: horizontal;
-webkit-box-pack: start; -webkit-box-pack: start;
-webkit-box-reflect: none; -webkit-box-reflect: none;
-webkit-box-shadow: none;
-webkit-box-sizing: content-box; -webkit-box-sizing: content-box;
-webkit-column-break-after: auto; -webkit-column-break-after: auto;
-webkit-column-break-before: auto; -webkit-column-break-before: auto;
......
...@@ -25,7 +25,6 @@ Computed style of an element whose parent's 'display' value is 'none': ...@@ -25,7 +25,6 @@ Computed style of an element whose parent's 'display' value is 'none':
border-top-style: solid border-top-style: solid
border-top-width: 13px border-top-width: 13px
bottom: auto bottom: auto
box-shadow: none
caption-side: top caption-side: top
clear: none clear: none
clip: auto clip: auto
...@@ -117,6 +116,7 @@ Computed style of an element whose parent's 'display' value is 'none': ...@@ -117,6 +116,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-box-orient: horizontal -webkit-box-orient: horizontal
-webkit-box-pack: start -webkit-box-pack: start
-webkit-box-reflect: none -webkit-box-reflect: none
-webkit-box-shadow: none
-webkit-box-sizing: content-box -webkit-box-sizing: content-box
-webkit-column-break-after: auto -webkit-column-break-after: auto
-webkit-column-break-before: auto -webkit-column-break-before: auto
......
...@@ -26,7 +26,6 @@ border-top-right-radius: 0px; ...@@ -26,7 +26,6 @@ border-top-right-radius: 0px;
border-top-style: none; border-top-style: none;
border-top-width: 0px; border-top-width: 0px;
bottom: auto; bottom: auto;
box-shadow: none;
caption-side: top; caption-side: top;
clear: none; clear: none;
clip: auto; clip: auto;
...@@ -119,6 +118,7 @@ zoom: 1; ...@@ -119,6 +118,7 @@ zoom: 1;
-webkit-box-orient: horizontal; -webkit-box-orient: horizontal;
-webkit-box-pack: start; -webkit-box-pack: start;
-webkit-box-reflect: none; -webkit-box-reflect: none;
-webkit-box-shadow: none;
-webkit-box-sizing: content-box; -webkit-box-sizing: content-box;
-webkit-column-break-after: auto; -webkit-column-break-after: auto;
-webkit-column-break-before: auto; -webkit-column-break-before: auto;
......
...@@ -25,7 +25,6 @@ Computed style of an element whose parent's 'display' value is 'none': ...@@ -25,7 +25,6 @@ Computed style of an element whose parent's 'display' value is 'none':
border-top-style: solid border-top-style: solid
border-top-width: 16px border-top-width: 16px
bottom: auto bottom: auto
box-shadow: none
caption-side: top caption-side: top
clear: none clear: none
clip: auto clip: auto
...@@ -118,6 +117,7 @@ Computed style of an element whose parent's 'display' value is 'none': ...@@ -118,6 +117,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-box-orient: horizontal -webkit-box-orient: horizontal
-webkit-box-pack: start -webkit-box-pack: start
-webkit-box-reflect: none -webkit-box-reflect: none
-webkit-box-shadow: none
-webkit-box-sizing: content-box -webkit-box-sizing: content-box
-webkit-column-break-after: auto -webkit-column-break-after: auto
-webkit-column-break-before: auto -webkit-column-break-before: auto
......
...@@ -50,8 +50,6 @@ rect: style.getPropertyValue(border-top-width) : 0px ...@@ -50,8 +50,6 @@ rect: style.getPropertyValue(border-top-width) : 0px
rect: style.getPropertyCSSValue(border-top-width) : [object CSSPrimitiveValue] rect: style.getPropertyCSSValue(border-top-width) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(bottom) : auto rect: style.getPropertyValue(bottom) : auto
rect: style.getPropertyCSSValue(bottom) : [object CSSPrimitiveValue] rect: style.getPropertyCSSValue(bottom) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(box-shadow) : none
rect: style.getPropertyCSSValue(box-shadow) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(caption-side) : top rect: style.getPropertyValue(caption-side) : top
rect: style.getPropertyCSSValue(caption-side) : [object CSSPrimitiveValue] rect: style.getPropertyCSSValue(caption-side) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(clear) : none rect: style.getPropertyValue(clear) : none
...@@ -236,6 +234,8 @@ rect: style.getPropertyValue(-webkit-box-pack) : start ...@@ -236,6 +234,8 @@ rect: style.getPropertyValue(-webkit-box-pack) : start
rect: style.getPropertyCSSValue(-webkit-box-pack) : [object CSSPrimitiveValue] rect: style.getPropertyCSSValue(-webkit-box-pack) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-box-reflect) : none rect: style.getPropertyValue(-webkit-box-reflect) : none
rect: style.getPropertyCSSValue(-webkit-box-reflect) : [object CSSPrimitiveValue] rect: style.getPropertyCSSValue(-webkit-box-reflect) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-box-shadow) : none
rect: style.getPropertyCSSValue(-webkit-box-shadow) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-box-sizing) : content-box rect: style.getPropertyValue(-webkit-box-sizing) : content-box
rect: style.getPropertyCSSValue(-webkit-box-sizing) : [object CSSPrimitiveValue] rect: style.getPropertyCSSValue(-webkit-box-sizing) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-column-break-after) : auto rect: style.getPropertyValue(-webkit-column-break-after) : auto
...@@ -458,8 +458,6 @@ g: style.getPropertyValue(border-top-width) : 0px ...@@ -458,8 +458,6 @@ g: style.getPropertyValue(border-top-width) : 0px
g: style.getPropertyCSSValue(border-top-width) : [object CSSPrimitiveValue] g: style.getPropertyCSSValue(border-top-width) : [object CSSPrimitiveValue]
g: style.getPropertyValue(bottom) : auto g: style.getPropertyValue(bottom) : auto
g: style.getPropertyCSSValue(bottom) : [object CSSPrimitiveValue] g: style.getPropertyCSSValue(bottom) : [object CSSPrimitiveValue]
g: style.getPropertyValue(box-shadow) : none
g: style.getPropertyCSSValue(box-shadow) : [object CSSPrimitiveValue]
g: style.getPropertyValue(caption-side) : top g: style.getPropertyValue(caption-side) : top
g: style.getPropertyCSSValue(caption-side) : [object CSSPrimitiveValue] g: style.getPropertyCSSValue(caption-side) : [object CSSPrimitiveValue]
g: style.getPropertyValue(clear) : none g: style.getPropertyValue(clear) : none
...@@ -644,6 +642,8 @@ g: style.getPropertyValue(-webkit-box-pack) : start ...@@ -644,6 +642,8 @@ g: style.getPropertyValue(-webkit-box-pack) : start
g: style.getPropertyCSSValue(-webkit-box-pack) : [object CSSPrimitiveValue] g: style.getPropertyCSSValue(-webkit-box-pack) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-box-reflect) : none g: style.getPropertyValue(-webkit-box-reflect) : none
g: style.getPropertyCSSValue(-webkit-box-reflect) : [object CSSPrimitiveValue] g: style.getPropertyCSSValue(-webkit-box-reflect) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-box-shadow) : none
g: style.getPropertyCSSValue(-webkit-box-shadow) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-box-sizing) : content-box g: style.getPropertyValue(-webkit-box-sizing) : content-box
g: style.getPropertyCSSValue(-webkit-box-sizing) : [object CSSPrimitiveValue] g: style.getPropertyCSSValue(-webkit-box-sizing) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-column-break-after) : auto g: style.getPropertyValue(-webkit-column-break-after) : auto
......
2009-10-01 Beth Dakin <bdakin@apple.com>
Reviewed by Dan Bernstein.
Fix for <rdar://problem/7264725> Re-add a vendor prefix to box-
shadow (29927)
-and corresponding-
https://bugs.webkit.org/show_bug.cgi?id=29927
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::ShadowParseContext::ShadowParseContext):
(WebCore::ShadowParseContext::commitValue):
(WebCore::ShadowParseContext::commitLength):
(WebCore::ShadowParseContext::commitColor):
(WebCore::cssPropertyID):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* page/animation/AnimationBase.cpp:
(WebCore::ensurePropertyMap):
2009-10-01 Beth Dakin <bdakin@apple.com> 2009-10-01 Beth Dakin <bdakin@apple.com>
Rubber-stamped by Sam Weinig. Rubber-stamped by Sam Weinig.
...@@ -77,7 +77,6 @@ static const int computedProperties[] = { ...@@ -77,7 +77,6 @@ static const int computedProperties[] = {
CSSPropertyBorderTopStyle, CSSPropertyBorderTopStyle,
CSSPropertyBorderTopWidth, CSSPropertyBorderTopWidth,
CSSPropertyBottom, CSSPropertyBottom,
CSSPropertyBoxShadow,
CSSPropertyCaptionSide, CSSPropertyCaptionSide,
CSSPropertyClear, CSSPropertyClear,
CSSPropertyClip, CSSPropertyClip,
...@@ -171,6 +170,7 @@ static const int computedProperties[] = { ...@@ -171,6 +170,7 @@ static const int computedProperties[] = {
CSSPropertyWebkitBoxOrient, CSSPropertyWebkitBoxOrient,
CSSPropertyWebkitBoxPack, CSSPropertyWebkitBoxPack,
CSSPropertyWebkitBoxReflect, CSSPropertyWebkitBoxReflect,
CSSPropertyWebkitBoxShadow,
CSSPropertyWebkitBoxSizing, CSSPropertyWebkitBoxSizing,
CSSPropertyWebkitColumnBreakAfter, CSSPropertyWebkitColumnBreakAfter,
CSSPropertyWebkitColumnBreakBefore, CSSPropertyWebkitColumnBreakBefore,
...@@ -767,7 +767,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper ...@@ -767,7 +767,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
} }
case CSSPropertyWebkitBoxReflect: case CSSPropertyWebkitBoxReflect:
return valueForReflection(style->boxReflect()); return valueForReflection(style->boxReflect());
case CSSPropertyBoxShadow: case CSSPropertyWebkitBoxShadow:
return valueForShadow(style->boxShadow(), static_cast<CSSPropertyID>(propertyID)); return valueForShadow(style->boxShadow(), static_cast<CSSPropertyID>(propertyID));
case CSSPropertyCaptionSide: case CSSPropertyCaptionSide:
return CSSPrimitiveValue::create(style->captionSide()); return CSSPrimitiveValue::create(style->captionSide());
......
...@@ -1190,7 +1190,7 @@ bool CSSParser::parseValue(int propId, bool important) ...@@ -1190,7 +1190,7 @@ bool CSSParser::parseValue(int propId, bool important)
valid_primitive = validUnit(value, FLength, m_strict); valid_primitive = validUnit(value, FLength, m_strict);
break; break;
case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3 case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3
case CSSPropertyBoxShadow: case CSSPropertyWebkitBoxShadow:
if (id == CSSValueNone) if (id == CSSValueNone)
valid_primitive = true; valid_primitive = true;
else else
...@@ -3610,7 +3610,7 @@ struct ShadowParseContext { ...@@ -3610,7 +3610,7 @@ struct ShadowParseContext {
, allowBlur(false) , allowBlur(false)
, allowSpread(false) , allowSpread(false)
, allowColor(true) , allowColor(true)
, allowStyle(prop == CSSPropertyBoxShadow) , allowStyle(prop == CSSPropertyWebkitBoxShadow)
, allowBreak(true) , allowBreak(true)
{ {
} }
...@@ -3642,7 +3642,7 @@ struct ShadowParseContext { ...@@ -3642,7 +3642,7 @@ struct ShadowParseContext {
allowY = false; allowY = false;
allowBlur = false; allowBlur = false;
allowSpread = false; allowSpread = false;
allowStyle = property == CSSPropertyBoxShadow; allowStyle = property == CSSPropertyWebkitBoxShadow;
} }
void commitLength(CSSParserValue* v) void commitLength(CSSParserValue* v)
...@@ -3661,12 +3661,12 @@ struct ShadowParseContext { ...@@ -3661,12 +3661,12 @@ struct ShadowParseContext {
allowY = false; allowY = false;
allowBlur = true; allowBlur = true;
allowColor = true; allowColor = true;
allowStyle = property == CSSPropertyBoxShadow; allowStyle = property == CSSPropertyWebkitBoxShadow;
allowBreak = true; allowBreak = true;
} else if (allowBlur) { } else if (allowBlur) {
blur = val.release(); blur = val.release();
allowBlur = false; allowBlur = false;
allowSpread = property == CSSPropertyBoxShadow; allowSpread = property == CSSPropertyWebkitBoxShadow;
} else if (allowSpread) { } else if (allowSpread) {
spread = val.release(); spread = val.release();
allowSpread = false; allowSpread = false;
...@@ -3683,7 +3683,7 @@ struct ShadowParseContext { ...@@ -3683,7 +3683,7 @@ struct ShadowParseContext {
} else { } else {
allowBlur = false; allowBlur = false;
allowSpread = false; allowSpread = false;
allowStyle = property == CSSPropertyBoxShadow; allowStyle = property == CSSPropertyWebkitBoxShadow;
} }
} }
...@@ -5176,11 +5176,6 @@ static int cssPropertyID(const UChar* propertyName, unsigned length) ...@@ -5176,11 +5176,6 @@ static int cssPropertyID(const UChar* propertyName, unsigned length)
const char* const opacity = "opacity"; const char* const opacity = "opacity";
name = opacity; name = opacity;
length = strlen(opacity); length = strlen(opacity);
} else if (strcmp(buffer, "-webkit-box-shadow") == 0) {
// CSS Backgrounds/Borders. -webkit-box-shadow worked in Safari 4 and earlier.
const char* const boxShadow = "box-shadow";
name = boxShadow;
length = strlen(boxShadow);
} else if (strcmp(buffer, "-webkit-background-size") == 0) { } else if (strcmp(buffer, "-webkit-background-size") == 0) {
// CSS Backgrounds/Borders. -webkit-background-size worked in Safari 4 and earlier. // CSS Backgrounds/Borders. -webkit-background-size worked in Safari 4 and earlier.
const char* const backgroundSize = "background-size"; const char* const backgroundSize = "background-size";
......
...@@ -49,7 +49,6 @@ border-top-style ...@@ -49,7 +49,6 @@ border-top-style
border-top-width border-top-width
border-width border-width
bottom bottom
box-shadow
caption-side caption-side
clear clear
clip clip
...@@ -180,6 +179,7 @@ zoom ...@@ -180,6 +179,7 @@ zoom
-webkit-box-orient -webkit-box-orient
-webkit-box-pack -webkit-box-pack
-webkit-box-reflect -webkit-box-reflect
-webkit-box-shadow
-webkit-box-sizing -webkit-box-sizing
-webkit-column-break-after -webkit-column-break-after
-webkit-column-break-before -webkit-column-break-before
......
...@@ -4650,7 +4650,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) ...@@ -4650,7 +4650,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
return; return;
} }
case CSSPropertyTextShadow: case CSSPropertyTextShadow:
case CSSPropertyBoxShadow: { case CSSPropertyWebkitBoxShadow: {
if (isInherit) { if (isInherit) {
if (id == CSSPropertyTextShadow) if (id == CSSPropertyTextShadow)
return m_style->setTextShadow(m_parentStyle->textShadow() ? new ShadowData(*m_parentStyle->textShadow()) : 0); return m_style->setTextShadow(m_parentStyle->textShadow() ? new ShadowData(*m_parentStyle->textShadow()) : 0);
......
...@@ -643,7 +643,7 @@ static void ensurePropertyMap() ...@@ -643,7 +643,7 @@ static void ensurePropertyMap()
gPropertyWrappers->append(new PropertyWrapperMaybeInvalidColor(CSSPropertyOutlineColor, &RenderStyle::outlineColor, &RenderStyle::setOutlineColor)); gPropertyWrappers->append(new PropertyWrapperMaybeInvalidColor(CSSPropertyOutlineColor, &RenderStyle::outlineColor, &RenderStyle::setOutlineColor));
// These are for shadows // These are for shadows
gPropertyWrappers->append(new PropertyWrapperShadow(CSSPropertyBoxShadow, &RenderStyle::boxShadow, &RenderStyle::setBoxShadow)); gPropertyWrappers->append(new PropertyWrapperShadow(CSSPropertyWebkitBoxShadow, &RenderStyle::boxShadow, &RenderStyle::setBoxShadow));
gPropertyWrappers->append(new PropertyWrapperShadow(CSSPropertyTextShadow, &RenderStyle::textShadow, &RenderStyle::setTextShadow)); gPropertyWrappers->append(new PropertyWrapperShadow(CSSPropertyTextShadow, &RenderStyle::textShadow, &RenderStyle::setTextShadow));
#if ENABLE(SVG) #if ENABLE(SVG)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment