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>
Rubber-stamped by Adam Roben.
......
......@@ -26,7 +26,6 @@ border-top-right-radius: 0px;
border-top-style: none;
border-top-width: 0px;
bottom: auto;
box-shadow: none;
caption-side: top;
clear: none;
clip: auto;
......@@ -119,6 +118,7 @@ zoom: 1;
-webkit-box-orient: horizontal;
-webkit-box-pack: start;
-webkit-box-reflect: none;
-webkit-box-shadow: none;
-webkit-box-sizing: content-box;
-webkit-column-break-after: auto;
-webkit-column-break-before: auto;
......
......@@ -25,7 +25,6 @@ Computed style of an element whose parent's 'display' value is 'none':
border-top-style: solid
border-top-width: 16px
bottom: auto
box-shadow: none
caption-side: top
clear: none
clip: auto
......@@ -118,6 +117,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-box-orient: horizontal
-webkit-box-pack: start
-webkit-box-reflect: none
-webkit-box-shadow: none
-webkit-box-sizing: content-box
-webkit-column-break-after: auto
-webkit-column-break-before: auto
......
......@@ -26,7 +26,6 @@ border-top-right-radius: 0px;
border-top-style: none;
border-top-width: 0px;
bottom: auto;
box-shadow: none;
caption-side: top;
clear: none;
clip: auto;
......@@ -118,6 +117,7 @@ zoom: 1;
-webkit-box-orient: horizontal;
-webkit-box-pack: start;
-webkit-box-reflect: none;
-webkit-box-shadow: none;
-webkit-box-sizing: content-box;
-webkit-column-break-after: auto;
-webkit-column-break-before: auto;
......
......@@ -25,7 +25,6 @@ Computed style of an element whose parent's 'display' value is 'none':
border-top-style: solid
border-top-width: 13px
bottom: auto
box-shadow: none
caption-side: top
clear: none
clip: auto
......@@ -117,6 +116,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-box-orient: horizontal
-webkit-box-pack: start
-webkit-box-reflect: none
-webkit-box-shadow: none
-webkit-box-sizing: content-box
-webkit-column-break-after: auto
-webkit-column-break-before: auto
......
......@@ -26,7 +26,6 @@ border-top-right-radius: 0px;
border-top-style: none;
border-top-width: 0px;
bottom: auto;
box-shadow: none;
caption-side: top;
clear: none;
clip: auto;
......@@ -119,6 +118,7 @@ zoom: 1;
-webkit-box-orient: horizontal;
-webkit-box-pack: start;
-webkit-box-reflect: none;
-webkit-box-shadow: none;
-webkit-box-sizing: content-box;
-webkit-column-break-after: auto;
-webkit-column-break-before: auto;
......
......@@ -25,7 +25,6 @@ Computed style of an element whose parent's 'display' value is 'none':
border-top-style: solid
border-top-width: 16px
bottom: auto
box-shadow: none
caption-side: top
clear: none
clip: auto
......@@ -118,6 +117,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-box-orient: horizontal
-webkit-box-pack: start
-webkit-box-reflect: none
-webkit-box-shadow: none
-webkit-box-sizing: content-box
-webkit-column-break-after: auto
-webkit-column-break-before: auto
......
......@@ -50,8 +50,6 @@ rect: style.getPropertyValue(border-top-width) : 0px
rect: style.getPropertyCSSValue(border-top-width) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(bottom) : auto
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.getPropertyCSSValue(caption-side) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(clear) : none
......@@ -236,6 +234,8 @@ rect: style.getPropertyValue(-webkit-box-pack) : start
rect: style.getPropertyCSSValue(-webkit-box-pack) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-box-reflect) : none
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.getPropertyCSSValue(-webkit-box-sizing) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-column-break-after) : auto
......@@ -458,8 +458,6 @@ g: style.getPropertyValue(border-top-width) : 0px
g: style.getPropertyCSSValue(border-top-width) : [object CSSPrimitiveValue]
g: style.getPropertyValue(bottom) : auto
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.getPropertyCSSValue(caption-side) : [object CSSPrimitiveValue]
g: style.getPropertyValue(clear) : none
......@@ -644,6 +642,8 @@ g: style.getPropertyValue(-webkit-box-pack) : start
g: style.getPropertyCSSValue(-webkit-box-pack) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-box-reflect) : none
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.getPropertyCSSValue(-webkit-box-sizing) : [object CSSPrimitiveValue]
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>
Rubber-stamped by Sam Weinig.
......@@ -77,7 +77,6 @@ static const int computedProperties[] = {
CSSPropertyBorderTopStyle,
CSSPropertyBorderTopWidth,
CSSPropertyBottom,
CSSPropertyBoxShadow,
CSSPropertyCaptionSide,
CSSPropertyClear,
CSSPropertyClip,
......@@ -171,6 +170,7 @@ static const int computedProperties[] = {
CSSPropertyWebkitBoxOrient,
CSSPropertyWebkitBoxPack,
CSSPropertyWebkitBoxReflect,
CSSPropertyWebkitBoxShadow,
CSSPropertyWebkitBoxSizing,
CSSPropertyWebkitColumnBreakAfter,
CSSPropertyWebkitColumnBreakBefore,
......@@ -767,7 +767,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
}
case CSSPropertyWebkitBoxReflect:
return valueForReflection(style->boxReflect());
case CSSPropertyBoxShadow:
case CSSPropertyWebkitBoxShadow:
return valueForShadow(style->boxShadow(), static_cast<CSSPropertyID>(propertyID));
case CSSPropertyCaptionSide:
return CSSPrimitiveValue::create(style->captionSide());
......
......@@ -1190,7 +1190,7 @@ bool CSSParser::parseValue(int propId, bool important)
valid_primitive = validUnit(value, FLength, m_strict);
break;
case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3
case CSSPropertyBoxShadow:
case CSSPropertyWebkitBoxShadow:
if (id == CSSValueNone)
valid_primitive = true;
else
......@@ -3610,7 +3610,7 @@ struct ShadowParseContext {
, allowBlur(false)
, allowSpread(false)
, allowColor(true)
, allowStyle(prop == CSSPropertyBoxShadow)
, allowStyle(prop == CSSPropertyWebkitBoxShadow)
, allowBreak(true)
{
}
......@@ -3642,7 +3642,7 @@ struct ShadowParseContext {
allowY = false;
allowBlur = false;
allowSpread = false;
allowStyle = property == CSSPropertyBoxShadow;
allowStyle = property == CSSPropertyWebkitBoxShadow;
}
void commitLength(CSSParserValue* v)
......@@ -3661,12 +3661,12 @@ struct ShadowParseContext {
allowY = false;
allowBlur = true;
allowColor = true;
allowStyle = property == CSSPropertyBoxShadow;
allowStyle = property == CSSPropertyWebkitBoxShadow;
allowBreak = true;
} else if (allowBlur) {
blur = val.release();
allowBlur = false;
allowSpread = property == CSSPropertyBoxShadow;
allowSpread = property == CSSPropertyWebkitBoxShadow;
} else if (allowSpread) {
spread = val.release();
allowSpread = false;
......@@ -3683,7 +3683,7 @@ struct ShadowParseContext {
} else {
allowBlur = false;
allowSpread = false;
allowStyle = property == CSSPropertyBoxShadow;
allowStyle = property == CSSPropertyWebkitBoxShadow;
}
}
......@@ -5176,11 +5176,6 @@ static int cssPropertyID(const UChar* propertyName, unsigned length)
const char* const opacity = "opacity";
name = 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) {
// CSS Backgrounds/Borders. -webkit-background-size worked in Safari 4 and earlier.
const char* const backgroundSize = "background-size";
......
......@@ -49,7 +49,6 @@ border-top-style
border-top-width
border-width
bottom
box-shadow
caption-side
clear
clip
......@@ -180,6 +179,7 @@ zoom
-webkit-box-orient
-webkit-box-pack
-webkit-box-reflect
-webkit-box-shadow
-webkit-box-sizing
-webkit-column-break-after
-webkit-column-break-before
......
......@@ -4650,7 +4650,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
return;
}
case CSSPropertyTextShadow:
case CSSPropertyBoxShadow: {
case CSSPropertyWebkitBoxShadow: {
if (isInherit) {
if (id == CSSPropertyTextShadow)
return m_style->setTextShadow(m_parentStyle->textShadow() ? new ShadowData(*m_parentStyle->textShadow()) : 0);
......
......@@ -643,7 +643,7 @@ static void ensurePropertyMap()
gPropertyWrappers->append(new PropertyWrapperMaybeInvalidColor(CSSPropertyOutlineColor, &RenderStyle::outlineColor, &RenderStyle::setOutlineColor));
// 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));
#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