Skip to content

Commit d3788b9

Browse files
Teng-Hui ZhuAndroid (Google) Code Review
authored andcommitted
Merge "WebView animation support" into ics-mr1
2 parents a9a91ad + 7ae9f3a commit d3788b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/java/android/webkit/ZoomManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,9 @@ public void animateZoom(Canvas canvas) {
493493

494494
if (mHardwareAccelerated) {
495495
mWebView.updateScrollCoordinates(mWebView.getScrollX() - tx, mWebView.getScrollY() - ty);
496+
// By adding webView matrix, we need to offset the canvas a bit
497+
// to make the animation smooth.
498+
canvas.translate(tx, ty);
496499
setZoomScale(zoomScale, false);
497500

498501
if (mZoomScale == 0) {

0 commit comments

Comments
 (0)