Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 1704333002: Do not use Node in FocusController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split a CL Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 60c32e64ee104c6820c6dee9d64bd1bfdbc161a6..54c1fcb8d6ca9e004ae00a76e8f7ccd2557c74fe 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -2361,9 +2361,9 @@ void Element::focus(const FocusParams& params)
return;
// Slide the focus to its inner node.
- Element* next = document().page()->focusController().findFocusableElement(WebFocusTypeForward, *this);
- if (next && containsIncludingShadowDOM(next)) {
- next->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTypeForward, nullptr));
+ Element* found = document().page()->focusController().findFocusableElementInShadowHost(*this);
+ if (found && containsIncludingShadowDOM(found)) {
+ found->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTypeForward, nullptr));
return;
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698