Index: Source/core/page/FocusController.cpp |
diff --git a/Source/core/page/FocusController.cpp b/Source/core/page/FocusController.cpp |
index e595789d202ce61f9f4ef7f69d2e7948a475038a..66193025cad35f744650a3d89b1904dda999f677 100644 |
--- a/Source/core/page/FocusController.cpp |
+++ b/Source/core/page/FocusController.cpp |
@@ -549,7 +549,7 @@ static Node* nextNodeWithGreaterTabIndex(Node* start, int tabIndex) |
int currentTabIndex = adjustedTabIndex(&node); |
if (shouldVisit(&node) && currentTabIndex > tabIndex && currentTabIndex < winningTabIndex) { |
winner = &node; |
- winningTabIndex = node.tabIndex(); |
+ winningTabIndex = currentTabIndex; |
} |
} |
@@ -563,7 +563,7 @@ static Node* previousNodeWithLowerTabIndex(Node* start, int tabIndex) |
Node* winner = nullptr; |
for (Node* node = start; node; node = NodeTraversal::previous(*node)) { |
int currentTabIndex = adjustedTabIndex(node); |
- if ((shouldVisit(node) || isNonKeyboardFocusableShadowHost(node)) && currentTabIndex < tabIndex && currentTabIndex > winningTabIndex) { |
+ if (shouldVisit(node) && currentTabIndex < tabIndex && currentTabIndex > winningTabIndex) { |
winner = node; |
winningTabIndex = currentTabIndex; |
} |