am 70b942d3: Post a Runnable to execute setNewZoomScale when WebView\'s onSizeChanged is called. This will ensure requestLayout of the Child View works.

Merge commit '70b942d34d1d1a30ab2d73bbefe214f5db0f4853' into eclair-mr2-plus-aosp

* commit '70b942d34d1d1a30ab2d73bbefe214f5db0f4853':
  Post a Runnable to execute setNewZoomScale when
This commit is contained in:
Grace Kloba
2009-12-12 15:08:22 -08:00
committed by Android Git Automerger

View File

@@ -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