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

Avoid extracting the main video in element fullscreen when fullscreen mode isn't active #1013

Merged
merged 0 commits into from May 25, 2022

Conversation

whsieh
Copy link
Member

@whsieh whsieh commented May 25, 2022

6abda06

Avoid extracting the main video in element fullscreen when fullscreen mode isn't active
https://bugs.webkit.org/show_bug.cgi?id=240910
rdar://93906888

Reviewed by Eric Carlson.

Add a check that we're actually still in element fullscreen before extracting the main video. Since
`WebFullScreenManager` and its `m_element` both persist after exiting fullscreen mode, there's
currently nothing preventing us from re-triggering video extraction when a video is paused once
again outside of fullscreen mode.

Covered by a new API test (more details in the bug).

* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::handleEvent):
(WebKit::WebFullScreenManager::mainVideoElementExtractionTimerFired):

Deal with another corner case, wherein the main video element we previously detected may no longer
be in the fullscreen element's subtree by the time that the extraction timer fires. To avoid this,
always update the main video element again when the extraction timer is fired (as long as we're
still in fullscreen mode), before proceeding with extraction.

Canonical link: https://commits.webkit.org/250985@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294835 268f45cc-cd09-0410-ab3c-d52691b4dbfc

@whsieh whsieh self-assigned this May 25, 2022
@whsieh whsieh added Platform Portability improvements and other general platform improvements not driven directly by site bugs. WebKit Nightly Build labels May 25, 2022
@whsieh whsieh added the merge-queue Applied to send a pull request to merge-queue label May 25, 2022
@whsieh
Copy link
Member Author

whsieh commented May 25, 2022

Thanks for the review!

@webkit-early-warning-system
Copy link
Collaborator

Committed r294835 (250985@main): https://commits.webkit.org/250985@main

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

@webkit-early-warning-system webkit-early-warning-system removed the merge-queue Applied to send a pull request to merge-queue label May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Portability improvements and other general platform improvements not driven directly by site bugs.
Projects
None yet
3 participants