summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/LayerAndroid.h
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-12-09 18:12:20 -0500
committerPatrick Scott <phanna@android.com>2010-12-13 08:23:29 -0500
commitfe812d40b53dc52d5c929e39b5e293af8b6cb4e4 (patch)
tree81002048cd73d5fa21b7cac3b047c2f1b1755b64 /WebCore/platform/graphics/android/LayerAndroid.h
parent83ddee4501f0c2f48d1073e0185a2fb0a732c929 (diff)
downloadexternal_webkit-fe812d40b53dc52d5c929e39b5e293af8b6cb4e4.zip
external_webkit-fe812d40b53dc52d5c929e39b5e293af8b6cb4e4.tar.gz
external_webkit-fe812d40b53dc52d5c929e39b5e293af8b6cb4e4.tar.bz2
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
Diffstat (limited to 'WebCore/platform/graphics/android/LayerAndroid.h')
-rw-r--r--WebCore/platform/graphics/android/LayerAndroid.h18
1 files changed, 2 insertions, 16 deletions
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<AndroidAnimation> 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;