Index: Source/core/rendering/svg/RenderSVGResourceGradient.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGResourceGradient.cpp b/Source/core/rendering/svg/RenderSVGResourceGradient.cpp |
index d3a514b1aa7c8487dd03a1486719e5071853fc71..d1a3363ab40d9043c3be3731beb672ac421c6559 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceGradient.cpp |
+++ b/Source/core/rendering/svg/RenderSVGResourceGradient.cpp |
@@ -111,19 +111,12 @@ bool RenderSVGResourceGradient::applyResource(RenderObject* object, RenderStyle* |
// Draw gradient |
context->save(); |
- if (resourceMode & ApplyToTextMode) |
- context->setTextDrawingMode(resourceMode & ApplyToFillMode ? TextModeFill : TextModeStroke); |
- |
- if (resourceMode & ApplyToFillMode) { |
- context->setAlphaAsFloat(svgStyle.fillOpacity()); |
+ if (resourceMode & ApplyToFillMode) |
context->setFillGradient(gradientData->gradient); |
- context->setFillRule(svgStyle.fillRule()); |
- } else if (resourceMode & ApplyToStrokeMode) { |
- context->setAlphaAsFloat(svgStyle.strokeOpacity()); |
+ else if (resourceMode & ApplyToStrokeMode) |
context->setStrokeGradient(gradientData->gradient); |
- SVGRenderSupport::applyStrokeStyleToContext(context, style, object); |
- } |
+ updateGraphicsContext(context, style, *object, resourceMode); |
return true; |
} |