Bug 50530 - Add text search API for counting/marking/highlighting matches in a range
Summary: Add text search API for counting/marking/highlighting matches in a range
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.6
: P2 Normal
Assignee: mitz
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-12-04 16:41 PST by mitz
Modified: 2010-12-06 09:35 PST (History)
0 users

See Also:


Attachments
WebView API and WebCore implementation (11.78 KB, patch)
2010-12-04 16:55 PST, mitz
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.