summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderLayerCompositor.cpp
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-08-13 16:17:40 -0400
committerPatrick Scott <phanna@android.com>2010-08-16 12:39:44 -0400
commit726264480d16a18c02f405aff63a32ba06fb0476 (patch)
tree97f7b473af2ce50a7165849008c1a4f385da3c5f /WebCore/rendering/RenderLayerCompositor.cpp
parenta01792f8060881461b672472ba3dfdd77044e0a5 (diff)
downloadexternal_webkit-726264480d16a18c02f405aff63a32ba06fb0476.zip
external_webkit-726264480d16a18c02f405aff63a32ba06fb0476.tar.gz
external_webkit-726264480d16a18c02f405aff63a32ba06fb0476.tar.bz2
Update navigation in scrollable layers.
Set the foreground clip after drawing. Use the absolute bounds to compute the local foreground clip in order to compensate for any outline. Consolidate the check for overflow scrolling into RenderLayer. Request a compositing update after computing the scroll dimensions. Only change the foregroundRect of the layer during paint so that the outline rect (and background/layerBounds) are correct. Draw the outline as part of the background phase. During painting of a layer, scroll to (0,0), paint, then scroll back. When clicking on an element in a layer, scroll to the position of the element but do not scroll back. This makes text input fields visible to the tree and will properly update when typing. Record the original scroll position of layers in order to offset the bounds of nodes when checking the nav cache. Make sure to reset all cached layers during setRootLayer. Otherwise we were reaching into layers from the wrong thread. Change-Id: Id9827ec461989b0869a8252d4d2563ecd12c5fac
Diffstat (limited to 'WebCore/rendering/RenderLayerCompositor.cpp')
-rw-r--r--WebCore/rendering/RenderLayerCompositor.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/WebCore/rendering/RenderLayerCompositor.cpp b/WebCore/rendering/RenderLayerCompositor.cpp
index 12c8a56..72a2d32 100644
--- a/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/WebCore/rendering/RenderLayerCompositor.cpp
@@ -1135,6 +1135,10 @@ bool RenderLayerCompositor::needsToBeComposited(const RenderLayer* layer) const
#if PLATFORM(ANDROID)
bool RenderLayerCompositor::requiresCompositingForMobileSites(const RenderLayer* layer) const
{
+#if ENABLE(ANDROID_OVERFLOW_SCROLL)
+ if (layer->hasOverflowScroll())
+ return true;
+#endif
#if ENABLE(COMPOSITED_FIXED_ELEMENTS)
// First, check if we are in an iframe, and if so bail out
if (m_renderView->document()->frame()->tree()->parent())
@@ -1174,9 +1178,6 @@ bool RenderLayerCompositor::requiresCompositingLayer(const RenderLayer* layer) c
return requiresCompositingForTransform(renderer)
#if PLATFORM(ANDROID)
|| requiresCompositingForMobileSites(layer)
-#if ENABLE(ANDROID_OVERFLOW_SCROLL)
- || renderer->hasOverflowClip()
-#endif
#endif
|| requiresCompositingForVideo(renderer)
|| requiresCompositingForCanvas(renderer)