Index: Source/core/rendering/RenderObject.cpp |
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
index 2e4e918febaacd02d627058cee922c127ab47b04..dd49e1196d6f569a1a74a77d79594879cccfd4d9 100644 |
--- a/Source/core/rendering/RenderObject.cpp |
+++ b/Source/core/rendering/RenderObject.cpp |
@@ -65,7 +65,6 @@ |
#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" |
@@ -1423,11 +1422,13 @@ |
const RenderLayerModelObject* RenderObject::enclosingCompositedContainer() const |
{ |
RenderLayerModelObject* container = 0; |
- // FIXME: CompositingState is not necessarily up to date for many callers of this function. |
- DisableCompositingQueryAsserts disabler; |
- |
- if (RenderLayer* compositingLayer = enclosingLayer()->enclosingLayerForPaintInvalidationCrossingFrameBoundaries()) |
- container = compositingLayer->renderer(); |
+ if (view()->usesCompositing()) { |
+ // FIXME: CompositingState is not necessarily up to date for many callers of this function. |
+ DisableCompositingQueryAsserts disabler; |
+ |
+ if (RenderLayer* compositingLayer = enclosingLayer()->enclosingLayerForPaintInvalidation()) |
+ container = compositingLayer->renderer(); |
+ } |
return container; |
} |
@@ -1448,14 +1449,7 @@ |
if (!paintInvalidationContainer || paintInvalidationContainer->flowThreadContainingBlock() != parentRenderFlowThread) |
paintInvalidationContainer = parentRenderFlowThread; |
} |
- |
- if (paintInvalidationContainer) |
- return paintInvalidationContainer; |
- |
- RenderView* renderView = view(); |
- while (renderView->frame()->ownerRenderer()) |
- renderView = renderView->frame()->ownerRenderer()->view(); |
- return renderView; |
+ return paintInvalidationContainer ? paintInvalidationContainer : view(); |
} |
bool RenderObject::isPaintInvalidationContainer() const |
@@ -1514,12 +1508,14 @@ |
return; |
} |
+ RenderView* v = view(); |
if (paintInvalidationContainer->isRenderView()) { |
- toRenderView(paintInvalidationContainer)->invalidatePaintForRectangle(r); |
- return; |
- } |
- |
- if (view()->usesCompositing()) { |
+ ASSERT(paintInvalidationContainer == v); |
+ v->invalidatePaintForRectangle(r); |
+ return; |
+ } |
+ |
+ if (v->usesCompositing()) { |
ASSERT(paintInvalidationContainer->hasLayer() && (paintInvalidationContainer->layer()->compositingState() == PaintsIntoOwnBacking || paintInvalidationContainer->layer()->compositingState() == PaintsIntoGroupedBacking)); |
paintInvalidationContainer->layer()->repainter().setBackingNeedsRepaintInRect(r); |
} |
@@ -1748,11 +1744,6 @@ |
LayoutRect r(clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState)); |
r.inflate(outlineWidth); |
return r; |
-} |
- |
-LayoutRect RenderObject::absoluteClippedOverflowRect() const |
-{ |
- return clippedOverflowRectForPaintInvalidation(view()); |
} |
LayoutRect RenderObject::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject*, const PaintInvalidationState*) const |