Bug 50530

Summary: Add text search API for counting/marking/highlighting matches in a range
Product: WebKit Reporter: mitz
Component: WebKit APIAssignee: mitz
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.6   
Attachments:
Description Flags
WebView API and WebCore implementation sam: review+

Description mitz 2010-12-04 16:41:38 PST
Add text search API for counting/marking/highlighting matches in a range
Comment 1 mitz 2010-12-04 16:42:55 PST
<rdar://problem/8145955>
Comment 2 mitz 2010-12-04 16:55:29 PST
Created attachment 75621 [details]
WebView API and WebCore implementation
Comment 3 mitz 2010-12-04 19:22:20 PST
Committed r73337: <http://trac.webkit.org/changeset/73337>
Comment 4 Darin Adler 2010-12-06 09:35:09 PST
Comment on attachment 75621 [details]
WebView API and WebCore implementation

View in context: https://bugs.webkit.org/attachment.cgi?id=75621&action=review

> WebCore/editing/Editor.cpp:3353
> +static bool isFrameInRange(Frame* frame, Range* range)

We could factor this into two functions, one that takes a document and a frame and finds the HTMLFrameOwnerElement, and a second that calls range->intersectsNode.

Not sure if the function that takes a document and a frame and finds the owner element is useful in other contexts.

> WebKit/mac/WebView/WebPDFView.mm:632
> +static BOOL isFrameInRange(WebFrame *frame, DOMRange *range)

If you refactored the function above the way I suggested, then you could share code here.