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

Unified Diff: Source/core/rendering/svg/RenderSVGViewportContainer.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
« no previous file with comments | « Source/core/rendering/svg/RenderSVGViewportContainer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGViewportContainer.cpp
diff --git a/Source/core/rendering/svg/RenderSVGViewportContainer.cpp b/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
index 5481703192074555ea9aac55a3cc5e9219431373..aa0c47fedd9d5e8af41b7ddf0f889e96401a7c4d 100644
--- a/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
+++ b/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
@@ -23,6 +23,7 @@
#include "config.h"
#include "core/rendering/svg/RenderSVGViewportContainer.h"
+#include "core/paint/SVGContainerPainter.h"
#include "core/rendering/PaintInfo.h"
#include "core/rendering/svg/SVGRenderSupport.h"
#include "core/svg/SVGSVGElement.h"
@@ -48,12 +49,6 @@ void RenderSVGViewportContainer::determineIfLayoutSizeChanged()
m_isLayoutSizeChanged = toSVGSVGElement(element())->hasRelativeLengths() && selfNeedsLayout();
}
-void RenderSVGViewportContainer::applyViewportClip(PaintInfo& paintInfo)
-{
- if (SVGRenderSupport::isOverflowHidden(this))
- paintInfo.context->clip(m_viewport);
-}
-
void RenderSVGViewportContainer::calcViewport()
{
SVGElement* element = this->element();
@@ -105,12 +100,7 @@ bool RenderSVGViewportContainer::pointIsInsideViewportClip(const FloatPoint& poi
void RenderSVGViewportContainer::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- ASSERT(element());
- // An empty viewBox disables rendering.
- if (isSVGSVGElement(*element()) && toSVGSVGElement(*element()).hasEmptyViewBox())
- return;
-
- RenderSVGContainer::paint(paintInfo, paintOffset);
+ SVGContainerPainter(*this).paint(paintInfo);
}
}
« no previous file with comments | « Source/core/rendering/svg/RenderSVGViewportContainer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698