DO NOT MERGE

Remove testing (enable plugin) code.

No reflow when zoom in, auto reflow when zoom out.

Fix http://b/issue?id=2375955
This commit is contained in:
Grace Kloba
2010-01-15 16:02:57 -08:00
parent d79d1c7299
commit 5a0bf1f03e

View File

@@ -3747,8 +3747,10 @@ public class WebView extends AbsoluteLayout
mPreviewZoomOnly = false;
mAnchorX = viewToContentX((int) mZoomCenterX + mScrollX);
mAnchorY = viewToContentY((int) mZoomCenterY + mScrollY);
// for testing only, default don't reflow now
boolean reflowNow = !getSettings().getPluginsEnabled();
// don't reflow when zoom in; when zoom out, do reflow if the
// new scale is almost minimum scale;
boolean reflowNow = (mActualScale - mMinZoomScale <= 0.01f)
|| ((mActualScale <= 0.8 * mTextWrapScale));
// force zoom after mPreviewZoomOnly is set to false so that the
// new view size will be passed to the WebKit
setNewZoomScale(mActualScale, reflowNow, true);