Skip to content

[iOS] msn.com videos exit from fullscreen immediately #47391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eric-carlson
Copy link
Contributor

@eric-carlson eric-carlson commented Jun 30, 2025

96ba33b

[iOS] msn.com videos exit from fullscreen immediately
https://bugs.webkit.org/show_bug.cgi?id=295220
rdar://143989393

Reviewed by NOBODY (OOPS!).

msn.com creates and deletes <video> elements automatically based on the position of the
video containing element relative to the visual viewport. WebKit on iOS resets the scrollview
before entering element fullscreen, resulting in some <video> elements being offscreen after
entering fullscreen, which causes msn.com to delete the video element, which causes WebKit
to exit from fullscreen. Fix this by restoring the position of the scrollview before allowing
deferred `scroll` events to fire.

* LayoutTests/media/fullscreen-content-offset-expected.txt: Added.
* LayoutTests/media/fullscreen-content-offset.html: Added.

* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:completionHandler:]):

96ba33b

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ❌ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ❌ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ❌ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ❌ 🧪 mac-AS-debug-wk2 ❌ 🧪 gtk-wk2
✅ 🛠 vision-sim ❌ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ❌ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@eric-carlson eric-carlson requested a review from cdumez as a code owner June 30, 2025 20:14
@eric-carlson eric-carlson self-assigned this Jun 30, 2025
@eric-carlson eric-carlson added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Jun 30, 2025
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 30, 2025
https://bugs.webkit.org/show_bug.cgi?id=295220
rdar://143989393

Reviewed by NOBODY (OOPS!).

msn.com creates and deletes <video> elements automatically based on the position of the
video containing element relative to the visual viewport. WebKit on iOS resets the scrollview
before entering element fullscreen, resulting in some <video> elements being offscreen after
entering fullscreen, which causes msn.com to delete the video element, which causes WebKit
to exit from fullscreen. Fix this by restoring the position of the scrollview before allowing
deferred `scroll` events to fire.

* LayoutTests/media/fullscreen-content-offset-expected.txt: Added.
* LayoutTests/media/fullscreen-content-offset.html: Added.

* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:completionHandler:]):
@eric-carlson eric-carlson removed the merging-blocked Applied to prevent a change from being merged label Jun 30, 2025
@eric-carlson eric-carlson force-pushed the msn-fullscreen-video branch from 99a3791 to 96ba33b Compare June 30, 2025 22:32
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merging-blocked Applied to prevent a change from being merged New Bugs Unclassified bugs are placed in this component until the correct component can be determined.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants