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

Unified Diff: Source/core/page/FocusController.cpp

Issue 700313002: Improve consistency of nextNodeWithGreaterTabIndex() and previousNodeWithLowerTabIndex(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698