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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index 0ba1003ccdd46c1af60c31ba6c1eb1abb933836d..6ff6a97729f56ea76e78461f602affbb4e3c1c58 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -668,18 +668,29 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
virtual FloatRect strokeBoundingBox() const;
// Returns the smallest rectangle enclosing all of the painted content
- // respecting clipping, masking, filters, opacity, stroke-width and markers
+ // respecting clipping, masking, filters, opacity, stroke-width and markers.
+ // For most SVG objects, the local SVG coordinate space is the space where
+ // localSVGTransform applies. For SVG objects defining viewports (e.g.
+ // LayoutSVGForeignObject, LayoutSVGViewportContainer,
+ // LayoutSVGResourceMarker), the local SVG coordinate space is the viewport
+ // space.
virtual FloatRect visualRectInLocalSVGCoordinates() const;
- // This only returns the transform="" value from the SVG element.
- // Most callsites want localToParentTransform() instead.
+ // This returns the transform applying to the local SVG coordinate space,
+ // which combines the transform attribute value or CSS transform properties,
+ // and animation motion transform.
+ // See SVGGraphicsElement::calculateAnimatedLocalTransform().
+ // Most callsites want localToSVGParentTransform() instead.
virtual AffineTransform localSVGTransform() const;
- // Returns the full transform mapping from local coordinates to local coords
- // for the parent SVG layoutObject
- // This includes any viewport transforms and x/y offsets as well as the
- // transform="" value off the element.
- virtual const AffineTransform& localToSVGParentTransform() const;
+ // Returns the full transform mapping from local coordinates to parent's local
+ // coordinates. For most SVG objects, this is the same as localSVGTransform.
+ // For SVG objects defining viewports (see visualRectInLocalSVGCoordinates),
+ // this includes any viewport transforms and x/y offsets as well as
+ // localSVGTransform.
+ virtual AffineTransform localToSVGParentTransform() const {
+ return localSVGTransform();
+ }
// SVG uses FloatPoint precise hit testing, and passes the point in parent
// coordinates instead of in paint invalidation container coordinates.
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698