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

Unified Diff: Source/WebCore/rendering/svg/RenderSVGResource.cpp

Issue 9235065: Merge 105978 - crash in WebCore::RenderSVGContainer::paint (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/PaintPhase.h ('k') | Source/WebCore/rendering/svg/RenderSVGResourceClipper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/svg/RenderSVGResource.cpp
===================================================================
--- Source/WebCore/rendering/svg/RenderSVGResource.cpp (revision 106008)
+++ Source/WebCore/rendering/svg/RenderSVGResource.cpp (working copy)
@@ -54,12 +54,23 @@
if (!svgStyle)
return 0;
+ bool isRenderingMask = false;
+ if (object->frame() && object->frame()->view())
+ isRenderingMask = object->frame()->view()->paintBehavior() & PaintBehaviorRenderingSVGMask;
+
// If we have no fill/stroke, return 0.
if (mode == ApplyToFillMode) {
+ // When rendering the mask for a RenderSVGResourceClipper, always use the initial fill paint server, and ignore stroke.
+ if (isRenderingMask) {
+ RenderSVGResourceSolidColor* colorResource = RenderSVGResource::sharedSolidPaintingResource();
+ colorResource->setColor(SVGRenderStyle::initialFillPaintColor());
+ return colorResource;
+ }
+
if (!svgStyle->hasFill())
return 0;
} else {
- if (!svgStyle->hasStroke())
+ if (!svgStyle->hasStroke() || isRenderingMask)
return 0;
}
« no previous file with comments | « Source/WebCore/rendering/PaintPhase.h ('k') | Source/WebCore/rendering/svg/RenderSVGResourceClipper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698