diff options
author | Patrick Scott <phanna@android.com> | 2010-12-21 10:36:17 -0500 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2010-12-21 11:40:47 -0500 |
commit | 265109f2150dcc0a619e2273152ea43623fc215a (patch) | |
tree | b3991d2b2fc175c88d8338b64dc9d9cd426e540e /WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | |
parent | 8349050efe037c35b231c2f108777bed60d470cc (diff) | |
download | external_webkit-265109f2150dcc0a619e2273152ea43623fc215a.zip external_webkit-265109f2150dcc0a619e2273152ea43623fc215a.tar.gz external_webkit-265109f2150dcc0a619e2273152ea43623fc215a.tar.bz2 |
Fix iframe scrolling.
Do the same check everywhere for enabling scrolling in an iframe. Make sure the
owner renderer is a RenderIFrame to avoid trying to composite an embedded
object. Also check if the owner layer has visible content since some iframes
are marked hidden.
Dirty the parent normal flow list when turning on overflow scrolling for divs.
Bug: 3280851
Bug: 3290276
Change-Id: I8d0a49324e06426c15abaf552874a32d6e2ee11a
Diffstat (limited to 'WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp')
-rw-r--r-- | WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp index 2fa1215..d99c1cb 100644 --- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp @@ -373,10 +373,15 @@ void GraphicsLayerAndroid::setDrawsContent(bool drawsContent) m_contentLayer->addChild(m_foregroundClipLayer); } else if (layer->isRootLayer() && layer->renderer()->frame()->ownerRenderer()) { - // Replace the content layer with a scrollable layer. - LayerAndroid* layer = new ScrollableLayerAndroid(*m_contentLayer); - m_contentLayer->unref(); - m_contentLayer = layer; + // We have to do another check for scrollable content since an + // iframe might be compositing for other reasons. + FrameView* view = layer->renderer()->frame()->view(); + if (view->hasOverflowScroll()) { + // Replace the content layer with a scrollable layer. + LayerAndroid* layer = new ScrollableLayerAndroid(*m_contentLayer); + m_contentLayer->unref(); + m_contentLayer = layer; + } } } #endif |