Chromium Code Reviews| Index: Source/core/rendering/svg/RenderSVGBlock.cpp |
| diff --git a/Source/core/rendering/svg/RenderSVGBlock.cpp b/Source/core/rendering/svg/RenderSVGBlock.cpp |
| index a3dc5c9d07b3722ad48f2003efcd85788a24a8b3..8dbc41091d05b9ad006a2f73774764c82b0e4b29 100644 |
| --- a/Source/core/rendering/svg/RenderSVGBlock.cpp |
| +++ b/Source/core/rendering/svg/RenderSVGBlock.cpp |
| @@ -126,8 +126,29 @@ void RenderSVGBlock::invalidateTreeIfNeeded(const PaintInvalidationState& paintI |
| if (!shouldCheckForPaintInvalidation(paintInvalidationState)) |
| return; |
| + if (paintInvalidationState.cachedOffsetsEnabled()) { |
| + m_cachedPaintInvalidationTransform = paintInvalidationState.svgTransform(); |
| + } else { |
| + AffineTransform transform = localTransform(); |
|
fs
2014/12/19 11:46:00
This shouldn't be included, because it's included
pdr.
2014/12/19 18:39:15
Done
|
| + RenderObject* next = parent(); |
| + while (!next->isSVGRoot()) { |
| + transform = next->localToParentTransform() * transform; |
| + next = next->parent(); |
| + ASSERT(next); |
| + } |
| + m_cachedPaintInvalidationTransform = toRenderSVGRoot(next)->localToBorderBoxTransform() * transform; |
| + } |
| + |
| ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState); |
| RenderBlockFlow::invalidateTreeIfNeeded(paintInvalidationState); |
| } |
| +void RenderSVGBlock::updatePaintInfoRect(IntRect& rect) |
| +{ |
| + if (rect != LayoutRect::infiniteRect()) { |
| + AffineTransform transformToRoot = m_cachedPaintInvalidationTransform * localTransform(); |
| + rect = enclosingIntRect(transformToRoot.inverse().mapRect(FloatRect(rect))); |
| + } |
| +} |
| + |
| } |