OSDN Git Service

Fix a case introduced by https://android-git.corp.google.com/g/#change,47640
authorGrace Kloba <klobag@google.com>
Tue, 13 Apr 2010 18:31:15 +0000 (11:31 -0700)
committerGrace Kloba <klobag@google.com>
Tue, 13 Apr 2010 18:35:10 +0000 (11:35 -0700)
We skipped a call to WebKit at the end of the zoom
animation in the last CL.

Fix http://b/issue?id=2578820

core/java/android/webkit/WebView.java

index 4f2a67b..06a7a6f 100644 (file)
@@ -2150,11 +2150,15 @@ public class WebView extends AbsoluteLayout
                 mScrollX = pinLocX(Math.round(sx));
                 mScrollY = pinLocY(Math.round(sy));
 
+                // update webkit
                 if (oldX != mScrollX || oldY != mScrollY) {
                     onScrollChanged(mScrollX, mScrollY, oldX, oldY);
+                } else {
+                    // the scroll position is adjusted at the beginning of the
+                    // zoom animation. But we want to update the WebKit at the
+                    // end of the zoom animation. See comments in onScaleEnd().
+                    sendOurVisibleRect();
                 }
-
-                // update webkit
                 sendViewSizeZoom();
             }
         }