Bug 4013

Summary: text find doesn't wrap in PDF files
Product: WebKit Reporter: Trey Matteson <trey>
Component: New BugsAssignee: John Sullivan <sullivan>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 412   
Hardware: Mac   
OS: OS X 10.4   
URL: http://www.copyright.gov/legislation/dmca.pdf
Attachments:
Description Flags
proposed patch
sullivan: review-
proposed patch with consensus changes sullivan: review+

Trey Matteson
Reported 2005-07-15 12:52:15 PDT
Load any PDF filein Safari. Search for a string that appears more than once. Keep searching until you hit the end of the doc. The search will not wrap around. If you do the same thing in an HTML doc, it does wrap.
Attachments
proposed patch (3.33 KB, patch)
2005-07-15 14:18 PDT, Trey Matteson
sullivan: review-
proposed patch with consensus changes (3.50 KB, patch)
2005-07-15 16:00 PDT, Trey Matteson
sullivan: review+
Trey Matteson
Comment 1 2005-07-15 14:18:55 PDT
Created attachment 2976 [details] proposed patch Note most of these new methods are not called in practice, but for testing I at least invoked them in gdb.
John Sullivan
Comment 2 2005-07-15 14:31:04 PDT
Comment on attachment 2976 [details] proposed patch Rather than retain, I'd suggest using -copy on savedSelection, because the lifetime of a PDFSelection seems somewhat murky (calling [PDFSubview currentSelection] twice in a row returns the same object each time, surprisingly). Otherwise, this seems good. Please explain how you tested it.
John Sullivan
Comment 3 2005-07-15 14:43:26 PDT
Comment on attachment 2976 [details] proposed patch One more comment. If setCurrentSelection:nil works as expected (synonym for clearing the selection), then I'd rewrite: if (savedSelection) { [PDFSubview setCurrentSelection:savedSelection]; [savedSelection release]; } else { [PDFSubview clearSelection]; } as just + [PDFSubview setCurrentSelection:savedSelection]; + [savedSelection release];
Trey Matteson
Comment 4 2005-07-15 16:00:35 PDT
Created attachment 2978 [details] proposed patch with consensus changes
John Sullivan
Comment 5 2005-07-15 16:09:08 PDT
Comment on attachment 2978 [details] proposed patch with consensus changes Great, nice fix.
John Sullivan
Comment 6 2005-07-15 16:13:44 PDT
Checked in.
Note You need to log in before you can comment on or make changes to this bug.