Chromium Code Reviews| Index: Source/core/page/FocusController.cpp |
| diff --git a/Source/core/page/FocusController.cpp b/Source/core/page/FocusController.cpp |
| index 47a87e5e5f44ade3ccdab310f586841a9309280d..b8410616dd207af3960c32415917360f007446f8 100644 |
| --- a/Source/core/page/FocusController.cpp |
| +++ b/Source/core/page/FocusController.cpp |
| @@ -70,6 +70,7 @@ static inline bool isShadowInsertionPointFocusScopeOwner(Node& node) |
| class FocusNavigationScope { |
| STACK_ALLOCATED(); |
| public: |
| + explicit FocusNavigationScope(TreeScope*); |
| Node* rootNode() const; |
| Element* owner() const; |
| static FocusNavigationScope focusNavigationScopeOf(const Node&); |
| @@ -79,7 +80,6 @@ public: |
| static FocusNavigationScope ownedByIFrame(const HTMLFrameOwnerElement&); |
| private: |
| - explicit FocusNavigationScope(TreeScope*); |
| RawPtrWillBeMember<TreeScope> m_rootTreeScope; |
| }; |
| @@ -719,6 +719,12 @@ Node* FocusController::findFocusableNode(WebFocusType type, Node& node) |
| return findFocusableNodeAcrossFocusScopes(type, FocusNavigationScope::focusNavigationScopeOf(node), &node); |
| } |
| +Node* FocusController::findFocusableNode(WebFocusType type, Node* stayWithin, Node& node) |
|
kochi
2015/04/09 05:44:38
Do you want to scope the search of prev/next focus
AKV
2015/04/09 06:16:21
haveNextInput()wanted check the returned value (a
kochi
2015/04/10 02:33:50
Are you confused with "frame" and "form" or am I?
AKV
2015/04/10 06:19:12
SMART GO should go within form1. Main goal of this
kochi
2015/04/10 06:26:20
Yes, this is what I meant in the original reply.
S
|
| +{ |
| + ASSERT(type == WebFocusTypeForward || type == WebFocusTypeBackward); |
| + return findFocusableNodeAcrossFocusScopes(type, FocusNavigationScope(&stayWithin->treeScope()), &node); |
| +} |
| + |
| Node* FocusController::findFocusableNode(WebFocusType type, const FocusNavigationScope& scope, Node* node) |
| { |
| return type == WebFocusTypeForward ? nextFocusableNode(scope, node) : previousFocusableNode(scope, node); |