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/CachedFrame.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/CachedFrame.cpp')
-rw-r--r-- | WebKit/android/nav/CachedFrame.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
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; |