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

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

Issue 2510313004: Use LayoutBox::frameRect() as the viewport of LayoutSVGForeignObject (Closed)
Patch Set: crbug.com/667071 Created 4 years, 1 month 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/PaintPropertyTreeBuilderTest.cpp ('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/SVGForeignObjectPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGForeignObjectPainter.cpp b/third_party/WebKit/Source/core/paint/SVGForeignObjectPainter.cpp
index c63d1075b1e08eb5e8285c4bce4528608ba8cdb4..97387de9c2008b5b266ae1c8f7d439dd2bb5121c 100644
--- a/third_party/WebKit/Source/core/paint/SVGForeignObjectPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGForeignObjectPainter.cpp
@@ -45,13 +45,15 @@ void SVGForeignObjectPainter::paint(const PaintInfo& paintInfo) {
paintInfoBeforeFiltering.context, m_layoutSVGForeignObject,
m_layoutSVGForeignObject.localToSVGParentTransform());
+ // In theory we should just let BlockPainter::paint() handle the clip, but for
+ // now we don't allow normal overflow clip for LayoutSVGBlock, so we have to
+ // apply clip manually. See LayoutSVGBlock::allowsOverflowClip() for details.
Optional<FloatClipRecorder> clipRecorder;
if (SVGLayoutSupport::isOverflowHidden(&m_layoutSVGForeignObject)) {
clipRecorder.emplace(
paintInfoBeforeFiltering.context, m_layoutSVGForeignObject,
paintInfoBeforeFiltering.phase,
- FloatRect(FloatPoint(),
- m_layoutSVGForeignObject.viewportRect().size()));
+ m_layoutSVGForeignObject.visualRectInLocalSVGCoordinates());
}
SVGPaintContext paintContext(m_layoutSVGForeignObject,
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698