Skip to content

Commit 886b372

Browse files
committed
On zoom to overview, reflow text, if necessary.
Reset the text wrap scale to the correct value (i.e., reading level scale) on zoom to overview. This addresses the scenario where text is wrapped at a larger scale following a pinch zoom and double tap to reflow. Bug: 5254253 Change-Id: I57f706ef4254dd3f194cc35f109dd48b61b72f73
1 parent 758c787 commit 886b372

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/java/android/webkit/ZoomManager.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,11 @@ && exceedsMinScaleIncrement(mTextWrapScale, newTextWrapScale)
651651
mTextWrapScale = newTextWrapScale;
652652
refreshZoomScale(true);
653653
} else if (!mInZoomOverview && willScaleTriggerZoom(getZoomOverviewScale())) {
654+
// Reflow, if necessary.
655+
if (mTextWrapScale > getReadingLevelScale()) {
656+
mTextWrapScale = getReadingLevelScale();
657+
refreshZoomScale(true);
658+
}
654659
zoomToOverview();
655660
} else {
656661
zoomToReadingLevelOrMore();

0 commit comments

Comments
 (0)