| Index: Source/core/rendering/RenderLayer.cpp
|
| diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
|
| index a4d82b24c0312c559c23e271934b83c0a8c78056..30b122e734f1be98e61dbc3471589d60a150930c 100644
|
| --- a/Source/core/rendering/RenderLayer.cpp
|
| +++ b/Source/core/rendering/RenderLayer.cpp
|
| @@ -126,7 +126,8 @@ RenderLayer::RenderLayer(RenderLayerModelObject* renderer, LayerType type)
|
| , m_containsDirtyOverlayScrollbars(false)
|
| , m_canSkipRepaintRectsUpdateOnScroll(renderer->isTableCell())
|
| , m_hasFilterInfo(false)
|
| - , m_needsToRecomputeBounds(true)
|
| + , m_needsToUpdateAncestorDependentProperties(true)
|
| + , m_decendantNeedsToUpdateAncestorDependentProperties(true)
|
| , m_renderer(renderer)
|
| , m_parent(0)
|
| , m_previous(0)
|
| @@ -1214,15 +1215,24 @@ RenderLayer* RenderLayer::enclosingFilterLayer(IncludeSelfOrNot includeSelf) con
|
| return 0;
|
| }
|
|
|
| -void RenderLayer::clearNeedsToRecomputeBounds()
|
| +void RenderLayer::setNeedsToUpdateAncestorDependentProperties()
|
| {
|
| - m_needsToRecomputeBounds = false;
|
| + m_needsToUpdateAncestorDependentProperties = true;
|
| +
|
| + for (RenderLayer* current = this; current && !current->m_decendantNeedsToUpdateAncestorDependentProperties; current = current->parent())
|
| + current->m_decendantNeedsToUpdateAncestorDependentProperties = true;
|
| +}
|
| +
|
| +void RenderLayer::updateAncestorDependentProperties(const AncestorDependentProperties& ancestorDependentProperties)
|
| +{
|
| + m_ancestorDependentProperties = ancestorDependentProperties;
|
| + m_needsToUpdateAncestorDependentProperties = false;
|
| }
|
|
|
| -void RenderLayer::setAbsoluteBoundingBox(const IntRect& rect)
|
| +void RenderLayer::clearDecendantNeedsToUpdateAncestorDependentProperties()
|
| {
|
| - m_absoluteBoundingBox = rect;
|
| - clearNeedsToRecomputeBounds();
|
| + ASSERT(!m_needsToUpdateAncestorDependentProperties);
|
| + m_decendantNeedsToUpdateAncestorDependentProperties = false;
|
| }
|
|
|
| void RenderLayer::setCompositingReasons(CompositingReasons reasons, CompositingReasons mask)
|
| @@ -1428,6 +1438,8 @@ void RenderLayer::addChild(RenderLayer* child, RenderLayer* beforeChild)
|
|
|
| child->setParent(this);
|
|
|
| + setNeedsToUpdateAncestorDependentProperties();
|
| +
|
| if (child->stackingNode()->isNormalFlowOnly())
|
| m_stackingNode->dirtyNormalFlowList();
|
|
|
| @@ -3971,17 +3983,15 @@ void RenderLayer::styleChanged(StyleDifference diff, const RenderStyle* oldStyle
|
|
|
| compositor()->updateStyleDeterminedCompositingReasons(this);
|
|
|
| + setNeedsToUpdateAncestorDependentProperties();
|
| +
|
| // FIXME: Remove incremental compositing updates after fixing the chicken/egg issues
|
| // https://code.google.com/p/chromium/issues/detail?id=343756
|
| DisableCompositingQueryAsserts disabler;
|
|
|
| - // FIXME: We could avoid doing this ancestor walk by keeping a childNeedsToRecomputeBounds bit
|
| - // and using that along with needsToRecomputeBounds to set this bit in a later layer tree walk
|
| - // e.g. during assignLayersToBackings or computeCompositingRequirements.
|
| + // FIXME: Move this work to CompositingPropertyUpdater::updateAncestorDependentProperties.
|
| if (RenderLayer* compositingLayer = enclosingCompositingLayer())
|
| compositingLayer->compositedLayerMapping()->setNeedsGeometryUpdate();
|
| - // FIXME: We only need to set this if something changed that can change our absolute bounding rect.
|
| - m_needsToRecomputeBounds = true;
|
|
|
| const RenderStyle* newStyle = renderer()->style();
|
|
|
|
|