-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Refactor common FocusController code path to be site-isolation aware #47162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor common FocusController code path to be site-isolation aware #47162
Conversation
EWS run on previous version of this PR (hash fd280e4) |
fd280e4
to
6d1b022
Compare
EWS run on previous version of this PR (hash 6d1b022) |
I took a look at this and it LGTM! Thanks for inviting me to informally review Brady! |
6d1b022
to
2988697
Compare
EWS run on previous version of this PR (hash 2988697) |
2988697
to
2415e06
Compare
EWS run on previous version of this PR (hash 2415e06) |
2415e06
to
36029b0
Compare
EWS run on current version of this PR (hash 36029b0) |
@@ -50,6 +50,12 @@ class TreeScope; | |||
|
|||
struct FocusCandidate; | |||
|
|||
enum class ContinuedSearchInRemoteFrame : bool { No, Yes }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think this should be ContinueSearchInRemoteFrame
because a function which returns this value didn't continue the search in a remote frame. It's requesting that the caller continue its search in a remote frame as I understand it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it looks like that with just this patch, but this is just the first patch in a series - In the larger set of completed work, the continued search has already begun.
rdar://154258045 https://bugs.webkit.org/show_bug.cgi?id=294951 Reviewed by Ryosuke Niwa. To prepare for making "advancing focus" to be able to cross frame boundaries with site isolation enabled, this patch refactors the relevant code path of FocusController to include more context about an attempted focus operation. With site isolation disabled, this doesn't change behavior. With site isolation enabled, you'll see the added log statements fire when you try certain operations into an isolated iframe. * Source/WebCore/editing/cocoa/AutofillElements.cpp: (WebCore::nextAutofillableElement): (WebCore::previousAutofillableElement): * Source/WebCore/page/FocusController.cpp: (WebCore::FocusController::findFocusableElementDescendingIntoSubframes): (WebCore::FocusController::advanceFocusInDocumentOrder): (WebCore::FocusController::findFocusableElementAcrossFocusScope): (WebCore::FocusController::findFocusableElementWithinScope): (WebCore::FocusController::nextFocusableElementWithinScope): (WebCore::FocusController::previousFocusableElementWithinScope): (WebCore::FocusController::nextFocusableElement): (WebCore::FocusController::previousFocusableElement): (WebCore::shouldClearSelectionWhenChangingFocusedElement): (WebCore::updateFocusCandidateIfNeeded): * Source/WebCore/page/FocusController.h: * Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::nextAssistableElement): * Source/WebKitLegacy/mac/DOM/DOM.mm: (-[DOMNode nextFocusNode]): (-[DOMNode previousFocusNode]): Canonical link: https://commits.webkit.org/296625@main
36029b0
to
5ae55be
Compare
Committed 296625@main (5ae55be): https://commits.webkit.org/296625@main Reviewed commits have been landed. Closing PR #47162 and removing active labels. |
5ae55be
36029b0
🛠 wpe-cairo