diff options
author | Patrick Scott <phanna@android.com> | 2011-02-22 11:20:56 -0500 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2011-02-22 11:20:56 -0500 |
commit | b0c9a2b4033eca931163e8223d7eaa8889337144 (patch) | |
tree | 41b25d823cd2bad82c86882e1c0fe5d252ec6d6e /WebKit/android/nav/CachedLayer.cpp | |
parent | e248a68aa5529c1e5faba09893cf079b0657d898 (diff) | |
download | external_webkit-b0c9a2b4033eca931163e8223d7eaa8889337144.zip external_webkit-b0c9a2b4033eca931163e8223d7eaa8889337144.tar.gz external_webkit-b0c9a2b4033eca931163e8223d7eaa8889337144.tar.bz2 |
Scroll the RenderLayer during touch events.
Keep track of the owning layer for each LayerAndroid. No longer need to unadjust
the node bounds since the node will be scrolled into view.
Bug: 3442108
Change-Id: I7c9604d347af326ccfb86e6d3f2b95b7ce1b97c1
Diffstat (limited to 'WebKit/android/nav/CachedLayer.cpp')
-rw-r--r-- | WebKit/android/nav/CachedLayer.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/WebKit/android/nav/CachedLayer.cpp b/WebKit/android/nav/CachedLayer.cpp index 3321797..299f2d1 100644 --- a/WebKit/android/nav/CachedLayer.cpp +++ b/WebKit/android/nav/CachedLayer.cpp @@ -99,38 +99,6 @@ IntRect CachedLayer::adjustBounds(const LayerAndroid* root, return result; } -IntRect CachedLayer::unadjustBounds(const LayerAndroid* root, - const IntRect& bounds) const -{ - const LayerAndroid* aLayer = layer(root); - if (!aLayer) - return bounds; - - IntRect temp = bounds; - // Remove the new position (i.e. fixed position elements). - FloatPoint position = getGlobalPosition(aLayer); - - temp.move(-position.x(), -position.y()); - - // Remove any layer translation. - const FloatPoint& translation = aLayer->translation(); - temp.move(-translation.x(), -translation.y()); - - // Move it back to the original offset. - temp.move(mOffset.x(), mOffset.y()); - - DBG_NAV_LOGD("root=%p aLayer=%p [%d]" - " bounds=(%d,%d,w=%d,h=%d) trans=(%g,%g) pos=(%f,%f)" - " offset=(%d,%d)" - " result=(%d,%d,w=%d,h=%d)", - root, aLayer, aLayer->uniqueId(), - bounds.x(), bounds.y(), bounds.width(), bounds.height(), - translation.x(), translation.y(), position.x(), position.y(), - mOffset.x(), mOffset.y(), - temp.x(), temp.y(), temp.width(), temp.height()); - return temp; -} - FloatPoint CachedLayer::getGlobalPosition(const LayerAndroid* aLayer) const { SkPoint result = aLayer->getPosition(); |