Merge "Stay in layer scroll if nothing to scroll" into jb-dev

This commit is contained in:
John Reck
2012-06-07 15:29:46 -07:00
committed by Android (Google) Code Review

View File

@ -6224,8 +6224,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
final int resultY = Math.max(0, final int resultY = Math.max(0,
Math.min(mScrollingLayerRect.top + contentY, maxY)); Math.min(mScrollingLayerRect.top + contentY, maxY));
if (resultX != mScrollingLayerRect.left || if (resultX != mScrollingLayerRect.left
resultY != mScrollingLayerRect.top) { || resultY != mScrollingLayerRect.top
|| (contentX | contentY) == 0) {
// In case we switched to dragging the page. // In case we switched to dragging the page.
mTouchMode = TOUCH_DRAG_LAYER_MODE; mTouchMode = TOUCH_DRAG_LAYER_MODE;
deltaX = contentX; deltaX = contentX;