Bug 1201076 - Don't clobber the page rect update if one comes in while in the middle of a bounce animation. r=snorp
This commit is contained in:
@@ -950,14 +950,14 @@ class JavaPanZoomController
|
||||
synchronized (mTarget.getLock()) {
|
||||
float t = easeOut((float)mBounceDuration / BOUNCE_ANIMATION_DURATION);
|
||||
ImmutableViewportMetrics newMetrics = mBounceStartMetrics.interpolate(mBounceEndMetrics, t);
|
||||
mTarget.setViewportMetrics(newMetrics);
|
||||
mTarget.setViewportMetrics(newMetrics.setPageRectFrom(getMetrics()));
|
||||
}
|
||||
}
|
||||
|
||||
/* Concludes a bounce animation and snaps the viewport into place. */
|
||||
private void finishBounce() {
|
||||
synchronized (mTarget.getLock()) {
|
||||
mTarget.setViewportMetrics(mBounceEndMetrics);
|
||||
mTarget.setViewportMetrics(mBounceEndMetrics.setPageRectFrom(getMetrics()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user