Index: Source/core/rendering/svg/SVGRenderSupport.cpp |
diff --git a/Source/core/rendering/svg/SVGRenderSupport.cpp b/Source/core/rendering/svg/SVGRenderSupport.cpp |
index 0b8824d99480e80df204f12997c49dd676921fb3..8f2c9c5afc9859291b7fede1e24e6426a8059e16 100644 |
--- a/Source/core/rendering/svg/SVGRenderSupport.cpp |
+++ b/Source/core/rendering/svg/SVGRenderSupport.cpp |
@@ -145,6 +145,22 @@ const RenderObject* SVGRenderSupport::pushMappingToContainer(const RenderObject* |
return parent; |
} |
+const AffineTransform SVGRenderSupport::transformToRootBorderBox(const RenderObject& renderer, const AffineTransform& localTransform) |
+{ |
+ AffineTransform transform = localTransform; |
+ RenderObject* next = renderer.parent(); |
+ while (next && !next->isSVGRoot()) { |
pdr.
2014/12/15 05:02:21
linear algebra 101: instead of inverting each matr
fs
2014/12/15 10:28:16
If next is/ends up as null, you'll be toast anyway
pdr.
2014/12/18 22:22:40
Replaced with an assert.
|
+ transform = next->localToParentTransform() * transform; |
fs
2014/12/15 10:28:16
(Last I checked a sequence like this generated hor
pdr.
2014/12/16 06:29:56
It does indeed, we should add this to AffineTransf
pdr.
2014/12/18 22:22:40
I looked into this and premultiply doesn't seem as
fs
2014/12/19 11:46:00
Moves are cheap execution-wise, but cost in terms
|
+ next = next->parent(); |
+ } |
+ transform = toRenderSVGRoot(next)->localToBorderBoxTransform() * transform; |
+ |
+ if (!transform.isInvertible()) |
fs
2014/12/15 10:28:16
Maybe just return |transform| instead of its inver
|
+ return AffineTransform(); |
+ |
+ return transform.inverse(); |
+} |
+ |
// Update a bounding box taking into account the validity of the other bounding box. |
inline void SVGRenderSupport::updateObjectBoundingBox(FloatRect& objectBoundingBox, bool& objectBoundingBoxValid, RenderObject* other, FloatRect otherBoundingBox) |
{ |
@@ -187,11 +203,6 @@ void SVGRenderSupport::computeContainerBoundingBoxes(const RenderObject* contain |
paintInvalidationBoundingBox = strokeBoundingBox; |
} |
-bool SVGRenderSupport::paintInfoIntersectsPaintInvalidationRect(const FloatRect& localPaintInvalidationRect, const AffineTransform& localTransform, const PaintInfo& paintInfo) |
-{ |
- return localTransform.mapRect(localPaintInvalidationRect).intersects(paintInfo.rect); |
-} |
- |
const RenderSVGRoot* SVGRenderSupport::findTreeRootObject(const RenderObject* start) |
{ |
while (start && !start->isSVGRoot()) |