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

Unified Diff: third_party/WebKit/Source/core/page/FocusController.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 | « third_party/WebKit/Source/core/page/FocusController.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/FocusController.cpp
diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
index 9f9b58368ff266604e36f62763ec9d01d125e4a6..eddc8b262b8cfcd386707dbe4cbe61162bb33c69 100644
--- a/third_party/WebKit/Source/core/page/FocusController.cpp
+++ b/third_party/WebKit/Source/core/page/FocusController.cpp
@@ -816,12 +816,17 @@ bool FocusController::advanceFocusInDocumentOrder(LocalFrame* frame, Node* start
return true;
}
-Element* FocusController::findFocusableElement(WebFocusType type, Node& node)
+Element* FocusController::findFocusableElement(WebFocusType type, Element& element)
{
// FIXME: No spacial navigation code yet.
ASSERT(type == WebFocusTypeForward || type == WebFocusTypeBackward);
- Element* found = findFocusableElementAcrossFocusScopes(type, FocusNavigationScope::focusNavigationScopeOf(node), &node);
- return found;
+ return findFocusableElementAcrossFocusScopes(type, FocusNavigationScope::focusNavigationScopeOf(element), &element);
+}
+
+Element* FocusController::findFocusableElementInShadowHost(const Element& shadowHost)
+{
+ ASSERT(shadowHost.authorShadowRoot());
+ return findFocusableElementAcrossFocusScopes(WebFocusTypeForward, FocusNavigationScope::ownedByShadowHost(shadowHost), nullptr);
}
static bool relinquishesEditingFocus(const Element& element)
« no previous file with comments | « third_party/WebKit/Source/core/page/FocusController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698