Chromium Code Reviews| Index: Source/core/rendering/RenderObject.cpp |
| diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
| index c6a232f38bc2474de06855f43d85c3e1ae11c2ae..d073c5c1bf75a6eabb16128ee7e5a5952bb940a2 100644 |
| --- a/Source/core/rendering/RenderObject.cpp |
| +++ b/Source/core/rendering/RenderObject.cpp |
| @@ -65,6 +65,7 @@ |
| #include "core/rendering/RenderListItem.h" |
| #include "core/rendering/RenderMarquee.h" |
| #include "core/rendering/RenderObjectInlines.h" |
| +#include "core/rendering/RenderPart.h" |
| #include "core/rendering/RenderScrollbarPart.h" |
| #include "core/rendering/RenderTableCaption.h" |
| #include "core/rendering/RenderTableCell.h" |
| @@ -1422,13 +1423,11 @@ const RenderLayerModelObject* RenderObject::containerForPaintInvalidation() cons |
| const 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; |
| + // FIXME: CompositingState is not necessarily up to date for many callers of this function. |
| + DisableCompositingQueryAsserts disabler; |
| - if (RenderLayer* compositingLayer = enclosingLayer()->enclosingLayerForPaintInvalidation()) |
| - container = compositingLayer->renderer(); |
| - } |
| + if (RenderLayer* compositingLayer = enclosingLayer()->enclosingLayerForPaintInvalidationCrossingFrameBoundaries()) |
| + container = compositingLayer->renderer(); |
| return container; |
| } |
| @@ -1449,7 +1448,12 @@ const RenderLayerModelObject* RenderObject::adjustCompositedContainerForSpecialA |
| if (!paintInvalidationContainer || paintInvalidationContainer->flowThreadContainingBlock() != parentRenderFlowThread) |
| paintInvalidationContainer = parentRenderFlowThread; |
| } |
| - return paintInvalidationContainer ? paintInvalidationContainer : view(); |
| + |
| + RenderView* renderView = view(); |
| + while (!paintInvalidationContainer && renderView->frame()->ownerRenderer()) |
|
leviw_travelin_and_unemployed
2014/08/07 18:54:05
It seems like we'd really want to put this after t
chrishtr
2014/08/07 20:20:26
Done.
|
| + renderView = frame()->ownerRenderer()->view(); |
| + |
| + return paintInvalidationContainer ? paintInvalidationContainer : renderView; |
| } |
| bool RenderObject::isPaintInvalidationContainer() const |
| @@ -1508,14 +1512,12 @@ void RenderObject::invalidatePaintUsingContainer(const RenderLayerModelObject* p |
| return; |
| } |
| - RenderView* v = view(); |
| if (paintInvalidationContainer->isRenderView()) { |
| - ASSERT(paintInvalidationContainer == v); |
| - v->invalidatePaintForRectangle(r); |
| + toRenderView(paintInvalidationContainer)->invalidatePaintForRectangle(r); |
| return; |
| } |
| - if (v->usesCompositing()) { |
| + if (view()->usesCompositing()) { |
| ASSERT(paintInvalidationContainer->hasLayer() && (paintInvalidationContainer->layer()->compositingState() == PaintsIntoOwnBacking || paintInvalidationContainer->layer()->compositingState() == PaintsIntoGroupedBacking)); |
| paintInvalidationContainer->layer()->repainter().setBackingNeedsRepaintInRect(r); |
| } |
| @@ -1746,6 +1748,11 @@ LayoutRect RenderObject::rectWithOutlineForPaintInvalidation(const RenderLayerMo |
| return r; |
| } |
| +LayoutRect RenderObject::absoluteClippedOverflowRect() const |
| +{ |
| + return clippedOverflowRectForPaintInvalidation(view()); |
| +} |
| + |
| LayoutRect RenderObject::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject*, const PaintInvalidationState*) const |
| { |
| ASSERT_NOT_REACHED(); |