From b0c9a2b4033eca931163e8223d7eaa8889337144 Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Tue, 22 Feb 2011 11:20:56 -0500 Subject: 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 --- WebKit/android/nav/CachedLayer.cpp | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'WebKit/android/nav/CachedLayer.cpp') 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(); -- cgit v1.1