| Index: Source/core/rendering/svg/SVGRenderSupport.cpp
|
| diff --git a/Source/core/rendering/svg/SVGRenderSupport.cpp b/Source/core/rendering/svg/SVGRenderSupport.cpp
|
| index 1e4864989a54d3a64bd413a2b616e0ee71fdd1e6..1620238de89d87b5580c810d1d7847431ec6deac 100644
|
| --- a/Source/core/rendering/svg/SVGRenderSupport.cpp
|
| +++ b/Source/core/rendering/svg/SVGRenderSupport.cpp
|
| @@ -242,10 +242,16 @@ void SVGRenderSupport::layoutChildren(RenderObject* start, bool selfNeedsLayout)
|
| }
|
|
|
| SubtreeLayoutScope layoutScope(child);
|
| - if (needsLayout)
|
| + // Resource containers are nasty: they can invalidate clients outside the current SubtreeLayoutScope.
|
| + // Since they only care about viewport size changes (to resolve their relative lengths), we trigger
|
| + // their invalidation directly from SVGSVGElement::svgAttributeChange() or at a higher
|
| + // SubtreeLayoutScope (in RenderView::layout()).
|
| + if (needsLayout && !child->isSVGResourceContainer())
|
| layoutScope.setNeedsLayout(child);
|
|
|
| if (child->needsLayout()) {
|
| + layoutResourcesIfNeeded(child);
|
| +
|
| child->layout();
|
| // Renderers are responsible for repainting themselves when changing, except
|
| // for the initial paint to avoid potential double-painting caused by non-sensical "old" bounds.
|
| @@ -268,6 +274,15 @@ void SVGRenderSupport::layoutChildren(RenderObject* start, bool selfNeedsLayout)
|
| invalidateResourcesOfChildren(*it);
|
| }
|
|
|
| +void SVGRenderSupport::layoutResourcesIfNeeded(const RenderObject* object)
|
| +{
|
| + ASSERT(object);
|
| +
|
| + SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(object);
|
| + if (resources)
|
| + resources->layoutIfNeeded();
|
| +}
|
| +
|
| bool SVGRenderSupport::isOverflowHidden(const RenderObject* object)
|
| {
|
| // SVG doesn't support independent x/y overflow
|
|
|