summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-09-12 11:07:57 +0100
committerSteve Block <steveblock@google.com>2011-09-19 19:03:27 +0100
commitf92d7cf56380e421b81212d32a557bda707a9555 (patch)
tree4591e9abf07a950f97b6e3ba183332f1e61b4555 /Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h
parentc67a79f4e1bc925d774dac03df5b964c841ddc9f (diff)
downloadexternal_webkit-f92d7cf56380e421b81212d32a557bda707a9555.zip
external_webkit-f92d7cf56380e421b81212d32a557bda707a9555.tar.gz
external_webkit-f92d7cf56380e421b81212d32a557bda707a9555.tar.bz2
Fixes style and adds some comments to layers code
Also removes FrameCachePermission::AllowNewest. This should have been removed as part of https://android-git.corp.google.com/g/#/c/2712. Bug: 5262656 Change-Id: I4d819cc5087653e4a1180d04ca0b5b20db7e2305
Diffstat (limited to 'Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h')
-rw-r--r--Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h b/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h
index c3fdecd..b59b4e1 100644
--- a/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h
+++ b/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h
@@ -42,15 +42,16 @@ public:
virtual LayerAndroid* copy() const { return new ScrollableLayerAndroid(*this); }
- // Returns true if the content position has changed.
- bool scrollTo(int dx, int dy);
+ // Scrolls to the given position in the layer.
+ // Returns whether or not any scrolling was required.
+ bool scrollTo(int x, int y);
- // Fills the rect with the current scroll offset and the maximum scroll.
+ // Fills the rect with the current scroll offset and the maximum scroll offset.
// fLeft = scrollX
// fTop = scrollY
- // fRight = maxX
- // fBottom = maxY
- void getScrollRect(SkIRect* out) const;
+ // fRight = maxScrollX
+ // fBottom = maxScrollY
+ void getScrollRect(SkIRect*) const;
void setScrollLimits(float x, float y, float width, float height)
{
@@ -61,6 +62,9 @@ public:
friend LayerAndroid* android::deserializeLayer(SkStream* stream);
private:
+ // The position of the visible area of the layer, relative to the parent
+ // layer. This is fixed during scrolling. We acheive scrolling by modifying
+ // the position of the layer.
SkRect m_scrollLimits;
};