Chromium Code Reviews| Index: Source/core/page/FocusController.cpp |
| diff --git a/Source/core/page/FocusController.cpp b/Source/core/page/FocusController.cpp |
| index 149ff8a87bca01cdc267d43e738c6569f5615562..c98918f33000a0925c39a6e3881ede8032f8b574 100644 |
| --- a/Source/core/page/FocusController.cpp |
| +++ b/Source/core/page/FocusController.cpp |
| @@ -579,12 +579,11 @@ Node* FocusController::nextFocusableNode(FocusNavigationScope scope, Node* start |
| if (shouldVisit(node) && adjustedTabIndex(node) >= 0) |
| return node; |
| } |
| - } |
| - |
| + } else { |
| // First try to find a node with the same tabindex as start that comes after start in the scope. |
|
hayato
2014/09/12 06:24:13
Please fix the indent.
yanagawa
2014/09/12 07:09:46
Done.
|
| - if (Node* winner = findNodeWithExactTabIndex(NodeTraversal::next(*start), tabIndex, FocusTypeForward)) |
| - return winner; |
| - |
| + if (Node* winner = findNodeWithExactTabIndex(NodeTraversal::next(*start), tabIndex, FocusTypeForward)) |
| + return winner; |
| + } |
| if (!tabIndex) |
| // We've reached the last node in the document with a tabindex of 0. This is the end of the tabbing order. |
| return 0; |
| @@ -626,11 +625,11 @@ Node* FocusController::previousFocusableNode(FocusNavigationScope scope, Node* s |
| if (shouldVisit(node) && adjustedTabIndex(node) >= 0) |
| return node; |
| } |
| + } else { |
| + if (Node* winner = findNodeWithExactTabIndex(startingNode, startingTabIndex, FocusTypeBackward)) |
| + return winner; |
| } |
| - if (Node* winner = findNodeWithExactTabIndex(startingNode, startingTabIndex, FocusTypeBackward)) |
| - return winner; |
| - |
| // There are no nodes before start with the same tabindex as start, so look for a node that: |
| // 1) has the highest non-zero tabindex (that is less than start's tabindex), and |
| // 2) comes last in the scope, if there's a tie. |