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

Unified Diff: Source/core/rendering/svg/RenderSVGResourceSolidColor.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/RenderSVGResourceSolidColor.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp b/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp
index 0c7684b0dc79b414fd529ece045dddec2505f42d..eb1a45ed8bd2fbec4ee0d8d98b613bfc7b4a4ea3 100644
--- a/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp
@@ -84,20 +84,7 @@ bool RenderSVGResourceSolidColor::applyResource(RenderObject* object, RenderStyl
void RenderSVGResourceSolidColor::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);
}
}
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourcePattern.cpp ('k') | Source/core/rendering/svg/SVGRenderSupport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698