-
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.
[iOS] Entering fullscreen from iframe without explicit viewport resul…
…ts in badly cropped video https://bugs.webkit.org/show_bug.cgi?id=270909 rdar://123725878 Reviewed by Abrar Rahman Protyasha. In 270199@main, support was added for using the viewport settings from the outermost fullscreen document, rather than the top document. This allowed an <iframe> whose contents specified a viewport-fit=cover behavior to work within a hosting document without that viewport setting. However, for an <iframe> whose contents did not specify a viewport at all, it would receive the default desktop viewport, which is 980px wide. This, combined with the iOS fullscreen behavior of blocking zoom, meant that the fullscreen viewport would be much, much larger than the physical viewport. When entering or exiting fullscreen mode, notify the WebPage, and reset the default viewport such that in fullscreen the web page will receive the "native" viewport rather than the "desktop" one by default. This requires storing the results of didReceiveMobileDocType(), so that it can be re-used after page load. * Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::willEnterFullScreen): (WebKit::WebFullScreenManager::didExitFullScreen): * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::isInFullscreenChanged): * Source/WebKit/WebProcess/WebPage/WebPage.h: * Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::didReceiveMobileDocType): (WebKit::WebPage::resetViewportDefaultConfiguration): Canonical link: https://commits.webkit.org/276138@main
- Loading branch information
Showing
7 changed files
with
54 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<script> | ||
window.addEventListener('load', event => { | ||
document.body.onclick = function() { | ||
document.body.webkitRequestFullScreen(); | ||
}; | ||
}); | ||
</script> | ||
<body> | ||
</body> | ||
</html> |
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