From 726264480d16a18c02f405aff63a32ba06fb0476 Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Fri, 13 Aug 2010 16:17:40 -0400 Subject: 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 --- WebKit/android/nav/CachedRoot.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'WebKit/android/nav/CachedRoot.h') diff --git a/WebKit/android/nav/CachedRoot.h b/WebKit/android/nav/CachedRoot.h index 2853241..a6420f9 100644 --- a/WebKit/android/nav/CachedRoot.h +++ b/WebKit/android/nav/CachedRoot.h @@ -96,7 +96,10 @@ public: void setTextGeneration(int textGeneration) { mTextGeneration = textGeneration; } void setMaxScroll(int x, int y) { mMaxXScroll = x; mMaxYScroll = y; } void setPicture(SkPicture* picture) { mPicture = picture; } - void setRootLayer(WebCore::LayerAndroid* layer) { mRootLayer = layer; } + void setRootLayer(WebCore::LayerAndroid* layer) { + mRootLayer = layer; + resetLayers(); + } void setScrollOnly(bool state) { mScrollOnly = state; } void setSelection(int start, int end) { mSelectionStart = start; mSelectionEnd = end; } void setupScrolledBounds() const { mScrolledBounds = mViewBounds; } -- cgit v1.1