OSDN Git Service

Fix scrolling offset of ScrollableLayer when we touch them.
authorNicolas Roard <nicolasroard@google.com>
Fri, 7 Oct 2011 18:54:14 +0000 (11:54 -0700)
committerNicolas Roard <nicolasroard@google.com>
Fri, 7 Oct 2011 18:54:14 +0000 (11:54 -0700)
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
Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h

index cd52937..4458a2c 100644 (file)
@@ -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; }
index a2486a5..5cba5d9 100644 (file)
@@ -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);