From 7e6e4dd41950ef98c67ee99be2d67daf563009ca Mon Sep 17 00:00:00 2001 From: "Shimeng (Simon) Wang" Date: Thu, 14 Jul 2011 15:13:53 -0700 Subject: Add android specific virtual function to GraphicsLayerClient. This lets the GraphicsLayerClient instance decides whether it has owning RenderLayer, instead of using static_cast. This makes overflow'ed iframe scrollable again. This change also reverts Tenghui's CL: https://android-git.corp.google.com/g/#change,115508 Tested on scrollable iframe and inline video. issue: 4902019 Change-Id: I252f5432b0750c5cac0a4404663e1730ef006cfc --- Source/WebCore/rendering/RenderLayerBacking.h | 3 +++ Source/WebCore/rendering/RenderLayerCompositor.cpp | 9 --------- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'Source/WebCore/rendering') diff --git a/Source/WebCore/rendering/RenderLayerBacking.h b/Source/WebCore/rendering/RenderLayerBacking.h index f1b8972..9e68209 100644 --- a/Source/WebCore/rendering/RenderLayerBacking.h +++ b/Source/WebCore/rendering/RenderLayerBacking.h @@ -59,6 +59,9 @@ public: RenderLayerBacking(RenderLayer*); ~RenderLayerBacking(); +#if PLATFORM(ANDROID) + virtual +#endif RenderLayer* owningLayer() const { return m_owningLayer; } enum UpdateDepth { CompositingChildren, AllDescendants }; diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp index 66dcf40..786f806 100644 --- a/Source/WebCore/rendering/RenderLayerCompositor.cpp +++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp @@ -1520,15 +1520,6 @@ bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* lay bool RenderLayerCompositor::requiresScrollLayer(RootLayerAttachment attachment) const { -#if PLATFORM(ANDROID) - // Recently, RenderLayerCompositor is changed to be a subclass of - // GraphicsLayerClient, and it is used for iframe. - // http://trac.webkit.org/changeset/75262 - // We have our own support for iframe, before we embrace this new approach, - // we will disable it. - // TODO: Investigate how to utilize this way to support iframe. - return false; -#endif // We need to handle our own scrolling if we're: return !m_renderView->frameView()->platformWidget() // viewless (i.e. non-Mac, or Mac in WebKit2) || attachment == RootLayerAttachedViaEnclosingFrame; // a composited frame on Mac -- cgit v1.1