[webkit-changes] [WebKit/WebKit] 000b0b: [Navigation] Initial implementation of focusReset
Patrick
noreply at github.com
Tue Oct 29 22:16:04 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 000b0b9319cb19a386bd1a7cbe0c445b8e390aa9
https://github.com/WebKit/WebKit/commit/000b0b9319cb19a386bd1a7cbe0c445b8e390aa9
Author: Patrick Griffis <pgriffis at igalia.com>
Date: 2024-10-29 (Tue, 29 Oct 2024)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/navigation-api/focus-reset/autofocus-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/navigation-api/focus-reset/basic-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/navigation-api/focus-reset/focus-reset-timing-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/navigation-api/focus-reset/multiple-intercept-expected.txt
M Source/WebCore/dom/Document.cpp
M Source/WebCore/page/NavigateEvent.cpp
M Source/WebCore/page/NavigateEvent.h
M Source/WebCore/page/Navigation.cpp
M Source/WebCore/page/Navigation.h
Log Message:
-----------
[Navigation] Initial implementation of focusReset
https://bugs.webkit.org/show_bug.cgi?id=282250
Reviewed by Alex Christensen.
This implements the focusReset property of NavigateEvent.intercept().
The test coverage here is misleading due to https://bugs.webkit.org/show_bug.cgi?id=282137
If a workaround for that bug is applied the results are:
multiple-intercept:
PASS (not provided) + after-transition
PASS (not provided) + manual
PASS after-transition + manual
PASS after-transition + (not provided)
PASS manual + after-transition
PASS manual + (not provided)
basic:
PASS Invalid values for focusReset throw
PASS Does not reset the focus when no navigate handler is present
PASS Resets the focus when no focusReset option is provided
PASS Resets the focus when focusReset is explicitly set to undefined
PASS Resets the focus when no focusReset option is provided (nontrivial fulfilled promise)
PASS Resets the focus when no focusReset option is provided (rejected promise)
PASS Resets the focus when focusReset is explicitly set to 'after-transition'
PASS Does not reset the focus when focusReset is set to 'manual'
autofocus:
PASS An element with autofocus, present before navigation, gets focused
PASS Two elements with autofocus, present before navigation; the first gets focused
PASS An element with autofocus, present before navigation but disabled before finished, does not get focused
PASS An element with autofocus, present before navigation but with its autofocus attribute removed before finished, does not get focused
FAIL Two elements with autofocus, present before navigation, but the first gets disabled; the second gets focused
PASS An element with autofocus, introduced between committed and finished, gets focused
PASS An element with autofocus, introduced after finished, does not get focused
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/focus-reset/autofocus-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/focus-reset/basic-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/focus-reset/focus-reset-timing-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/focus-reset/multiple-intercept-expected.txt:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::adjustFocusedNodeOnNodeRemoval):
(WebCore::Document::setFocusedElement):
* Source/WebCore/page/NavigateEvent.cpp:
(WebCore::NavigateEvent::finish):
* Source/WebCore/page/NavigateEvent.h:
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::abortOngoingNavigation):
(WebCore::Navigation::innerDispatchNavigateEvent):
* Source/WebCore/page/Navigation.h:
Canonical link: https://commits.webkit.org/285882@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