Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1ede5ce1bc22f7fd38c9d58bc0655f443eff8612
https://github.com/WebKit/WebKit/commit/1ede5ce1bc22f7fd38c9d58bc0655f443eff8612
Author: Jer Noble <[email protected]>
Date: 2025-10-17 (Fri, 17 Oct 2025)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
A Tools/TestWebKitAPI/TestElementFullscreenDelegate.h
A Tools/TestWebKitAPI/TestElementFullscreenDelegate.mm
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A
Tools/TestWebKitAPI/Tests/WebKitCocoa/ElementFullscreenIntersectionObserver.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/UI/ElementFullscreen.mm
Log Message:
-----------
[iPad] Bsky.com video posts can't enter fullscreen mode
rdar://139744548
https://bugs.webkit.org/show_bug.cgi?id=301014
Reviewed by Eric Carlson.
In a synthetic testcase
(https://jernoble.github.io/samples/bin/element-fullscreen/viewport-visibility-during-fullscreen.html)
we see that entering fullscreen after scrolling away from the initial viewport
will
result in multiple IntersectionObserver callbacks, some of which will say that
the
fullscreen element no longer intersects with the viewport. This behavior causes
clients
which use IntersectionObserver to tear down their video playback when scrolled
out
of view to tear down the very element (or its parent) that is going into
fullscreen.
We already suspend scroll and resize events during fullscreen transitions, and
doing
the same for IntersectionObserver callbacks does allow bsky.com posts to
sucessfully
enter into fullscreen also.
Test:
Tools/TestWebKitAPI/Tests/WebKitCocoa/ElementFullscreenIntersectionObserver.mm
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::flushDeferredIntersectionObservations):
(WebCore::Document::updateIntersectionObservations):
* Source/WebCore/dom/Document.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::startDeferringIntersectionObservations):
(WebCore::Page::flushDeferredIntersectionObservations):
* Source/WebCore/page/Page.h:
(WebCore::Page::shouldDeferIntersectionObservations const):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::startDeferringIntersectionObservations):
(WebKit::WebPageProxy::flushDeferredIntersectionObservations):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController
_enterFullScreen:windowScene:completionHandler:]):
(-[WKFullScreenWindowController
beganEnterFullScreenWithInitialFrame:finalFrame:completionHandler:]):
(-[WKFullScreenWindowController _completedExitFullScreen:]):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::startDeferringIntersectionObservations):
(WebKit::WebPage::flushDeferredIntersectionObservations):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Tools/TestWebKitAPI/TestElementFullscreenDelegate.h: Added.
* Tools/TestWebKitAPI/TestElementFullscreenDelegate.mm: Added.
(-[TestElementFullscreenDelegate waitForDidEnterElementFullscreen]):
(-[TestElementFullscreenDelegate waitForWillEnterElementFullscreen]):
(-[TestElementFullscreenDelegate
_webViewWillEnterElementFullscreen:_webViewWillEnterFullscreen:]):
(-[TestElementFullscreenDelegate
_webViewDidEnterElementFullscreen:_webViewDidEnterFullscreen:]):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
*
Tools/TestWebKitAPI/Tests/WebKitCocoa/ElementFullscreenIntersectionObserver.mm:
Added.
(TEST(ElementFullscreen, IntersectionObserver)):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/UI/ElementFullscreen.mm:
(-[TestElementFullscreenDelegate waitForDidEnterElementFullscreen]): Deleted.
(-[TestElementFullscreenDelegate waitForWillEnterElementFullscreen]): Deleted.
(-[TestElementFullscreenDelegate
_webViewWillEnterElementFullscreen:_webViewWillEnterFullscreen:]): Deleted.
(-[TestElementFullscreenDelegate
_webViewDidEnterElementFullscreen:_webViewDidEnterFullscreen:]): Deleted.
Canonical link: https://commits.webkit.org/301756@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes