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

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

Issue 105973003: Improve spatial navigation on overlapping elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updates layout tests, fixed raised issues. Created 6 years, 9 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 c8f4a75056a9cf6df2eb42042e18e2a32750d25b..aa083b5815785588fb729980527d7ca5f403bc01 100644
--- a/Source/core/page/FocusController.cpp
+++ b/Source/core/page/FocusController.cpp
@@ -755,7 +755,8 @@ static void updateFocusCandidateIfNeeded(FocusType type, const FocusCandidate& c
}
LayoutRect intersectionRect = intersection(candidate.rect, closest.rect);
- if (!intersectionRect.isEmpty() && !areElementsOnSameLine(closest, candidate)) {
+ if (!intersectionRect.isEmpty() && !areElementsOnSameLine(closest, candidate)
+ && intersectionRect == candidate.rect) {
// If 2 nodes are intersecting, do hit test to find which node in on top.
LayoutUnit x = intersectionRect.x() + intersectionRect.width() / 2;
LayoutUnit y = intersectionRect.y() + intersectionRect.height() / 2;
« no previous file with comments | « LayoutTests/fast/spatial-navigation/snav-z-index-expected.txt ('k') | Source/core/page/SpatialNavigation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698