summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav/CachedLayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/nav/CachedLayer.h')
-rw-r--r--WebKit/android/nav/CachedLayer.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/WebKit/android/nav/CachedLayer.h b/WebKit/android/nav/CachedLayer.h
index c802407..0a56ea1 100644
--- a/WebKit/android/nav/CachedLayer.h
+++ b/WebKit/android/nav/CachedLayer.h
@@ -47,20 +47,29 @@ public:
}
// FIXME: adjustBounds should be renamed globalBounds or toGlobal
IntRect adjustBounds(const LayerAndroid* root, const IntRect& bounds) const;
+ // Moves the bounds by the layer's scroll position. Assumes the incoming
+ // bounds have been adjusted by adjustBounds.
+ IntRect unadjustBounds(const LayerAndroid* root,
+ const IntRect& bounds) const;
int cachedNodeIndex() const { return mCachedNodeIndex; }
- const IntPoint& getOffset() const { return mOffset; }
const LayerAndroid* layer(const LayerAndroid* root) const;
- IntRect localBounds(const IntRect& bounds) const;
+ IntRect localBounds(const LayerAndroid* root, const IntRect& bounds) const;
SkPicture* picture(const LayerAndroid* root) const;
void reset() { mLayer = 0; }
void setCachedNodeIndex(int index) { mCachedNodeIndex = index; }
void setOffset(const IntPoint& offset) { mOffset = offset; }
+ void setScrollOffset(const IntPoint& scrollOffset) {
+ mScrollOffset = scrollOffset;
+ }
void setUniqueId(int uniqueId) { mUniqueId = uniqueId; }
int uniqueId() const { return mUniqueId; }
private:
int mCachedNodeIndex;
mutable const LayerAndroid* mLayer;
+ // mOffset and mScrollOffset are the position and scroll offset of the
+ // layer when recorded by the nav cache.
IntPoint mOffset;
+ IntPoint mScrollOffset;
int mUniqueId;
#if DUMP_NAV_CACHE