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

Unified Diff: Source/core/input/EventHandler.cpp

Issue 1177373002: Change API name and return type of findFocusableNode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: *recursively Created 5 years, 6 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 | « Source/core/dom/Element.cpp ('k') | Source/core/page/FocusController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/input/EventHandler.cpp
diff --git a/Source/core/input/EventHandler.cpp b/Source/core/input/EventHandler.cpp
index 3fe9aa2b976f8af09521a90276d088a2d5e772a2..b9a56d8fb9acf20cc574655939ceb2170b81f65f 100644
--- a/Source/core/input/EventHandler.cpp
+++ b/Source/core/input/EventHandler.cpp
@@ -2101,10 +2101,10 @@ bool EventHandler::slideFocusOnShadowHostIfNecessary(const Element& element)
// If the host has a focusable inner element, focus it. Otherwise, the host takes focus.
Page* page = m_frame->page();
ASSERT(page);
- Node* next = page->focusController().findFocusableNode(WebFocusTypeForward, *element.shadowRoot());
- if (next && next->isElementNode() && element.containsIncludingShadowDOM(next)) {
+ Element* next = page->focusController().findFocusableElement(WebFocusTypeForward, *element.shadowRoot());
+ if (next && element.containsIncludingShadowDOM(next)) {
// Use WebFocusTypeForward instead of WebFocusTypeMouse here to mean the focus has slided.
- toElement(next)->focus(false, WebFocusTypeForward);
+ next->focus(false, WebFocusTypeForward);
return true;
}
}
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/page/FocusController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698