| Index: Source/core/rendering/RenderObject.cpp | 
| diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp | 
| index 90168b68e03d29ea4969103e9811de8403fad49b..7a7b73b0bfcebec45439b9145ce3336b80b5bbfa 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,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()->paintInvalidator().setBackingNeedsPaintInvalidationInRect(r); | 
| } | 
| @@ -1764,6 +1768,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(); | 
|  |