Skip to content

Commit 2db19c4

Browse files
committed
Move FocusRemovalEventsMode into FocusOptions
https://bugs.webkit.org/show_bug.cgi?id=224549 <rdar://problem/76695885> Reviewed by Darin Adler. Follow-up patch to use braces initializer for FocusOptions struct and simplify the code. * dom/Document.cpp: (WebCore::Document::adjustFocusedNodeOnNodeRemoval): Canonical link: https://commits.webkit.org/236590@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 03fdb81 commit 2db19c4

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

Source/WebCore/ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2021-04-15 Manuel Rego Casasnovas <rego@igalia.com>
2+
3+
Move FocusRemovalEventsMode into FocusOptions
4+
https://bugs.webkit.org/show_bug.cgi?id=224549
5+
<rdar://problem/76695885>
6+
7+
Reviewed by Darin Adler.
8+
9+
Follow-up patch to use braces initializer for FocusOptions struct and simplify the code.
10+
11+
* dom/Document.cpp:
12+
(WebCore::Document::adjustFocusedNodeOnNodeRemoval):
13+
114
2021-04-15 Alex Christensen <achristensen@webkit.org>
215

316
Add deprecation macros

Source/WebCore/dom/Document.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4357,9 +4357,7 @@ void Document::adjustFocusedNodeOnNodeRemoval(Node& node, NodeRemoval nodeRemova
43574357
// FIXME: We should avoid synchronously updating the style inside setFocusedElement.
43584358
// FIXME: Object elements should avoid loading a frame synchronously in a post style recalc callback.
43594359
SubframeLoadingDisabler disabler(is<ContainerNode>(node) ? &downcast<ContainerNode>(node) : nullptr);
4360-
FocusOptions focusOptions = { };
4361-
focusOptions.removalEventsMode = FocusRemovalEventsMode::DoNotDispatch;
4362-
setFocusedElement(nullptr, focusOptions);
4360+
setFocusedElement(nullptr, { { }, { }, FocusRemovalEventsMode::DoNotDispatch, { } });
43634361
// Set the focus navigation starting node to the previous focused element so that
43644362
// we can fallback to the siblings or parent node for the next search.
43654363
// Also we need to call removeFocusNavigationNodeOfSubtree after this function because

0 commit comments

Comments
 (0)