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

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: fix not-aligned node issue Created 5 years, 11 months 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 4382f680fb5796be7026505d992dd3478f2ea719..6c27950d5963b2f6676b68af9606b1a64a0ada30 100644
--- a/Source/core/page/FocusController.cpp
+++ b/Source/core/page/FocusController.cpp
@@ -752,7 +752,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()) {
@@ -777,13 +777,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