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

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

Issue 797463003: spatnav: Allow focus move to a close-by not-fully-aligned node over a distant but fully-aligned nod… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
Index: Source/core/page/FocusController.cpp
diff --git a/Source/core/page/FocusController.cpp b/Source/core/page/FocusController.cpp
index 61733ddb1d39229cdc54caa798018f0abb312a5c..cb0a90935543704c98cb45b66d032a6518dd8309 100644
--- a/Source/core/page/FocusController.cpp
+++ b/Source/core/page/FocusController.cpp
@@ -746,7 +746,7 @@ static void updateFocusCandidateIfNeeded(FocusType type, const FocusCandidate& c
if (candidate.distance == maxDistance())
return;
- if (candidate.isOffscreenAfterScrolling && candidate.alignment < Full)
+ if (candidate.isOffscreenAfterScrolling)
return;
if (closest.isNull()) {
@@ -771,13 +771,7 @@ static void updateFocusCandidateIfNeeded(FocusType type, const FocusCandidate& c
return;
}
- if (candidate.alignment == closest.alignment) {
- if (candidate.distance < closest.distance)
- closest = candidate;
- return;
- }
-
- if (candidate.alignment > closest.alignment)
+ if (candidate.distance < closest.distance)
closest = candidate;
}

Powered by Google App Engine
This is Rietveld 408576698