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

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

Issue 2767343003: Revert: "Let SVGForeignObject's local SVG coordinates mean what it should" (Closed)
Patch Set: Rebaseline test Created 3 years, 9 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 396e43f7c3dfa5aac8c65e4325610739a1628906..79548b3c453c7a0a4425bf5cda26d70f25f21c85 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.cpp
@@ -99,9 +99,6 @@ void LayoutSVGBlock::styleDidChange(StyleDifference diff,
void LayoutSVGBlock::mapLocalToAncestor(const LayoutBoxModelObject* ancestor,
TransformState& transformState,
MapCoordinatesFlags flags) const {
- // Convert from local HTML coordinates to local SVG coordinates.
- transformState.move(locationOffset());
- // Apply other mappings on local SVG coordinates.
SVGLayoutSupport::mapLocalToAncestor(this, ancestor, transformState, flags);
}
@@ -111,18 +108,12 @@ void LayoutSVGBlock::mapAncestorToLocal(const LayoutBoxModelObject* ancestor,
if (this == ancestor)
return;
- // Map to local SVG coordinates.
SVGLayoutSupport::mapAncestorToLocal(*this, ancestor, transformState, flags);
- // Convert from local SVG coordinates to local HTML coordinates.
- transformState.move(-locationOffset());
}
const LayoutObject* LayoutSVGBlock::pushMappingToContainer(
const LayoutBoxModelObject* ancestorToStopAt,
LayoutGeometryMap& geometryMap) const {
- // Convert from local HTML coordinates to local SVG coordinates.
- geometryMap.push(this, locationOffset());
- // Apply other mappings on local SVG coordinates.
return SVGLayoutSupport::pushMappingToContainer(this, ancestorToStopAt,
geometryMap);
}
@@ -137,9 +128,6 @@ bool LayoutSVGBlock::mapToVisualRectInAncestorSpaceInternal(
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.
bool retval = SVGLayoutSupport::mapToVisualRectInAncestorSpace(
*this, ancestor, FloatRect(rect), rect);
transformState.setQuad(FloatQuad(FloatRect(rect)));

Powered by Google App Engine
This is Rietveld 408576698