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

Unified Diff: Source/core/rendering/svg/RenderSVGResourceGradient.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
« no previous file with comments | « no previous file | Source/core/rendering/svg/RenderSVGResourcePattern.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGResourceGradient.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourceGradient.cpp b/Source/core/rendering/svg/RenderSVGResourceGradient.cpp
index ebe7d52e22f0c28caf3b91d5e1c4ffc3c1883402..9d1cf6cdf746b7140634a4c545ed2ab8a1dfc3ec 100644
--- a/Source/core/rendering/svg/RenderSVGResourceGradient.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceGradient.cpp
@@ -131,20 +131,7 @@ bool RenderSVGResourceGradient::applyResource(RenderObject* object, RenderStyle*
void RenderSVGResourceGradient::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 | « no previous file | Source/core/rendering/svg/RenderSVGResourcePattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698