summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/graphics/SVGPaintServer.cpp
diff options
context:
space:
mode:
authorFeng Qian <>2009-04-10 18:11:29 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-10 18:11:29 -0700
commit8f72e70a9fd78eec56623b3a62e68f16b7b27e28 (patch)
tree181bf9a400c30a1bf34ea6d72560e8d00111d549 /WebCore/svg/graphics/SVGPaintServer.cpp
parent7ed56f225e0ade046e1c2178977f72b2d896f196 (diff)
downloadexternal_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.zip
external_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.tar.gz
external_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.tar.bz2
AI 145796: Land the WebKit merge @r42026.
Automated import of CL 145796
Diffstat (limited to 'WebCore/svg/graphics/SVGPaintServer.cpp')
-rw-r--r--WebCore/svg/graphics/SVGPaintServer.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/WebCore/svg/graphics/SVGPaintServer.cpp b/WebCore/svg/graphics/SVGPaintServer.cpp
index 4e7a8cf..0fcd722 100644
--- a/WebCore/svg/graphics/SVGPaintServer.cpp
+++ b/WebCore/svg/graphics/SVGPaintServer.cpp
@@ -37,6 +37,10 @@
#include "SVGStyledElement.h"
#include "SVGURIReference.h"
+#if PLATFORM(SKIA)
+#include "PlatformContextSkia.h"
+#endif
+
namespace WebCore {
SVGPaintServer::SVGPaintServer()
@@ -82,7 +86,7 @@ SVGPaintServer* SVGPaintServer::fillPaintServer(const RenderStyle* style, const
AtomicString id(SVGURIReference::getTarget(fill->uri()));
fillPaintServer = getPaintServerById(item->document(), id);
- SVGElement* svgElement = static_cast<SVGElement*>(item->element());
+ SVGElement* svgElement = static_cast<SVGElement*>(item->node());
ASSERT(svgElement && svgElement->document() && svgElement->isStyled());
if (item->isRenderPath() && fillPaintServer)
@@ -123,7 +127,7 @@ SVGPaintServer* SVGPaintServer::strokePaintServer(const RenderStyle* style, cons
AtomicString id(SVGURIReference::getTarget(stroke->uri()));
strokePaintServer = getPaintServerById(item->document(), id);
- SVGElement* svgElement = static_cast<SVGElement*>(item->element());
+ SVGElement* svgElement = static_cast<SVGElement*>(item->node());
ASSERT(svgElement && svgElement->document() && svgElement->isStyled());
if (item->isRenderPath() && strokePaintServer)
@@ -179,9 +183,9 @@ void SVGPaintServer::renderPath(GraphicsContext*& context, const RenderObject* p
context->strokePath();
}
-void SVGPaintServer::teardown(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool) const
-{
#if PLATFORM(SKIA)
+void SVGPaintServer::teardown(GraphicsContext*& context, const RenderObject*, SVGPaintTargetType, bool) const
+{
// FIXME: Move this into the GraphicsContext
// WebKit implicitly expects us to reset the path.
// For example in fillAndStrokePath() of RenderPath.cpp the path is
@@ -190,8 +194,12 @@ void SVGPaintServer::teardown(GraphicsContext*&, const RenderObject*, SVGPaintTa
context->beginPath();
context->platformContext()->setGradient(0);
context->platformContext()->setPattern(0);
-#endif
}
+#else
+void SVGPaintServer::teardown(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool) const
+{
+}
+#endif
DashArray dashArrayFromRenderingStyle(const RenderStyle* style)
{