Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: Source/WebCore/css/SVGCSSStyleSelector.cpp

Issue 7002001: Revert 79985 - 2011-03-01 Nikolas Zimmermann <nzimmermann@rim.com> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Copyright (C) 2005 Apple Computer, Inc. 2 Copyright (C) 2005 Apple Computer, Inc.
3 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 2004, 2005, 2008 Rob Buis <buis@kde.org> 4 2004, 2005, 2008 Rob Buis <buis@kde.org>
5 Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 5 Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
6 6
7 Based on khtml css code by: 7 Based on khtml css code by:
8 Copyright(C) 1999-2003 Lars Knoll(knoll@kde.org) 8 Copyright(C) 1999-2003 Lars Knoll(knoll@kde.org)
9 (C) 2003 Apple Computer, Inc. 9 (C) 2003 Apple Computer, Inc.
10 (C) 2004 Allan Sandfeld Jensen(kde@carewolf.com) 10 (C) 2004 Allan Sandfeld Jensen(kde@carewolf.com)
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 case CSSPropertyShapeRendering: 224 case CSSPropertyShapeRendering:
225 { 225 {
226 HANDLE_INHERIT_AND_INITIAL(shapeRendering, ShapeRendering) 226 HANDLE_INHERIT_AND_INITIAL(shapeRendering, ShapeRendering)
227 if (primitiveValue) 227 if (primitiveValue)
228 svgstyle->setShapeRendering(*primitiveValue); 228 svgstyle->setShapeRendering(*primitiveValue);
229 break; 229 break;
230 } 230 }
231 // end of ident only properties 231 // end of ident only properties
232 case CSSPropertyFill: 232 case CSSPropertyFill:
233 { 233 {
234 if (isInherit) { 234 HANDLE_INHERIT_AND_INITIAL(fillPaint, FillPaint)
235 const SVGRenderStyle* svgParentStyle = m_parentStyle->svgStyle() ; 235 if (value->isSVGPaint())
236 svgstyle->setFillPaint(svgParentStyle->fillPaintType(), svgParen tStyle->fillPaintColor(), svgParentStyle->fillPaintUri()); 236 svgstyle->setFillPaint(static_cast<SVGPaint*>(value));
237 return;
238 }
239 if (isInitial) {
240 svgstyle->setFillPaint(SVGRenderStyle::initialFillPaintType(), S VGRenderStyle::initialFillPaintColor(), SVGRenderStyle::initialFillPaintUri());
241 return;
242 }
243 if (value->isSVGPaint()) {
244 SVGPaint* svgPaint = static_cast<SVGPaint*>(value);
245 svgstyle->setFillPaint(svgPaint->paintType(), colorFromSVGColorC SSValue(svgPaint, m_style->color()), svgPaint->uri());
246 }
247 break; 237 break;
248 } 238 }
249 case CSSPropertyStroke: 239 case CSSPropertyStroke:
250 { 240 {
251 if (isInherit) { 241 HANDLE_INHERIT_AND_INITIAL(strokePaint, StrokePaint)
252 const SVGRenderStyle* svgParentStyle = m_parentStyle->svgStyle() ; 242 if (value->isSVGPaint())
253 svgstyle->setStrokePaint(svgParentStyle->strokePaintType(), svgP arentStyle->strokePaintColor(), svgParentStyle->strokePaintUri()); 243 svgstyle->setStrokePaint(static_cast<SVGPaint*>(value));
254 return; 244
255 }
256 if (isInitial) {
257 svgstyle->setStrokePaint(SVGRenderStyle::initialStrokePaintType( ), SVGRenderStyle::initialStrokePaintColor(), SVGRenderStyle::initialStrokePaint Uri());
258 return;
259 }
260 if (value->isSVGPaint()) {
261 SVGPaint* svgPaint = static_cast<SVGPaint*>(value);
262 svgstyle->setStrokePaint(svgPaint->paintType(), colorFromSVGColo rCSSValue(svgPaint, m_style->color()), svgPaint->uri());
263 }
264 break; 245 break;
265 } 246 }
266 case CSSPropertyStrokeWidth: 247 case CSSPropertyStrokeWidth:
267 { 248 {
268 HANDLE_INHERIT_AND_INITIAL(strokeWidth, StrokeWidth) 249 HANDLE_INHERIT_AND_INITIAL(strokeWidth, StrokeWidth)
269 if (primitiveValue) 250 if (primitiveValue)
270 svgstyle->setStrokeWidth(SVGLength::fromCSSPrimitiveValue(primit iveValue)); 251 svgstyle->setStrokeWidth(SVGLength::fromCSSPrimitiveValue(primit iveValue));
271 break; 252 break;
272 } 253 }
273 case CSSPropertyStrokeDasharray: 254 case CSSPropertyStrokeDasharray:
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 // If you crash here, it's because you added a css property and are not handling it 585 // If you crash here, it's because you added a css property and are not handling it
605 // in either this switch statement or the one in CSSStyleSelector::a pplyProperty 586 // in either this switch statement or the one in CSSStyleSelector::a pplyProperty
606 ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", id); 587 ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", id);
607 return; 588 return;
608 } 589 }
609 } 590 }
610 591
611 } 592 }
612 593
613 #endif 594 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp ('k') | Source/WebCore/rendering/style/SVGRenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698