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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.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/LayoutSVGRoot.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
index 0334e0451cb9a8dda061ed26e77323ed82dd79f3..3f59a14bcd1dd0f11dfa874faddc4df6584f2197 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
@@ -342,17 +342,10 @@ void LayoutSVGRoot::buildLocalToBorderBoxTransform() {
m_localToBorderBoxTransform.preMultiply(viewToBorderBoxTransform);
}
-const AffineTransform& LayoutSVGRoot::localToSVGParentTransform() const {
- // Slightly optimized version of m_localToParentTransform =
- // AffineTransform::translation(x(), y()) * m_localToBorderBoxTransform;
- m_localToParentTransform = m_localToBorderBoxTransform;
- if (location().x())
- m_localToParentTransform.setE(m_localToParentTransform.e() +
- roundToInt(location().x()));
- if (location().y())
- m_localToParentTransform.setF(m_localToParentTransform.f() +
- roundToInt(location().y()));
- return m_localToParentTransform;
+AffineTransform LayoutSVGRoot::localToSVGParentTransform() const {
+ return AffineTransform::translation(roundToInt(location().x()),
+ roundToInt(location().y())) *
+ m_localToBorderBoxTransform;
}
LayoutRect LayoutSVGRoot::localVisualRect() const {
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698