From fe812d40b53dc52d5c929e39b5e293af8b6cb4e4 Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Thu, 9 Dec 2010 18:12:20 -0500 Subject: Fix hit testing inside layers. * Prevent asking for a sync in GraphicsLayerAndroid if some property has not changed. * Remove scrolling logic from LayerAndroid and create a subclass for scrollable layers. * Report the scrolling limits to the layer in order to scroll iframes (not turned on) and to avoid computing them each time the layer is scrolled. * Change the foreground rect calculations to better match the non-overflow case. * During hit testing, intersect the hitTestClip with the foreground and background to prevent false positives in the layer. * Prepare for iframe scrolling by adding code to trigger compositing for iframes. This currently works great except for navigation so it disabled for now. Bug: 3258631 Change-Id: I0da2d8dbe25376c6aa4f485c9350048c82c6f563 --- WebCore/platform/graphics/android/LayerAndroid.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'WebCore/platform/graphics/android/LayerAndroid.h') diff --git a/WebCore/platform/graphics/android/LayerAndroid.h b/WebCore/platform/graphics/android/LayerAndroid.h index 30f5555..510014b 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.h +++ b/WebCore/platform/graphics/android/LayerAndroid.h @@ -131,15 +131,6 @@ public: SkPicture* recordContext(); - // Returns true if the content position has changed. - bool scrollTo(int dx, int dy); - // Fills the rect with the current scroll offset and the maximum scroll. - // fLeft = scrollX - // fTop = scrollY - // fRight = maxX - // fBottom = maxY - void getScrollRect(SkIRect* out) const; - void addAnimation(PassRefPtr anim); void removeAnimation(const String& name); bool evaluateAnimations() const; @@ -193,12 +184,8 @@ public: void bounds(SkRect* ) const; - bool contentIsScrollable() const { return m_contentScrollable; } - - // Set when building the layer hierarchy for scrollable elements. - void setContentScrollable(bool scrollable) { - m_contentScrollable = scrollable; - } + virtual bool contentIsScrollable() const { return false; } + virtual LayerAndroid* copy() const { return new LayerAndroid(*this); } protected: virtual void onDraw(SkCanvas*, SkScalar opacity); @@ -219,7 +206,6 @@ private: bool m_doRotation; bool m_isFixed; bool m_backgroundColorSet; - bool m_contentScrollable; SkLength m_fixedLeft; SkLength m_fixedTop; -- cgit v1.1