-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UnifiedPDF] Find in PDF without overlays
https://bugs.webkit.org/show_bug.cgi?id=269328 rdar://problem/122917321 Reviewed by Tim Horton. Provides the initial support for the find in PDF functionality. This is done by querying the PDFDocument for the string that was passed in for search. In order to accomplish this we need to keep track of the last string that was searched for. If the target string is the same as the last one then we need to continue the search from the last match/result we found. We keep track of the results as the current selection. If the target is not as the last string we found, then we need to clear the selection before we attempt to search for the string. When we find the string we will update its selection to the one that was returned to us from PDFDocument and potentially scroll to it if it is currently out of view. * Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h: * Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.mm: (WebKit::PDFDocumentLayout::pdfPageRectToDocumentRect const): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm: (WebKit::UnifiedPDFPlugin::convertFromPageToDocument const): (WebKit::UnifiedPDFPlugin::convertFromPageToContents const): (WebKit::UnifiedPDFPlugin::countFindMatches): (WebKit::UnifiedPDFPlugin::findString): Canonical link: https://commits.webkit.org/274646@main
- Loading branch information
Showing
7 changed files
with
108 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters