• yael.aharon@nokia.com's avatar
    Navigating downwards / upwards does not focus on the links spread across more than one line. · 3568f132
    yael.aharon@nokia.com authored
    https://bugs.webkit.org/show_bug.cgi?id=54639
    
    Reviewed by Antonio Gomes.
    
    Source/WebCore: 
    
    When 2 anchor elements span more than one line each, and one ends on the same line that the
    second starts on, the rects reported by their renderers are overlapping. When handling
    2 overlapping nodes, check for this case, and don't assume that one of the nodes is on a higher layer.   
    
    Test: fast/spatial-navigation/snav-two-elements-one-line.html
    
    * page/FocusController.cpp:
    (WebCore::updateFocusCandidateIfNeeded):
    (WebCore::FocusController::findFocusCandidateInContainer):
    * page/SpatialNavigation.cpp:
    (WebCore::areElementsOnSameLine):
    (WebCore::distanceDataForNode):
    * page/SpatialNavigation.h:
    
    LayoutTests: 
    
    * fast/spatial-navigation/snav-two-elements-one-line-expected.txt: Added.
    * fast/spatial-navigation/snav-two-elements-one-line.html: Added.
    
    
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@79021 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    3568f132
snav-two-elements-one-line.html 1.61 KB