diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp index b375bd3..d196a0c 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp @@ -86,6 +86,16 @@ GraphicsLayer::~GraphicsLayer() removeFromParent(); } +bool GraphicsLayer::hasAncestor(GraphicsLayer* ancestor) const +{ + for (GraphicsLayer* curr = parent(); curr; curr = curr->parent()) { + if (curr == ancestor) + return true; + } + + return false; +} + void GraphicsLayer::addChild(GraphicsLayer* childLayer) { ASSERT(childLayer != this); |