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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.cpp

Issue 2727093002: Account for perspective and preserve-3d in mapToVisualRectInAncestorSpace (Closed)
Patch Set: none Created 3 years, 10 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: third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.cpp
index 851020393ffa38593bef40777a2a7e0a4571c706..396e43f7c3dfa5aac8c65e4325610739a1628906 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.cpp
@@ -131,15 +131,19 @@ LayoutRect LayoutSVGBlock::absoluteVisualRect() const {
return SVGLayoutSupport::visualRectInAncestorSpace(*this, *view());
}
-bool LayoutSVGBlock::mapToVisualRectInAncestorSpace(
+bool LayoutSVGBlock::mapToVisualRectInAncestorSpaceInternal(
const LayoutBoxModelObject* ancestor,
- LayoutRect& rect,
+ TransformState& transformState,
VisualRectFlags) const {
+ transformState.flatten();
+ LayoutRect rect(transformState.lastPlanarQuad().boundingBox());
// Convert from local HTML coordinates to local SVG coordinates.
rect.moveBy(location());
// Apply other mappings on local SVG coordinates.
- return SVGLayoutSupport::mapToVisualRectInAncestorSpace(
+ bool retval = SVGLayoutSupport::mapToVisualRectInAncestorSpace(
*this, ancestor, FloatRect(rect), rect);
+ transformState.setQuad(FloatQuad(FloatRect(rect)));
+ return retval;
}
bool LayoutSVGBlock::nodeAtPoint(HitTestResult&,
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h ('k') | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698