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

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: rebaseline 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 0ea5a98141a4fdb3da523a3ca54ed4379581b690..53316878caceef119d0dc94a8414715762765176 100644
--- a/Source/core/page/FocusController.cpp
+++ b/Source/core/page/FocusController.cpp
@@ -769,7 +769,7 @@ static void updateFocusCandidateIfNeeded(WebFocusType type, const FocusCandidate
if (candidate.distance == maxDistance())
return;
- if (candidate.isOffscreenAfterScrolling && candidate.alignment < Full)
+ if (candidate.isOffscreenAfterScrolling)
return;
if (closest.isNull()) {
@@ -794,13 +794,7 @@ static void updateFocusCandidateIfNeeded(WebFocusType type, const FocusCandidate
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;
}
« no previous file with comments | « LayoutTests/fast/spatial-navigation/snav-symmetrically-positioned-expected.txt ('k') | Source/core/page/SpatialNavigation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698