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

Unified Diff: third_party/WebKit/Source/core/paint/SVGRootPainter.cpp

Issue 2343673003: SVG root viewport clip in paint property tree (Closed)
Patch Set: - Created 4 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 | « third_party/WebKit/Source/core/paint/SVGRootPainter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp b/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
index b4a2d1f996b8e64e4f8440f54ae7e05dea6c6950..d0a5fb3adfc864dfaabd45096cc0cb7d047377d2 100644
--- a/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
@@ -6,6 +6,7 @@
#include "core/layout/svg/LayoutSVGRoot.h"
#include "core/layout/svg/SVGLayoutSupport.h"
+#include "core/paint/BoxClipper.h"
#include "core/paint/BoxPainter.h"
#include "core/paint/ObjectPaintProperties.h"
#include "core/paint/PaintInfo.h"
@@ -13,7 +14,6 @@
#include "core/paint/SVGPaintContext.h"
#include "core/paint/TransformRecorder.h"
#include "core/svg/SVGSVGElement.h"
-#include "platform/graphics/paint/ClipRecorder.h"
#include "wtf/Optional.h"
namespace blink {
@@ -38,7 +38,7 @@ AffineTransform SVGRootPainter::transformToPixelSnappedBorderBox(const LayoutPoi
return paintOffsetToBorderBox;
}
-void SVGRootPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
+void SVGRootPainter::paintReplaced(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
// An empty viewport disables rendering.
if (pixelSnappedSize(paintOffset).isEmpty())
@@ -55,15 +55,14 @@ void SVGRootPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintO
if (svg->hasEmptyViewBox())
return;
- PaintInfo paintInfoBeforeFiltering(paintInfo);
-
// Apply initial viewport clip.
- Optional<ClipRecorder> clipRecorder;
+ Optional<BoxClipper> boxClipper;
if (m_layoutSVGRoot.shouldApplyViewportClip()) {
// TODO(pdr): Clip the paint info cull rect here.
- clipRecorder.emplace(paintInfoBeforeFiltering.context, m_layoutSVGRoot, paintInfoBeforeFiltering.displayItemTypeForClipping(), pixelSnappedIntRect(m_layoutSVGRoot.overflowClipRect(paintOffset)));
+ boxClipper.emplace(m_layoutSVGRoot, paintInfo, paintOffset, ForceContentsClip);
}
+ PaintInfo paintInfoBeforeFiltering(paintInfo);
AffineTransform transformToBorderBox = transformToPixelSnappedBorderBox(paintOffset);
paintInfoBeforeFiltering.updateCullRect(transformToBorderBox);
SVGTransformContext transformContext(paintInfoBeforeFiltering.context, m_layoutSVGRoot, transformToBorderBox);
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGRootPainter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698