Changeset 38439 in webkit
- Timestamp:
- Nov 15, 2008 8:35:22 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r38436 r38439 1 2008-11-15 Darin Adler <darin@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 - fix just-introduced crash in the svg/custom/svg-fonts-in-html.html test 6 7 This gets rid of the crash. It restores the behavior of the CG case from before Dirk 8 Shulze removed the platorm-dependent code, but perhaps it should be changed further 9 in the future so that the default for no style is "no stroke". I think the patch is 10 fine for fill. 11 12 * svg/graphics/SVGPaintServerSolid.cpp: 13 (WebCore::SVGPaintServerSolid::setup): Added null checks for svgStyle. 14 (WebCore::SVGPaintServerSolid::renderPath): Added null checks for style and svgStyle. 15 1 16 2008-11-15 Kevin Ollivier <kevino@theolliviers.com> 2 17 -
trunk/WebCore/svg/graphics/SVGPaintServerSolid.cpp
r38435 r38439 64 64 { 65 65 RenderStyle* style = object ? object->style() : 0; 66 const SVGRenderStyle* svgStyle = object ? object->style()->svgStyle() : 0;66 const SVGRenderStyle* svgStyle = style ? style->svgStyle() : 0; 67 67 68 68 if ((type & ApplyToFillTargetType) && (!style || svgStyle->hasFill())) { 69 context->setAlpha(s vgStyle->fillOpacity());69 context->setAlpha(style ? svgStyle->fillOpacity() : 1); 70 70 context->setFillColor(color().rgb()); 71 context->setFillRule(s vgStyle->fillRule());71 context->setFillRule(style ? svgStyle->fillRule() : RULE_NONZERO); 72 72 73 73 if (isPaintingText) … … 76 76 77 77 if ((type & ApplyToStrokeTargetType) && (!style || svgStyle->hasStroke())) { 78 context->setAlpha(s vgStyle->strokeOpacity());78 context->setAlpha(style ? svgStyle->strokeOpacity() : 1); 79 79 context->setStrokeColor(color().rgb()); 80 80 … … 91 91 void SVGPaintServerSolid::renderPath(GraphicsContext*& context, const RenderObject* path, SVGPaintTargetType type) const 92 92 { 93 const SVGRenderStyle* svgStyle = path ->style()->svgStyle();93 const SVGRenderStyle* svgStyle = path ? path->style()->svgStyle() : 0; 94 94 95 if ((type & ApplyToFillTargetType) && svgStyle->hasFill())95 if ((type & ApplyToFillTargetType) && (!svgStyle || svgStyle->hasFill())) 96 96 context->fillPath(); 97 97 98 if ((type & ApplyToStrokeTargetType) && svgStyle->hasStroke())98 if ((type & ApplyToStrokeTargetType) && (!svgStyle || svgStyle->hasStroke())) 99 99 context->strokePath(); 100 100 }
Note: See TracChangeset
for help on using the changeset viewer.