Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[iOS] Adjust initial scale zooming heuristics when changing view scale
https://bugs.webkit.org/show_bug.cgi?id=194995 Reviewed by Tim Horton. Source/WebKit: Currently, we only zoom to the new initial scale iff we're exactly at initial scale before changing the view scale. This was done so that if a user zoomed in really far and then increased the view scale, we wouldn't end up zooming out as a result. However, this leads to confusing behavior in the case where the user has manually changed the zoom scale to something close to (but not exactly) initial scale, and then attempts to zoom in further using view scale. In this case, we'll end up keeping page scale the same, so it looks like nothing is happening. To fix this, we tweak our heuristics for determining whether to jump to initial scale; if the view scale is increasing and the new initial scale is greater than the current scale, zoom to initial scale. Likewise, if the view scale is decreasing and the new initial scale is less than the current scale, zoom to initial scale. Test: fast/viewport/ios/initial-scale-after-changing-view-scale.html * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::setViewportConfigurationViewLayoutSize): LayoutTests: Rebaseline and adjust an existing layout test. * fast/viewport/ios/initial-scale-after-changing-view-scale-expected.txt: * fast/viewport/ios/initial-scale-after-changing-view-scale.html: * platform/ipad/fast/viewport/ios/initial-scale-after-changing-view-scale-expected.txt: Removed. Removed an iPad-specific test expectation, since initial scale zooming behavior should be the same now at both device dimensions. Canonical link: https://commits.webkit.org/209383@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
6 changed files
with
60 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters