Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Properly resolve fullscreen API promises
https://bugs.webkit.org/show_bug.cgi?id=248879 rdar://103074395 Reviewed by Chris Dumez. - exitFullscreen() promises should resolve in FullscreenManager::finishExitFullscreen(). - requestFullscreen() promises should resolve in FullscreenManager::willEnterFullscreen(). Store a pendingPromise field for async operations, and ensure there's only one promise at once, by rejecting the previous operation if it is still pending (meaning the previous operation failed, since it is overriden by the new one). We resolve this pending promise at the same time as emitting the fullscreen change/error events. Removed mac-wk1 baselines that were due to this bug. * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/selectors/modal-pseudo-class-expected.txt: Removed. * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fullscreen/api/document-exit-fullscreen-nested-shadow-dom-expected.txt: Removed. * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fullscreen/api/element-request-fullscreen-same-element-expected.txt: Removed. * Source/WebCore/dom/DocumentFullscreen.cpp: (WebCore::DocumentFullscreen::exitFullscreen): (WebCore::DocumentFullscreen::webkitExitFullscreen): * Source/WebCore/dom/DocumentFullscreen.h: (WebCore::DocumentFullscreen::webkitExitFullscreen): Deleted. * Source/WebCore/dom/FullscreenManager.cpp: (WebCore::FullscreenManager::requestFullscreenForElement): (WebCore::FullscreenManager::exitFullscreen): (WebCore::FullscreenManager::willEnterFullscreen): (WebCore::FullscreenManager::didExitFullscreen): Since 257456@main, cancelFullscreen now shares codepath with exitFullscreen, making the exitingDocument variable not needed. (WebCore::FullscreenManager::notifyAboutFullscreenChangeOrError): (WebCore::FullscreenManager::exitRemovedFullscreenElementIfNeeded): (WebCore::FullscreenManager::clear): (WebCore::FullscreenManager::dispatchFullscreenChangeEvents): Deleted. * Source/WebCore/dom/FullscreenManager.h: * Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp: (webkit_dom_document_webkit_exit_fullscreen): Canonical link: https://commits.webkit.org/257668@main
- Loading branch information
Showing
8 changed files
with
51 additions
and
53 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters