diff options
| author | Grace Kloba <klobag@google.com> | 2009-12-20 11:33:58 -0800 |
|---|---|---|
| committer | Grace Kloba <klobag@google.com> | 2009-12-20 11:33:58 -0800 |
| commit | 9a67c82089e43d37f5038c74b0e1dca8edc4ac8a (patch) | |
| tree | b9d94f8fd20045a3d8a89c5b6720427c50d27fb7 /core/java/android/webkit/WebView.java | |
| parent | 4d0e827d0be6085893428b420ec5800f1973a43b (diff) | |
| download | frameworks_base-9a67c82089e43d37f5038c74b0e1dca8edc4ac8a.zip frameworks_base-9a67c82089e43d37f5038c74b0e1dca8edc4ac8a.tar.gz frameworks_base-9a67c82089e43d37f5038c74b0e1dca8edc4ac8a.tar.bz2 | |
Address the multiple resizing during initializing
problem adobe run into.
When a child view is created, we first hide it if
the webview is not ready to draw yet. This will avoid
the multiple resizing notification.
Diffstat (limited to 'core/java/android/webkit/WebView.java')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 9ca7adc..bfe5b41 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -773,12 +773,11 @@ public class WebView extends AbsoluteLayout init(); mCallbackProxy = new CallbackProxy(context, this); + mViewManager = new ViewManager(this); mWebViewCore = new WebViewCore(context, this, mCallbackProxy, javascriptInterfaces); mDatabase = WebViewDatabase.getInstance(context); mScroller = new Scroller(context); - mViewManager = new ViewManager(this); - mZoomButtonsController = new ZoomButtonsController(this); mZoomButtonsController.setOnZoomListener(mZoomListener); // ZoomButtonsController positions the buttons at the bottom, but in @@ -5410,7 +5409,8 @@ public class WebView extends AbsoluteLayout final Point viewSize = draw.mViewPoint; boolean useWideViewport = settings.getUseWideViewPort(); WebViewCore.RestoreState restoreState = draw.mRestoreState; - if (restoreState != null) { + boolean hasRestoreState = restoreState != null; + if (hasRestoreState) { mInZoomOverview = false; mLastScale = mInitialScaleInPercent > 0 ? mInitialScaleInPercent / 100.0f @@ -5500,6 +5500,9 @@ public class WebView extends AbsoluteLayout if (draw.mFocusSizeChanged && inEditingMode()) { mFocusSizeChanged = true; } + if (hasRestoreState) { + mViewManager.postReadyToDrawAll(); + } break; } case WEBCORE_INITIALIZED_MSG_ID: |
