Bug 62165

Summary: WebKit2 find-on-page callback doesn’t handle kWKMoreThanMaximumMatchCount on PDF pages
Product: WebKit Reporter: John Sullivan <sullivan>
Component: WebKit2Assignee: John Sullivan <sullivan>
Status: RESOLVED FIXED    
Severity: Normal CC: darin
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch to make PDFViewController return kWKMoreThanMaximumMatchCount when appropriate. mitz: review+

John Sullivan
Reported 2011-06-06 16:42:02 PDT
On HTML pages, the PageFindClient API returns a special value, kWKMoreThanMaximumMatchCount, when more matches were found than a specified maximum. But when searching PDF pages, this value is never returned. In Radar as 9555835
Attachments
Patch to make PDFViewController return kWKMoreThanMaximumMatchCount when appropriate. (2.40 KB, patch)
2011-06-06 16:57 PDT, John Sullivan
mitz: review+
John Sullivan
Comment 1 2011-06-06 16:57:58 PDT
Created attachment 96154 [details] Patch to make PDFViewController return kWKMoreThanMaximumMatchCount when appropriate.
mitz
Comment 2 2011-06-06 17:05:44 PDT
Comment on attachment 96154 [details] Patch to make PDFViewController return kWKMoreThanMaximumMatchCount when appropriate. View in context: https://bugs.webkit.org/attachment.cgi?id=96154&action=review > Source/WebKit2/ChangeLog:5 > + Need a short description and bug URL (OOPS!) OOPS!
John Sullivan
Comment 3 2011-06-06 17:08:03 PDT
Darin Adler
Comment 4 2011-06-06 21:31:05 PDT
Comment on attachment 96154 [details] Patch to make PDFViewController return kWKMoreThanMaximumMatchCount when appropriate. View in context: https://bugs.webkit.org/attachment.cgi?id=96154&action=review > Source/WebKit2/UIProcess/API/mac/PDFViewController.mm:620 > + matchCount = static_cast<unsigned>(kWKMoreThanMaximumMatchCount); What is the purpose of casting to unsigned when assigning to an NSUInteger?
John Sullivan
Comment 5 2011-06-07 06:04:20 PDT
I copied/pasted the line that does the casting from FindController::countStringMatches(). I didn’t notice that in FindController::countStringMatches(), matchCount was declared as an unsigned and here it is declared as an NSUInteger.
Note You need to log in before you can comment on or make changes to this bug.