summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/css/SVGCSSStyleSelector.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/css/SVGCSSStyleSelector.cpp
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/css/SVGCSSStyleSelector.cpp')
-rw-r--r--Source/WebCore/css/SVGCSSStyleSelector.cpp33
1 files changed, 26 insertions, 7 deletions
diff --git a/Source/WebCore/css/SVGCSSStyleSelector.cpp b/Source/WebCore/css/SVGCSSStyleSelector.cpp
index 64665d4..47e3fc3 100644
--- a/Source/WebCore/css/SVGCSSStyleSelector.cpp
+++ b/Source/WebCore/css/SVGCSSStyleSelector.cpp
@@ -231,17 +231,36 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
// end of ident only properties
case CSSPropertyFill:
{
- HANDLE_INHERIT_AND_INITIAL(fillPaint, FillPaint)
- if (value->isSVGPaint())
- svgstyle->setFillPaint(static_cast<SVGPaint*>(value));
+ if (isInherit) {
+ const SVGRenderStyle* svgParentStyle = m_parentStyle->svgStyle();
+ svgstyle->setFillPaint(svgParentStyle->fillPaintType(), svgParentStyle->fillPaintColor(), svgParentStyle->fillPaintUri());
+ return;
+ }
+ if (isInitial) {
+ svgstyle->setFillPaint(SVGRenderStyle::initialFillPaintType(), SVGRenderStyle::initialFillPaintColor(), SVGRenderStyle::initialFillPaintUri());
+ return;
+ }
+ if (value->isSVGPaint()) {
+ SVGPaint* svgPaint = static_cast<SVGPaint*>(value);
+ svgstyle->setFillPaint(svgPaint->paintType(), colorFromSVGColorCSSValue(svgPaint, m_style->color()), svgPaint->uri());
+ }
break;
}
case CSSPropertyStroke:
{
- HANDLE_INHERIT_AND_INITIAL(strokePaint, StrokePaint)
- if (value->isSVGPaint())
- svgstyle->setStrokePaint(static_cast<SVGPaint*>(value));
-
+ if (isInherit) {
+ const SVGRenderStyle* svgParentStyle = m_parentStyle->svgStyle();
+ svgstyle->setStrokePaint(svgParentStyle->strokePaintType(), svgParentStyle->strokePaintColor(), svgParentStyle->strokePaintUri());
+ return;
+ }
+ if (isInitial) {
+ svgstyle->setStrokePaint(SVGRenderStyle::initialStrokePaintType(), SVGRenderStyle::initialStrokePaintColor(), SVGRenderStyle::initialStrokePaintUri());
+ return;
+ }
+ if (value->isSVGPaint()) {
+ SVGPaint* svgPaint = static_cast<SVGPaint*>(value);
+ svgstyle->setStrokePaint(svgPaint->paintType(), colorFromSVGColorCSSValue(svgPaint, m_style->color()), svgPaint->uri());
+ }
break;
}
case CSSPropertyStrokeWidth: