Changeset 88204 in webkit
- Timestamp:
- Jun 6, 2011, 5:07:10 PM (15 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/API/mac/PDFViewController.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r88171 r88204 1 2011-06-06 John Sullivan <sullivan@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 <https://bugs.webkit.org/show_bug.cgi?id=62165> 6 <rdar://problem/9555835> 7 WebKit2 find-on-page callback doesn’t handle kWKMoreThanMaximumMatchCount on PDF pages 8 9 * UIProcess/API/mac/PDFViewController.mm: 10 (WebKit::PDFViewController::findString): 11 Return kWKMoreThanMaximumMatchCount when appropriate, a la FindController::countStringMatches(). 12 Also, skip counting all the matches if maxMatchCount is 0, to avoid (perhaps slowly) computing a 13 number that would be ignored. 14 1 15 2011-06-06 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
trunk/Source/WebKit2/UIProcess/API/mac/PDFViewController.mm
r84118 r88204 610 610 611 611 PDFSelection *selection = [m_wkPDFView.get() _nextMatchFor:string direction:forward caseSensitive:caseFlag wrap:wrapFlag fromSelection:[m_pdfView currentSelection] startInSelection:NO]; 612 NSUInteger matchCount = [m_wkPDFView.get() _countMatches:string caseSensitive:caseFlag];613 if (matchCount > maxMatchCount)614 matchCount = maxMatchCount;615 616 612 if (!selection) { 617 613 page()->didFailToFindString(string); 618 614 return; 615 } 616 617 NSUInteger matchCount; 618 if (!maxMatchCount) { 619 // If the max was zero, any result means we exceeded the max. We can skip computing the actual count. 620 matchCount = static_cast<unsigned>(kWKMoreThanMaximumMatchCount); 621 } else { 622 matchCount = [m_wkPDFView.get() _countMatches:string caseSensitive:caseFlag]; 623 if (matchCount > maxMatchCount) 624 matchCount = static_cast<unsigned>(kWKMoreThanMaximumMatchCount); 619 625 } 620 626
Note:
See TracChangeset
for help on using the changeset viewer.