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

Unified Diff: Source/core/rendering/svg/RenderSVGRoot.cpp

Issue 23785014: [SVG] Resources should be laid out in dependecy order. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: text-layout-crash.html needs image result update. Created 7 years, 3 months 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 | « Source/core/rendering/svg/RenderSVGRoot.h ('k') | Source/core/rendering/svg/SVGRenderSupport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a3ac4b8136cd3733840548bbfcf891d08795a9f2 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,13 @@ void RenderSVGRoot::layout()
updateLogicalHeight();
buildLocalToBorderBoxTransform();
+ SVGRenderSupport::layoutResourcesIfNeeded(this);
+
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 +465,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);
-}
-
}
« no previous file with comments | « Source/core/rendering/svg/RenderSVGRoot.h ('k') | Source/core/rendering/svg/SVGRenderSupport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698