Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
PDFPlugin: Find-in-page
https://bugs.webkit.org/show_bug.cgi?id=105710 <rdar://problem/12555331> Reviewed by Alexey Proskuryakov. Make use of PDFLayerController's find-in-page functionality to mimic WebKit's. Add two Plugin methods, countFindMatches and findString, and make use of them if attempting to find-in-page within a PluginDocument. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::countFindMatches): Added. We don't support find-in-page for NetscapePlugin. (WebKit::NetscapePlugin::findString): Added. We don't support find-in-page for NetscapePlugin. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add countFindMatches and findString. * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add requisite PDFLayerController interfaces. * WebProcess/Plugins/PDF/PDFPlugin.h: Add countFindMatches, findString, and nextMatchForString, as well as storage for the most-recently-searched string. * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::writeItemsToPasteboard): (WebKit::PDFPlugin::countFindMatches): (WebKit::PDFPlugin::nextMatchForString): (WebKit::PDFPlugin::findString): * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Add countFindMatches and findString. * WebProcess/Plugins/Plugin.h: Add countFindMatches and findString. * WebProcess/Plugins/PluginProxy.h: Add countFindMatches and findString, but since PDFPlugin is in-process, we don't need to forward these calls to the PluginProcess. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::countFindMatches): Forward countFindMatches to the plugin. (WebKit::PluginView::findString): Forward findString to the plugin. * WebProcess/Plugins/PluginView.h: Add countFindMatches and findString. * WebProcess/WebPage/FindController.cpp: (WebKit::pluginViewForFrame): If the given frame hosts a PluginDocument, grab its PluginView. (WebKit::FindController::countStringMatches): Forward countStringMatches to PluginView if necessary. (WebKit::FindController::updateFindUIAfterPageScroll): Only use unmarkAllTextMatches if we're using ordinary find-in-page and don't have a plugin. If we have a plugin, disable our overlay, as it must be handled by the plugin itself, and request the number of matches for the search from the plugin. (WebKit::FindController::findString): If necessary, forward findString to the plugin. (WebKit::FindController::hideFindUI): Hide the search highlight by searching for an empty string. Canonical link: https://commits.webkit.org/123945@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
1f23ac9
commit a2ade1e
Showing
12 changed files
with
235 additions
and
11 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
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
Oops, something went wrong.