Merge "Don't redraw when not scrolling, even if finger is held down."
This commit is contained in:
@@ -4499,6 +4499,9 @@ public class WebView extends AbsoluteLayout
|
|||||||
if (mHeldMotionless == MOTIONLESS_FALSE) {
|
if (mHeldMotionless == MOTIONLESS_FALSE) {
|
||||||
mPrivateHandler.sendMessageDelayed(mPrivateHandler
|
mPrivateHandler.sendMessageDelayed(mPrivateHandler
|
||||||
.obtainMessage(DRAG_HELD_MOTIONLESS), MOTIONLESS_TIME);
|
.obtainMessage(DRAG_HELD_MOTIONLESS), MOTIONLESS_TIME);
|
||||||
|
mPrivateHandler.sendMessageDelayed(mPrivateHandler
|
||||||
|
.obtainMessage(AWAKEN_SCROLL_BARS),
|
||||||
|
ViewConfiguration.getScrollDefaultDelay());
|
||||||
mHeldMotionless = MOTIONLESS_PENDING;
|
mHeldMotionless = MOTIONLESS_PENDING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5996,6 +5999,7 @@ public class WebView extends AbsoluteLayout
|
|||||||
mTouchMode = TOUCH_DRAG_START_MODE;
|
mTouchMode = TOUCH_DRAG_START_MODE;
|
||||||
mConfirmMove = true;
|
mConfirmMove = true;
|
||||||
mPrivateHandler.removeMessages(RESUME_WEBCORE_PRIORITY);
|
mPrivateHandler.removeMessages(RESUME_WEBCORE_PRIORITY);
|
||||||
|
nativeSetIsScrolling(false);
|
||||||
} else if (mPrivateHandler.hasMessages(RELEASE_SINGLE_TAP)) {
|
} else if (mPrivateHandler.hasMessages(RELEASE_SINGLE_TAP)) {
|
||||||
mPrivateHandler.removeMessages(RELEASE_SINGLE_TAP);
|
mPrivateHandler.removeMessages(RELEASE_SINGLE_TAP);
|
||||||
if (USE_WEBKIT_RINGS || getSettings().supportTouchOnly()) {
|
if (USE_WEBKIT_RINGS || getSettings().supportTouchOnly()) {
|
||||||
@@ -6278,9 +6282,16 @@ public class WebView extends AbsoluteLayout
|
|||||||
}
|
}
|
||||||
mLastTouchX = x;
|
mLastTouchX = x;
|
||||||
mLastTouchY = y;
|
mLastTouchY = y;
|
||||||
if ((deltaX | deltaY) != 0) {
|
|
||||||
|
if (deltaX * deltaX + deltaY * deltaY > mTouchSlopSquare) {
|
||||||
mHeldMotionless = MOTIONLESS_FALSE;
|
mHeldMotionless = MOTIONLESS_FALSE;
|
||||||
|
nativeSetIsScrolling(true);
|
||||||
|
} else {
|
||||||
|
mHeldMotionless = MOTIONLESS_TRUE;
|
||||||
|
nativeSetIsScrolling(false);
|
||||||
|
keepScrollBarsVisible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
mLastTouchTime = eventTime;
|
mLastTouchTime = eventTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6296,9 +6307,15 @@ public class WebView extends AbsoluteLayout
|
|||||||
// keep the scrollbar on the screen even there is no scroll
|
// keep the scrollbar on the screen even there is no scroll
|
||||||
awakenScrollBars(ViewConfiguration.getScrollDefaultDelay(),
|
awakenScrollBars(ViewConfiguration.getScrollDefaultDelay(),
|
||||||
false);
|
false);
|
||||||
|
// Post a message so that we'll keep them alive while we're not scrolling.
|
||||||
|
mPrivateHandler.sendMessageDelayed(mPrivateHandler
|
||||||
|
.obtainMessage(AWAKEN_SCROLL_BARS),
|
||||||
|
ViewConfiguration.getScrollDefaultDelay());
|
||||||
// return false to indicate that we can't pan out of the
|
// return false to indicate that we can't pan out of the
|
||||||
// view space
|
// view space
|
||||||
return !done;
|
return !done;
|
||||||
|
} else {
|
||||||
|
mPrivateHandler.removeMessages(AWAKEN_SCROLL_BARS);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user