Skip to content
  • enrica@apple.com's avatar
    Add a new set of WebKit2 APIs for text search and · ebd80c2b
    enrica@apple.com authored
    search results management.
    https://bugs.webkit.org/show_bug.cgi?id=106834.
    <rdar://problem/12597159>
    
    Source/WebCore: 
    
    Reviewed by Simon Fraser.
            
    Adding new API to perform text search in WebKit2 without using
    the stock UI. The new interface provides all the information
    necessary to write a custom UI for search.
    
    Added new TextWebKitAPI test.
    
    * WebCore.exp.in: Added new exported methods.
    * editing/Editor.cpp:
    (WebCore::Editor::countMatchesForText): Added new parameter to store
    all the ranges relative to the matches found.
    * editing/Editor.h: Modified the interface of countMatchesForText and removed
    the other definition of countMatchesForText with a different signature.
    * page/Page.cpp:
    (WebCore::Page::findStringMatchingRanges): Added.
    (WebCore::Page::markAllMatchesForText): Changed to use the new unified
    countMatchesForText.
    * page/Page.h:
    
    Source/WebKit/mac: 
    
    Reviewed by Simon Fraser.
            
    Adding new API to perform text search in WebKit2 with...
    ebd80c2b