-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 1b857d6. rdar://121898126
[iOS] Pinch zooming then fullscreening causes fullscreen presentation to be zoomed unexpectedly https://bugs.webkit.org/show_bug.cgi?id=269195 rdar://121898126 Reviewed by Andy Estes. The intent of the fullscreen presentation on iOS is to disable zooming & lock the zoom level to an extent to which the entire contents of the fulscreen element are visible in the viewport. However, the web page itself can change the minimum and maximum zoom levels (and even the current zoom level). When this happens, it breaks the expected behavior of fullscreen mode, which is to show the entire contents of the fullscreen element in the viewport. The previous implementation attempted to save and restore the min, max, and current zoom levels when entering and exiting fullscreen, assuming those levels would not be re-set during fullscreen mode. This assumption was not met. Instead, add an IPI to override zoom levels sent by the page during rendering, and a matching IPI to remove that override. Only the current zoom level is saved and restored. * Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h: * Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h: * Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _updateScrollViewForTransaction:]): (-[WKWebView _overrideZoomScaleParametersWithMinimumZoomScale:maximumZoomScale:allowUserScaling:]): (-[WKWebView _clearOverrideZoomScaleParameters]): * Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: (WebKit::WKWebViewState::applyTo): (WebKit::WKWebViewState::store): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController _reinsertWebViewUnderPlaceholder]): Canonical link: https://commits.webkit.org/274503@main Identifier: 272448.608@safari-7618-branch
- Loading branch information
Showing
4 changed files
with
36 additions
and
9 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 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