Index: Source/core/rendering/svg/RenderSVGResourceContainer.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGResourceContainer.cpp b/Source/core/rendering/svg/RenderSVGResourceContainer.cpp |
index e307cf2e24286bf6e88dc2ebc0490702dcb03b4c..5b67e163baff69fba5aed047267159ac69a75b54 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceContainer.cpp |
+++ b/Source/core/rendering/svg/RenderSVGResourceContainer.cpp |
@@ -21,6 +21,7 @@ |
#include "core/rendering/svg/RenderSVGResourceContainer.h" |
+#include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h" |
#include "core/rendering/RenderLayer.h" |
#include "core/rendering/RenderView.h" |
#include "core/rendering/svg/SVGRenderingContext.h" |
@@ -99,7 +100,7 @@ void RenderSVGResourceContainer::idChanged() |
void RenderSVGResourceContainer::markAllClientsForInvalidation(InvalidationMode mode) |
{ |
- if ((m_clients.isEmpty() && m_clientLayers.isEmpty()) || m_isInvalidating) |
+ if ((m_clients.isEmpty()) || m_isInvalidating) |
return; |
if (m_invalidationMask & mode) |
@@ -124,23 +125,23 @@ void RenderSVGResourceContainer::markAllClientsForInvalidation(InvalidationMode |
RenderSVGResource::markForLayoutAndParentResourceInvalidation(client, needsLayout); |
} |
- markAllClientLayersForInvalidation(); |
- |
m_isInvalidating = false; |
} |
-void RenderSVGResourceContainer::markAllClientLayersForInvalidation() |
-{ |
- HashSet<RenderLayer*>::iterator layerEnd = m_clientLayers.end(); |
- for (HashSet<RenderLayer*>::iterator it = m_clientLayers.begin(); it != layerEnd; ++it) |
- (*it)->filterNeedsPaintInvalidation(); |
-} |
- |
void RenderSVGResourceContainer::markClientForInvalidation(RenderObject* client, InvalidationMode mode) |
{ |
ASSERT(client); |
ASSERT(!m_clients.isEmpty()); |
+ { |
+ DeprecatedScheduleStyleRecalcDuringLayout marker(client->document().lifecycle()); |
+ // It's possible for scheduleSVGFilterLayerUpdateHack to schedule a style recalc, which |
+ // is a problem because this function can be called while performing layout. |
+ // Presumably this represents an illegal data flow of layout or compositing |
+ // information into the style system. |
+ toElement(client->node())->scheduleSVGFilterLayerUpdateHack(); |
+ } |
+ |
switch (mode) { |
case LayoutAndBoundariesInvalidation: |
case BoundariesInvalidation: |
@@ -173,28 +174,6 @@ void RenderSVGResourceContainer::removeClient(RenderObject* client) |
m_clients.remove(client); |
} |
-void RenderSVGResourceContainer::addClientRenderLayer(Node* node) |
-{ |
- ASSERT(node); |
- if (!node->renderer() || !node->renderer()->hasLayer()) |
- return; |
- m_clientLayers.add(toRenderLayerModelObject(node->renderer())->layer()); |
- clearInvalidationMask(); |
-} |
- |
-void RenderSVGResourceContainer::addClientRenderLayer(RenderLayer* client) |
-{ |
- ASSERT(client); |
- m_clientLayers.add(client); |
- clearInvalidationMask(); |
-} |
- |
-void RenderSVGResourceContainer::removeClientRenderLayer(RenderLayer* client) |
-{ |
- ASSERT(client); |
- m_clientLayers.remove(client); |
-} |
- |
void RenderSVGResourceContainer::invalidateCacheAndMarkForLayout(SubtreeLayoutScope* layoutScope) |
{ |
if (selfNeedsLayout()) |