[webkit-changes] [WebKit/WebKit] 64f1b5: Remove `FullscreenManager::currentFullscreenElemen...
Tim Nguyen
noreply at github.com
Fri Feb 7 08:45:15 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 64f1b5148b7c27db2f37a1677341bedf850f9687
https://github.com/WebKit/WebKit/commit/64f1b5148b7c27db2f37a1677341bedf850f9687
Author: Tim Nguyen <ntim at apple.com>
Date: 2025-02-07 (Fri, 07 Feb 2025)
Changed paths:
M Source/WebCore/css/SelectorCheckerTestFunctions.h
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/DocumentFullscreen.cpp
M Source/WebCore/dom/FullscreenManager.cpp
M Source/WebCore/dom/FullscreenManager.h
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/html/MediaElementSession.cpp
M Source/WebCore/rendering/RenderLayerCompositor.cpp
M Source/WebCore/style/UserAgentStyle.cpp
M Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp
M Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm
M Source/WebKitLegacy/mac/WebView/WebView.mm
Log Message:
-----------
Remove `FullscreenManager::currentFullscreenElement()`
https://bugs.webkit.org/show_bug.cgi?id=268232
rdar://121753573
Reviewed by Jer Noble.
It's a misleading function, especially in the case of an iframe being implicitly fullscreened by it's children. `currentFullscreenElement` will not work in that case.
m_fullscreenElement will be removed in a separate change, since it requires a bit of refactoring of the internal logic.
* Source/WebCore/css/SelectorCheckerTestFunctions.h:
(WebCore::matchesAnimatingFullscreenTransitionPseudoClass):
(WebCore::matchesInWindowFullscreenPseudoClass):
* Source/WebCore/dom/Document.cpp:
(WebCore::eventTargetElementForDocument):
* Source/WebCore/dom/DocumentFullscreen.cpp:
(WebCore::DocumentFullscreen::webkitCurrentFullScreenElement):
* Source/WebCore/dom/FullscreenManager.cpp:
(WebCore::FullscreenManager::didEnterFullscreen):
(WebCore::FullscreenManager::didExitFullscreen):
(WebCore::FullscreenManager::setAnimatingFullscreen):
* Source/WebCore/dom/FullscreenManager.h:
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::elementIsHidden const):
(WebCore::HTMLMediaElement::isFullscreen const):
(WebCore::HTMLMediaElement::isStandardFullscreen const):
(WebCore::HTMLMediaElement::exitFullscreen):
* Source/WebCore/html/MediaElementSession.cpp:
(WebCore::MediaElementSession::canShowControlsManager const):
(WebCore::MediaElementSession::updateMediaUsageIfChanged):
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::isDescendantOfFullScreenLayer):
* Source/WebCore/style/UserAgentStyle.cpp:
(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
The UA stylesheet needs to be initialized before checking for the fullscreen element.
Previously, the earlier timing of `currentFullscreenElement()` would achieve that.
Instead, initialize the UA stylesheet as soon as we have fullscreen manager.
* Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:
(webkit_dom_document_get_webkit_current_fullscreen_element):
* Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::createWindow):
* Source/WebKitLegacy/mac/WebView/WebView.mm:
(-[WebView _didStartProvisionalLoadForFrame:]):
Canonical link: https://commits.webkit.org/290008@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list