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

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

Issue 9949002: Merge 111601 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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/WebCore/rendering/svg/RenderSVGRoot.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/svg/RenderSVGRoot.cpp
===================================================================
--- Source/WebCore/rendering/svg/RenderSVGRoot.cpp (revision 112624)
+++ Source/WebCore/rendering/svg/RenderSVGRoot.cpp (working copy)
@@ -212,6 +212,8 @@
{
ASSERT(needsLayout());
+ m_resourcesNeedingToInvalidateClients.clear();
+
// Arbitrary affine transforms are incompatible with LayoutState.
LayoutStateDisabler layoutStateDisabler(view());
@@ -228,6 +230,16 @@
SVGRenderSupport::layoutChildren(this, needsLayout || SVGRenderSupport::filtersForceContainerLayout(this));
m_isLayoutSizeChanged = false;
+ 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) {
@@ -419,6 +431,16 @@
return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent() || svg->intrinsicWidth(SVGSVGElement::IgnoreCSSProperties).isPercent();
}
+void RenderSVGRoot::addResourceForClientInvalidation(RenderSVGResourceContainer* resource)
+{
+ RenderObject* svgRoot = resource->parent();
+ while (svgRoot && !svgRoot->isSVGRoot())
+ svgRoot = svgRoot->parent();
+ if (!svgRoot)
+ return;
+ static_cast<RenderSVGRoot*>(svgRoot)->m_resourcesNeedingToInvalidateClients.add(resource);
}
+}
+
#endif // ENABLE(SVG)
« no previous file with comments | « Source/WebCore/rendering/svg/RenderSVGRoot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698