diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2011-07-06 14:30:38 -0700 |
---|---|---|
committer | Shimeng (Simon) Wang <swang@google.com> | 2011-07-06 14:30:38 -0700 |
commit | 1bf0456b290c9c1428d192a1134ded28b4d6c777 (patch) | |
tree | a29d6e15019126d885ffadcc95196cd7482eb538 | |
parent | 63acea6ad4a9316e1450dea47840f45df4aaed25 (diff) | |
download | frameworks_base-1bf0456b290c9c1428d192a1134ded28b4d6c777.zip frameworks_base-1bf0456b290c9c1428d192a1134ded28b4d6c777.tar.gz frameworks_base-1bf0456b290c9c1428d192a1134ded28b4d6c777.tar.bz2 |
Treat restored defaultScale as overview.
Since usually restored defaultScale means previous scale is not saved.
issue: 4975315
Change-Id: Icc34469d0459fb5254567fe9f3cc5032b6349405
-rw-r--r-- | core/java/android/webkit/ZoomManager.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/webkit/ZoomManager.java b/core/java/android/webkit/ZoomManager.java index 7d43e94..252fc8f 100644 --- a/core/java/android/webkit/ZoomManager.java +++ b/core/java/android/webkit/ZoomManager.java @@ -1111,6 +1111,12 @@ class ZoomManager { mTextWrapScale = Math.max(mTextWrapScale, overviewScale); } reflowText = exceedsMinScaleIncrement(mTextWrapScale, scale); + } else { + // In case of restored scale, treat defaultScale as overview since + // it usually means the previous scale is not saved. + if (scale == mDefaultScale && settings.getLoadWithOverviewMode()) { + scale = overviewScale; + } } mInitialZoomOverview = settings.getLoadWithOverviewMode() && !exceedsMinScaleIncrement(scale, overviewScale); |