Chromium Code Reviews| Index: Source/core/rendering/svg/RenderSVGRoot.cpp |
| diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp |
| index a66449367bb56b5b072d7ad4b930a84d05c6e993..231e20da0b60679f4cbcb1a52bea6074f6442f45 100644 |
| --- a/Source/core/rendering/svg/RenderSVGRoot.cpp |
| +++ b/Source/core/rendering/svg/RenderSVGRoot.cpp |
| @@ -197,8 +197,6 @@ void RenderSVGRoot::layout() |
| { |
| ASSERT(needsLayout()); |
| - m_resourcesNeedingToInvalidateClients.clear(); |
| - |
| // Arbitrary affine transforms are incompatible with LayoutState. |
| LayoutStateDisabler layoutStateDisabler(view()); |
| @@ -210,21 +208,15 @@ void RenderSVGRoot::layout() |
| updateLogicalHeight(); |
| buildLocalToBorderBoxTransform(); |
| + // Layout own resources. |
|
pdr.
2013/09/18 22:47:35
Lets pull this out into a helper.
|
| + if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this)) |
| + resources->layoutIfNeeded(); |
| + |
| SVGSVGElement* svg = toSVGSVGElement(node()); |
| ASSERT(svg); |
| m_isLayoutSizeChanged = needsLayout || (svg->hasRelativeLengths() && oldSize != size()); |
| SVGRenderSupport::layoutChildren(this, needsLayout || SVGRenderSupport::filtersForceContainerLayout(this)); |
| - if (!m_resourcesNeedingToInvalidateClients.isEmpty()) { |
| - // Invalidate resource clients, which may mark some nodes for layout. |
| - HashSet<RenderSVGResourceContainer*>::iterator end = m_resourcesNeedingToInvalidateClients.end(); |
| - for (HashSet<RenderSVGResourceContainer*>::iterator it = m_resourcesNeedingToInvalidateClients.begin(); it != end; ++it) |
| - (*it)->removeAllClientsFromCache(); |
| - |
| - m_isLayoutSizeChanged = false; |
| - SVGRenderSupport::layoutChildren(this, false); |
| - } |
| - |
| // At this point LayoutRepainter already grabbed the old bounds, |
| // recalculate them now so repaintAfterLayout() uses the new bounds. |
| if (m_needsBoundariesOrTransformUpdate) { |
| @@ -475,14 +467,4 @@ bool RenderSVGRoot::hasRelativeLogicalHeight() const |
| return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent(); |
| } |
| -void RenderSVGRoot::addResourceForClientInvalidation(RenderSVGResourceContainer* resource) |
| -{ |
| - RenderObject* svgRoot = resource->parent(); |
| - while (svgRoot && !svgRoot->isSVGRoot()) |
| - svgRoot = svgRoot->parent(); |
| - if (!svgRoot) |
| - return; |
| - toRenderSVGRoot(svgRoot)->m_resourcesNeedingToInvalidateClients.add(resource); |
| -} |
| - |
| } |