Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: e1a56029dffc839b8df1eb615ccc0e25b44442d3 https://github.com/WebKit/WebKit/commit/e1a56029dffc839b8df1eb615ccc0e25b44442d3 Author: Andy Estes <aes...@apple.com> Date: 2025-09-18 (Thu, 18 Sep 2025)
Changed paths: M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h M Tools/TestWebKitAPI/SourcesCocoa.txt M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj A Tools/TestWebKitAPI/Tests/WebKitCocoa/RemoveFullscreenElementFromDOM.mm M Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm A Tools/TestWebKitAPI/Tests/WebKitCocoa/remove-fullscreen-element-from-dom.html Log Message: ----------- REGRESSION (295901@main): Cannot exit fullscreen on embedded YouTube videos on bing.com/videos https://bugs.webkit.org/show_bug.cgi?id=299059 rdar://158180605 Reviewed by Eric Carlson. When an element with the fullscren flag set is removed from the DOM, DocumentFullscreen::exitFullscreen is called. Exiting fullscreen is an asynchronous operation, so it's possible that the element's document will no longer be attached to a frame by the time WebFullScreenManager::willExitFullScreen is called, causing that function to return early. When that occurs, the fullscreen window remains on screen with non-functional controls and the _webViewDidExit(Element)Fullscreen delegate callback is not dispatched to the fullscreen client. Resolved this by caching WebFullScreenManager::m_element's frame identifier at the time it is set, and using the cached value in WebFullScreenManager::enterFullScreenForElement and WebFullScreenManager::willExitFullScreen. Added an API test. * Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::setElement): (WebKit::WebFullScreenManager::clearElement): (WebKit::WebFullScreenManager::enterFullScreenForElement): (WebKit::WebFullScreenManager::willExitFullScreen): * Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h: * Tools/TestWebKitAPI/SourcesCocoa.txt: * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme: * Tools/TestWebKitAPI/Tests/WebKitCocoa/RemoveFullscreenElementFromDOM.mm: Added. * Tools/TestWebKitAPI/Tests/WebKitCocoa/remove-fullscreen-element-from-dom.html: Added. Canonical link: https://commits.webkit.org/300188@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes