summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2009-12-11 19:33:04 -0800
committerGrace Kloba <klobag@google.com>2009-12-12 12:35:54 -0800
commit70b942d34d1d1a30ab2d73bbefe214f5db0f4853 (patch)
treefdf396269827ec01709f9880d7f1973c04a7e7d5 /core/java
parent089455760c05289c1315268a6cb896577ceebc64 (diff)
downloadframeworks_base-70b942d34d1d1a30ab2d73bbefe214f5db0f4853.zip
frameworks_base-70b942d34d1d1a30ab2d73bbefe214f5db0f4853.tar.gz
frameworks_base-70b942d34d1d1a30ab2d73bbefe214f5db0f4853.tar.bz2
Post a Runnable to execute setNewZoomScale when
WebView's onSizeChanged is called. This will ensure requestLayout of the Child View works. Fix http://b/issue?id=2323445
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/webkit/WebView.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index b5d283d..a974653 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -3798,9 +3798,17 @@ public class WebView extends AbsoluteLayout
}
}
- // we always force, in case our height changed, in which case we still
- // want to send the notification over to webkit
- setNewZoomScale(mActualScale, true);
+ // onSizeChanged() is called during WebView layout. And any
+ // requestLayout() is blocked during layout. As setNewZoomScale() will
+ // call its child View to reposition itself through ViewManager's
+ // scaleAll(), we need to post a Runnable to ensure requestLayout().
+ post(new Runnable() {
+ public void run() {
+ // we always force, in case our height changed, in which case we
+ // still want to send the notification over to webkit
+ setNewZoomScale(mActualScale, true);
+ }
+ });
}
@Override