| Index: Source/core/rendering/RenderLayer.cpp
|
| diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
|
| index ad3e7ab7da8e5168f6291d38a462cb0aff94f2e0..2536e6f529193a52081aa9a39488fccd56f44614 100644
|
| --- a/Source/core/rendering/RenderLayer.cpp
|
| +++ b/Source/core/rendering/RenderLayer.cpp
|
| @@ -1108,6 +1108,11 @@ const RenderLayer* RenderLayer::compositingContainer() const
|
| return 0;
|
| }
|
|
|
| +bool RenderLayer::isRepaintContainer() const
|
| +{
|
| + return compositingState() == PaintsIntoOwnBacking || compositingState() == PaintsIntoGroupedBacking;
|
| +}
|
| +
|
| // FIXME: having two different functions named enclosingCompositingLayer and enclosingCompositingLayerForRepaint
|
| // is error-prone and misleading for reading code that uses these functions - especially compounded with
|
| // the includeSelf option. It is very likely that we don't even want either of these functions; A layer
|
| @@ -1132,11 +1137,11 @@ RenderLayer* RenderLayer::enclosingCompositingLayerForRepaint(IncludeSelfOrNot i
|
| {
|
| ASSERT(isAllowedToQueryCompositingState());
|
|
|
| - if ((includeSelf == IncludeSelf) && (compositingState() == PaintsIntoOwnBacking || compositingState() == PaintsIntoGroupedBacking))
|
| + if ((includeSelf == IncludeSelf) && isRepaintContainer())
|
| return const_cast<RenderLayer*>(this);
|
|
|
| for (const RenderLayer* curr = compositingContainer(); curr; curr = curr->compositingContainer()) {
|
| - if (curr->compositingState() == PaintsIntoOwnBacking || curr->compositingState() == PaintsIntoGroupedBacking)
|
| + if (curr->isRepaintContainer())
|
| return const_cast<RenderLayer*>(curr);
|
| }
|
|
|
|
|