Index: Source/core/rendering/RenderObject.cpp |
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
index cb6890fc7fbb2181ff07bf906bad36f7c4adef6c..65759e9d4bbdf2491434c2d06fddca87f1b7164f 100644 |
--- a/Source/core/rendering/RenderObject.cpp |
+++ b/Source/core/rendering/RenderObject.cpp |
@@ -66,6 +66,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" |
@@ -1440,13 +1441,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; |
} |
@@ -1467,7 +1466,14 @@ const RenderLayerModelObject* RenderObject::adjustCompositedContainerForSpecialA |
if (!paintInvalidationContainer || paintInvalidationContainer->flowThreadContainingBlock() != parentRenderFlowThread) |
paintInvalidationContainer = parentRenderFlowThread; |
} |
- return paintInvalidationContainer ? paintInvalidationContainer : view(); |
+ |
+ if (paintInvalidationContainer) |
+ return paintInvalidationContainer; |
+ |
+ RenderView* renderView = view(); |
+ while (renderView->frame()->ownerRenderer()) |
+ renderView = renderView->frame()->ownerRenderer()->view(); |
+ return renderView; |
} |
bool RenderObject::isPaintInvalidationContainer() const |
@@ -1526,14 +1532,11 @@ 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 (paintInvalidationContainer->view()->usesCompositing()) { |
ASSERT(paintInvalidationContainer->hasLayer() && (paintInvalidationContainer->layer()->compositingState() == PaintsIntoOwnBacking || paintInvalidationContainer->layer()->compositingState() == PaintsIntoGroupedBacking)); |
paintInvalidationContainer->layer()->paintInvalidator().setBackingNeedsPaintInvalidationInRect(r); |
} |
@@ -1764,6 +1767,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(); |