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; |
} |