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/CachedFrame.cpp | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'WebKit/android/nav/CachedFrame.cpp') diff --git a/WebKit/android/nav/CachedFrame.cpp b/WebKit/android/nav/CachedFrame.cpp index 419be14..b26e24b 100644 --- a/WebKit/android/nav/CachedFrame.cpp +++ b/WebKit/android/nav/CachedFrame.cpp @@ -65,24 +65,6 @@ WebCore::IntRect CachedFrame::adjustBounds(const CachedNode* node, return rect; } -// This is for nodes inside a layer. It takes an IntRect that has been -// adjusted by the layer's position and removes the adjustment made by the -// layer. -WebCore::IntRect CachedFrame::unadjustBounds(const CachedNode* node, - const WebCore::IntRect& rect) const -{ -#if USE(ACCELERATED_COMPOSITING) - if (node->isInLayer()) { - const CachedLayer* cachedLayer = layer(node); - const WebCore::LayerAndroid* rootLayer = mRoot->rootLayer(); - const LayerAndroid* aLayer = cachedLayer->layer(rootLayer); - if (aLayer) - return cachedLayer->unadjustBounds(rootLayer, rect); - } -#endif - return rect; -} - bool CachedFrame::CheckBetween(Direction direction, const WebCore::IntRect& bestRect, const WebCore::IntRect& prior, WebCore::IntRect* result) { @@ -435,7 +417,6 @@ const CachedNode* CachedFrame::findBestAt(const WebCore::IntRect& rect, *directHit = test; *directHitFramePtr = this; IntRect r(center, IntSize(0, 0)); - r = unadjustBounds(test, r); *x = r.x(); *y = r.y(); } else { @@ -480,7 +461,6 @@ const CachedNode* CachedFrame::findBestAt(const WebCore::IntRect& rect, *inside = testInside; result = test; *framePtr = this; - both = unadjustBounds(test, both); *x = both.x() + (both.width() >> 1); *y = both.y() + (both.height() >> 1); } @@ -552,7 +532,6 @@ const CachedNode* CachedFrame::findBestHitAt(const WebCore::IntRect& rect, if (cursorRect.intersects(rect)) { WebCore::IntRect intersection(cursorRect); intersection.intersect(rect); - intersection = unadjustBounds(test, intersection); *x = intersection.x() + (intersection.width() >> 1); *y = intersection.y() + (intersection.height() >> 1); *framePtr = this; -- cgit v1.1