From c5f63ef8fd51a45d0a11a84cb65301c66e6c6cac Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Fri, 7 Oct 2011 11:54:14 -0700 Subject: Fix scrolling offset of ScrollableLayer when we touch them. With the new direct update, we are setting directly the layers position; but for ScrollableLayer, we already set their position in the UI, so for them their webkit counterpart is actually older/wrong. The fix consists simply in not updating the positioning of ScrollableLayer. bug:5421867 Change-Id: Ia14e41aff641173a45ed898cd3b3eceab3f7bd7a --- Source/WebCore/platform/graphics/android/LayerAndroid.h | 2 +- Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'Source/WebCore/platform/graphics/android') diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.h b/Source/WebCore/platform/graphics/android/LayerAndroid.h index cd52937..4458a2c 100644 --- a/Source/WebCore/platform/graphics/android/LayerAndroid.h +++ b/Source/WebCore/platform/graphics/android/LayerAndroid.h @@ -280,7 +280,7 @@ public: // such as the position, the transform. Return true if anything more // complex is needed. bool updateWithTree(LayerAndroid*); - bool updateWithLayer(LayerAndroid*); + virtual bool updateWithLayer(LayerAndroid*); SkBitmapRef* imageRef() { return m_imageRef; } ImageTexture* imageTexture() { return m_imageTexture; } diff --git a/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h b/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h index a2486a5..5cba5d9 100644 --- a/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h +++ b/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h @@ -42,6 +42,8 @@ public: virtual LayerAndroid* copy() const { return new ScrollableLayerAndroid(*this); } + virtual bool updateWithLayer(LayerAndroid*) { return true; } + // Scrolls to the given position in the layer. // Returns whether or not any scrolling was required. bool scrollTo(int x, int y); -- cgit v1.1