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

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

Issue 601093002: Move SVG container paint code to SVGContainerPainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer comments Created 6 years, 2 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/RenderSVGResourceMarker.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourceMarker.cpp b/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
index 8e7ffec4234593d72b24306437cdd23fe4c32211..d8be4b3a1a25e5106bfa209c5d51df796d1f71d5 100644
--- a/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
@@ -70,12 +70,6 @@ void RenderSVGResourceMarker::removeClientFromCache(RenderObject* client, bool m
markClientForInvalidation(client, markForInvalidation ? BoundariesInvalidation : ParentOnlyInvalidation);
}
-void RenderSVGResourceMarker::applyViewportClip(PaintInfo& paintInfo)
-{
- if (SVGRenderSupport::isOverflowHidden(this))
- paintInfo.context->clip(m_viewport);
-}
-
FloatRect RenderSVGResourceMarker::markerBoundaries(const AffineTransform& markerTransformation) const
{
FloatRect coordinates = RenderSVGContainer::paintInvalidationRectInLocalCoordinates();
@@ -143,6 +137,12 @@ void RenderSVGResourceMarker::draw(PaintInfo& paintInfo, const AffineTransform&
PaintInfo info(paintInfo);
GraphicsContextStateSaver stateSaver(*info.context, false);
info.applyTransform(transform, &stateSaver);
+
+ if (SVGRenderSupport::isOverflowHidden(this)) {
+ stateSaver.saveIfNeeded();
+ info.context->clip(m_viewport);
+ }
+
RenderSVGContainer::paint(info, IntPoint());
}
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceMarker.h ('k') | Source/core/rendering/svg/RenderSVGViewportContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698