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

Unified Diff: Source/core/rendering/svg/RenderSVGResourcePattern.cpp

Issue 571463002: Factor out common code from RenderSVGResource*::postApplyResource (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
Index: Source/core/rendering/svg/RenderSVGResourcePattern.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourcePattern.cpp b/Source/core/rendering/svg/RenderSVGResourcePattern.cpp
index 764f9876fa75b48d07e009c3b84f7e85af1fbb1b..5db5eedc326e46ccac67d8fdaac055bc1a374a1a 100644
--- a/Source/core/rendering/svg/RenderSVGResourcePattern.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourcePattern.cpp
@@ -174,20 +174,7 @@ bool RenderSVGResourcePattern::applyResource(RenderObject* object, RenderStyle*
void RenderSVGResourcePattern::postApplyResource(RenderObject*, GraphicsContext*& context, unsigned short resourceMode, const Path* path, const RenderSVGShape* shape)
{
ASSERT(context);
- ASSERT(resourceMode != ApplyToDefaultMode);
-
- if (resourceMode & ApplyToFillMode) {
- if (path)
- context->fillPath(*path);
- else if (shape)
- shape->fillShape(context);
- }
- if (resourceMode & ApplyToStrokeMode) {
- if (path)
- context->strokePath(*path);
- else if (shape)
- shape->strokeShape(context);
- }
+ SVGRenderSupport::fillOrStrokePrimitive(context, resourceMode, path, shape);
context->restore();
}
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceGradient.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698