diff options
author | Patrick Scott <phanna@android.com> | 2010-12-15 08:21:15 -0500 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2010-12-15 08:21:15 -0500 |
commit | 1dd1344ade226cec7f9f85e84744fffdd222d232 (patch) | |
tree | e99ff47e802fe90ba5c617dce34221807598d760 /WebCore | |
parent | 052fc207e3b0c145df08f85c14a7946b5ae3b79f (diff) | |
download | external_webkit-1dd1344ade226cec7f9f85e84744fffdd222d232.zip external_webkit-1dd1344ade226cec7f9f85e84744fffdd222d232.tar.gz external_webkit-1dd1344ade226cec7f9f85e84744fffdd222d232.tar.bz2 |
Re-enable iframe scrolling.
This reverts commit c7911ffd666a7e73131dfd68919b769086a093e0.
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/config.h | 1 | ||||
-rw-r--r-- | WebCore/page/FrameView.cpp | 7 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | 3 | ||||
-rw-r--r-- | WebCore/rendering/RenderLayerCompositor.cpp | 17 |
4 files changed, 22 insertions, 6 deletions
diff --git a/WebCore/config.h b/WebCore/config.h index a7dfecd..c7dd31f 100644 --- a/WebCore/config.h +++ b/WebCore/config.h @@ -143,7 +143,6 @@ #define ENABLE_BLOB 1 #define ANDROID_FLATTEN_FRAMESET -#define ANDROID_FLATTEN_IFRAME #define ANDROID_LAYOUT diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp index 5374487..7d9920b 100644 --- a/WebCore/page/FrameView.cpp +++ b/WebCore/page/FrameView.cpp @@ -554,6 +554,13 @@ void FrameView::updateCompositingLayers() RenderView* view = m_frame->contentRenderer(); if (!view) return; +#if ENABLE(ANDROID_OVERFLOW_SCROLL) + // Enter compositing mode for child frames that have layout dimensions. The + // decision to enable compositing for the RenderView will be done in the + // compositor. + if (m_frame->ownerRenderer() && (layoutWidth() | layoutHeight())) + enterCompositingMode(); +#endif // This call will make sure the cached hasAcceleratedCompositing is updated from the pref view->compositor()->cacheAcceleratedCompositingFlags(); diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp index 0fdbc21..c0ad248 100644 --- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp @@ -367,8 +367,7 @@ void GraphicsLayerAndroid::setDrawsContent(bool drawsContent) m_foregroundClipLayer->addChild(m_foregroundLayer); m_contentLayer->addChild(m_foregroundClipLayer); - } else if (false /* FIXME: disable until navigation is fixed */ && - layer->isRootLayer() && + } else if (layer->isRootLayer() && layer->renderer()->frame()->ownerRenderer()) { // Replace the content layer with a scrollable layer. LayerAndroid* layer = new ScrollableLayerAndroid(*m_contentLayer); diff --git a/WebCore/rendering/RenderLayerCompositor.cpp b/WebCore/rendering/RenderLayerCompositor.cpp index ce80e5a..00e596b 100644 --- a/WebCore/rendering/RenderLayerCompositor.cpp +++ b/WebCore/rendering/RenderLayerCompositor.cpp @@ -1178,9 +1178,20 @@ bool RenderLayerCompositor::requiresCompositingForMobileSites(const RenderLayer* return true; HTMLFrameOwnerElement* ownerElement = enclosingIFrameElement(); RenderObject* renderer = ownerElement ? ownerElement->renderer() : 0; - // FIXME: Disabled for now until navigation is fixed. - if (false && layer->isRootLayer() && renderer && renderer->isRenderIFrame()) - return true; + if (layer->isRootLayer() && renderer && renderer->isRenderIFrame()) { + if (layer->renderer()->frame()) { + FrameView* view = layer->renderer()->frame()->view(); + if (view) { + // Enable compositing if the frame can scroll and the contents + // are larger than the layout dimensions. + ScrollbarMode h,v; + view->scrollbarModes(h, v); + if ((h != ScrollbarAlwaysOff && view->layoutWidth() < view->contentsWidth()) || + (v != ScrollbarAlwaysOff && view->layoutHeight() < view->contentsHeight())) + return true; + } + } + } #endif #if ENABLE(COMPOSITED_FIXED_ELEMENTS) // First, check if we are in an iframe, and if so bail out |