| Index: Source/core/rendering/RenderObject.cpp
|
| diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
|
| index f96b3e8e279e98f33374b337fd121df94b189e8f..989b2747246aae4095a86a6379edf45fa5571644 100644
|
| --- a/Source/core/rendering/RenderObject.cpp
|
| +++ b/Source/core/rendering/RenderObject.cpp
|
| @@ -1335,22 +1335,34 @@ void RenderObject::paint(PaintInfo&, const LayoutPoint&)
|
| {
|
| }
|
|
|
| +bool RenderObject::isRepaintContainer() const
|
| +{
|
| + return hasLayer() && toRenderLayerModelObject(this)->layer()->isRepaintContainer();
|
| +}
|
| +
|
| RenderLayerModelObject* RenderObject::containerForRepaint() const
|
| {
|
| if (!isRooted())
|
| return 0;
|
|
|
| - RenderLayerModelObject* repaintContainer = 0;
|
| + return adjustCompositedContainerForSpecialAncestors(enclosingCompositedContainer());
|
| +}
|
|
|
| - RenderView* renderView = view();
|
| - if (renderView->usesCompositing()) {
|
| +RenderLayerModelObject* RenderObject::enclosingCompositedContainer() const
|
| +{
|
| + RenderLayerModelObject* container = 0;
|
| + if (view()->usesCompositing()) {
|
| // FIXME: CompositingState is not necessarily up to date for many callers of this function.
|
| DisableCompositingQueryAsserts disabler;
|
|
|
| if (RenderLayer* compositingLayer = enclosingLayer()->enclosingCompositingLayerForRepaint())
|
| - repaintContainer = compositingLayer->renderer();
|
| + container = compositingLayer->renderer();
|
| }
|
| + return container;
|
| +}
|
|
|
| +RenderLayerModelObject* RenderObject::adjustCompositedContainerForSpecialAncestors(RenderLayerModelObject* repaintContainer) const
|
| +{
|
| if (document().view()->hasSoftwareFilters()) {
|
| if (RenderLayer* enclosingFilterLayer = enclosingLayer()->enclosingFilterLayer())
|
| return enclosingFilterLayer->renderer();
|
| @@ -1365,7 +1377,7 @@ RenderLayerModelObject* RenderObject::containerForRepaint() const
|
| if (!repaintContainer || repaintContainer->flowThreadContainingBlock() != parentRenderFlowThread)
|
| repaintContainer = parentRenderFlowThread;
|
| }
|
| - return repaintContainer ? repaintContainer : renderView;
|
| + return repaintContainer ? repaintContainer : view();
|
| }
|
|
|
| template<typename T> PassRefPtr<JSONValue> jsonObjectForRect(const T& rect)
|
| @@ -1511,7 +1523,7 @@ const char* RenderObject::invalidationReasonToString(InvalidationReason reason)
|
| return "";
|
| }
|
|
|
| -void RenderObject::repaintTreeAfterLayout()
|
| +void RenderObject::repaintTreeAfterLayout(RenderLayerModelObject& repaintContainer)
|
| {
|
| // If we didn't need invalidation then our children don't need as well.
|
| // Skip walking down the tree as everything should be fine below us.
|
| @@ -1522,7 +1534,7 @@ void RenderObject::repaintTreeAfterLayout()
|
|
|
| for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
|
| if (!child->isOutOfFlowPositioned())
|
| - child->repaintTreeAfterLayout();
|
| + child->repaintTreeAfterLayout(repaintContainer);
|
| }
|
| }
|
|
|
|
|