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

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

Issue 2514573003: Update documentation and cleanup impls for localToSVGParentTransform() (Closed)
Patch Set: - 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
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
index 0457225f9d5283208d32a8a9ad263c9349ea93e9..2ca11e880e724b1ac207789438a70219fc2674cc 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
@@ -46,11 +46,11 @@ void LayoutSVGForeignObject::paint(const PaintInfo& paintInfo,
SVGForeignObjectPainter(*this).paint(paintInfo);
}
-const AffineTransform& LayoutSVGForeignObject::localToSVGParentTransform()
- const {
- m_localToParentTransform = localSVGTransform();
- m_localToParentTransform.translate(m_viewport.x(), m_viewport.y());
- return m_localToParentTransform;
+AffineTransform LayoutSVGForeignObject::localToSVGParentTransform() const {
+ // Unlike other viewport-defining SVG objects, here localSVGTransform applies
+ // to the viewport offset.
+ return localSVGTransform() *
+ AffineTransform::translation(m_viewport.x(), m_viewport.y());
}
void LayoutSVGForeignObject::updateLogicalWidth() {

Powered by Google App Engine
This is Rietveld 408576698