Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1b857d6d225136cda2fb75066538ca6798845d80
https://github.com/WebKit/WebKit/commit/1b857d6d225136cda2fb75066538ca6798845d80
Author: Jer Noble <[email protected]>
Date: 2024-02-12 (Mon, 12 Feb 2024)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h
M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
Log Message:
-----------
[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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes