Skip to content
  • enrica@apple.com's avatar
    WKPageFindStringMatches ignores the kWKFindOptionsBackwards option. · 3dec912d
    enrica@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=117647
    <rdar://problem/13881024>
    
    Source/WebCore: 
    
    Reviewed by Darin Adler.
            
    The API returns the matched ranges in the DOM order regardless of the
    find direction, but the index of the first match after the user selection
    should take the find direction into account.
    
    Extended existing test in TestWebKitAPI.
    
    * page/Page.cpp:
    (WebCore::Page::findStringMatchingRanges): Added handling of the Backwards case.
    * page/Page.h: Fixed incorrect name of the enum.
    
    Source/WebKit2: 
    
    Reviewed by Darin Adler.
            
    The API returns the matched ranges in the DOM order regardless of the
    find direction, but the index of the first match after the user selection
    should take the find direction into account.
    
    Extended existing test in TestWebKitAPI.
    
    * Shared/API/c/WKFindOptions.h: Added enum for the case where there are
    no matches after the user selection in the direction of the find.
    
    Tools: 
    
    Reviewed by Darin Adler.
            
    The test now uses content with a selection and tests both
    forwards and backward find as well as the case of a find
    that has no matches after the user selection.
    
    * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
    * TestWebKitAPI/Tests/WebKit2/FindMatches.mm:
    (TestWebKitAPI::didFindStringMatches):
    * TestWebKitAPI/Tests/WebKit2/findRanges.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    3dec912d