Skip to content

Commit 43bc6b0

Browse files
jreckAndroid (Google) Code Review
authored andcommitted
Merge "Fix updateDoubleTapZoom logic" into ics-mr1
2 parents 1a3ece9 + 0598327 commit 43bc6b0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

core/java/android/webkit/ZoomManager.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -522,11 +522,12 @@ public boolean isFixedLengthAnimationInProgress() {
522522
}
523523

524524
public void updateDoubleTapZoom(int doubleTapZoom) {
525-
if (mInZoomOverview) {
526-
mDoubleTapZoomFactor = doubleTapZoom / 100.0f;
527-
mTextWrapScale = getReadingLevelScale();
528-
refreshZoomScale(true);
529-
}
525+
boolean zoomIn = (mTextWrapScale - mActualScale) < .1f;
526+
mDoubleTapZoomFactor = doubleTapZoom / 100.0f;
527+
mTextWrapScale = getReadingLevelScale();
528+
float newScale = zoomIn ? mTextWrapScale
529+
: Math.min(mTextWrapScale, mActualScale);
530+
setZoomScale(newScale, true, true);
530531
}
531532

532533
public void refreshZoomScale(boolean reflowText) {

0 commit comments

Comments
 (0)