Skip to content
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

Return from PiP to Element Fullscreen Animation breaks sometimes #4873

Conversation

jernoble
Copy link
Contributor

@jernoble jernoble commented Sep 30, 2022

f235928

Return from PiP to Element Fullscreen Animation breaks sometimes
https://bugs.webkit.org/show_bug.cgi?id=245890
<rdar://98839882>

Reviewed by Eric Carlson.

When entering picture-in-picture from "element" fullscreen (as opposed to "video" i.e. "AVKit" fullscreen) tapping the "return" button in the PiP window will re-enter fullscreen. But because this operation may take a while (re-layout of a heavy page like youtube.com can take upwards of 500ms), WebKit performs a four-part transition: 1, enter AVKit fullscreen mode with blank content; 2, exit PiP into the AVKit fullscreen presentation; 3, enter "element" fullscreen mode behind AVKit's fullscreen presentation; 4, exit AKit fullscreen _into_ the "element" fullscreen presentation.

When this bug occurs, it appears that in step 3, the "element" fullscreen presentation happens _on top_ of the AVKit fullscreen presentation rather than below.

To mitigate this animation issue, disable the "element" fullscreen presentation animation when transitining to fullcreen from PiP mode.

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

Canonical link: https://commits.webkit.org/255041@main

e2d2dc6

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac   πŸ›  wpe
βœ… πŸ›  ios-sim   πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2   πŸ›  mac-AS-debug   πŸ§ͺ gtk-wk2
  πŸ§ͺ api-ios   πŸ§ͺ api-mac   πŸ§ͺ api-gtk
βœ… πŸ›  tv   πŸ§ͺ mac-wk1
βœ… πŸ›  tv-sim   πŸ§ͺ mac-wk2
βœ… πŸ›  watch   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  watch-sim   πŸ§ͺ mac-wk2-stress

@jernoble jernoble self-assigned this Sep 30, 2022
@jernoble jernoble added Media Bugs related to the HTML 5 Media elements. Other labels Sep 30, 2022
@jernoble jernoble added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Sep 30, 2022
https://bugs.webkit.org/show_bug.cgi?id=245890
<rdar://98839882>

Reviewed by Eric Carlson.

When entering picture-in-picture from "element" fullscreen (as opposed to "video" i.e. "AVKit" fullscreen) tapping the "return" button in the PiP window will re-enter fullscreen. But because this operation may take a while (re-layout of a heavy page like youtube.com can take upwards of 500ms), WebKit performs a four-part transition: 1, enter AVKit fullscreen mode with blank content; 2, exit PiP into the AVKit fullscreen presentation; 3, enter "element" fullscreen mode behind AVKit's fullscreen presentation; 4, exit AKit fullscreen _into_ the "element" fullscreen presentation.

When this bug occurs, it appears that in step 3, the "element" fullscreen presentation happens _on top_ of the AVKit fullscreen presentation rather than below.

To mitigate this animation issue, disable the "element" fullscreen presentation animation when transitining to fullcreen from PiP mode.

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

Canonical link: https://commits.webkit.org/255041@main
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/Return-from-PiP-to-Element-Fullscreen-Animation-breaks-sometimes branch from e2d2dc6 to f235928 Compare September 30, 2022 20:10
@webkit-commit-queue
Copy link
Collaborator

Committed 255041@main (f235928): https://commits.webkit.org/255041@main

Reviewed commits have been landed. Closing PR #4873 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit f235928 into WebKit:main Sep 30, 2022
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media Bugs related to the HTML 5 Media elements.
Projects
None yet
4 participants