diff options
author | Patrick Scott <phanna@android.com> | 2010-11-04 10:11:34 -0400 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2010-12-03 09:15:36 -0500 |
commit | 82f247bdbb98dd80c44209d87692c650c3704617 (patch) | |
tree | d8e9cb36f483b1e50d099563759d868aa6fef175 /WebKit/android/nav/CachedLayer.h | |
parent | 50114931eb31b3ee57480bf3d0068891aa62571f (diff) | |
download | external_webkit-82f247bdbb98dd80c44209d87692c650c3704617.zip external_webkit-82f247bdbb98dd80c44209d87692c650c3704617.tar.gz external_webkit-82f247bdbb98dd80c44209d87692c650c3704617.tar.bz2 |
Rewrite scrollable layers using multiple layers.
Remove PlatformBridge::updateLayers and instead call layersDraw from
ChromeClientAndroid during a requested sync.
Instead of LayerAndroid having knowledge of scrolling pictures, use multiple
layers (background, mask, foreground).
Update navigation to use the new structure. Always record nodes in absolute,
unscrolled coordinates. Do not track layers unless the node has a composited
layer and a last child. Check for composited parents when adding to tracked
layers as well.
TODO:
* developer.android.com doesn't completely work with navigation due to some
nodes being clipped out.
* BaseLayerAndroid needs to be able to operate with a matrix other than
identity.
* nested fixed position elements do not draw correctly.
* nested overflow layers haven't been tested.
Change-Id: I0e2bd37612341e8884d68153ab36194cb2dc1eeb
Diffstat (limited to 'WebKit/android/nav/CachedLayer.h')
-rw-r--r-- | WebKit/android/nav/CachedLayer.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/WebKit/android/nav/CachedLayer.h b/WebKit/android/nav/CachedLayer.h index fd5f4a0..db7bfb1 100644 --- a/WebKit/android/nav/CachedLayer.h +++ b/WebKit/android/nav/CachedLayer.h @@ -48,7 +48,7 @@ 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 + // Moves the bounds by the layer's position. Assumes the incoming // bounds have been adjusted by adjustBounds. IntRect unadjustBounds(const LayerAndroid* root, const IntRect& bounds) const; @@ -60,19 +60,17 @@ public: void toLocal(const LayerAndroid* root, int* xPtr, int* yPtr) const; void reset() { mLayer = 0; } void setCachedNodeIndex(int index) { mCachedNodeIndex = index; } + // Set the global position of the layer. This is recorded by the nav cache + // and corresponds to RenderLayer::absoluteBoundingBox() which is in + // document coordinates. This can be different from the global position of + // the layer if the layer is fixed positioned or scrollable. 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 |