Title: [148717] trunk/Source/WebKit2
- Revision
- 148717
- Author
- timothy_hor...@apple.com
- Date
- 2013-04-18 17:25:16 -0700 (Thu, 18 Apr 2013)
Log Message
PDFPlugin: Hook up the search-in-Spotlight menu item
https://bugs.webkit.org/show_bug.cgi?id=114837
<rdar://problem/13583591>
Reviewed by Mark Rowe.
* WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
Add performSpotlightSearch: delegate callback.
* WebProcess/Plugins/PDF/PDFPlugin.h:
(WebKit::PDFPlugin::performSpotlightSearch):
Add performSpotlightSearch() PDFPlugin method.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFLayerControllerDelegate performSpotlightSearch:]): Hand the search string to PDFPlugin.
(WebKit::PDFPlugin::performSpotlightSearch): Hand the search string to WebPageProxy.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (148716 => 148717)
--- trunk/Source/WebKit2/ChangeLog 2013-04-19 00:23:02 UTC (rev 148716)
+++ trunk/Source/WebKit2/ChangeLog 2013-04-19 00:25:16 UTC (rev 148717)
@@ -1,3 +1,22 @@
+2013-04-18 Tim Horton <timothy_hor...@apple.com>
+
+ PDFPlugin: Hook up the search-in-Spotlight menu item
+ https://bugs.webkit.org/show_bug.cgi?id=114837
+ <rdar://problem/13583591>
+
+ Reviewed by Mark Rowe.
+
+ * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
+ Add performSpotlightSearch: delegate callback.
+
+ * WebProcess/Plugins/PDF/PDFPlugin.h:
+ (WebKit::PDFPlugin::performSpotlightSearch):
+ Add performSpotlightSearch() PDFPlugin method.
+
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ (-[WKPDFLayerControllerDelegate performSpotlightSearch:]): Hand the search string to PDFPlugin.
+ (WebKit::PDFPlugin::performSpotlightSearch): Hand the search string to WebPageProxy.
+
2013-04-18 Anders Carlsson <ander...@apple.com>
Dispatch local storage events
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFLayerControllerDetails.h (148716 => 148717)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFLayerControllerDetails.h 2013-04-19 00:23:02 UTC (rev 148716)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFLayerControllerDetails.h 2013-04-19 00:25:16 UTC (rev 148717)
@@ -31,6 +31,7 @@
- (void)writeItemsToPasteboard:(NSArray *)items withTypes:(NSArray *)types;
- (void)showDefinitionForAttributedString:(NSAttributedString *)string atPoint:(CGPoint)point;
- (void)performWebSearch:(NSString *)string;
+- (void)performSpotlightSearch:(NSString *)string;
- (void)openWithNativeApplication;
- (void)saveToPDF;
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h (148716 => 148717)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h 2013-04-19 00:23:02 UTC (rev 148716)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h 2013-04-19 00:25:16 UTC (rev 148717)
@@ -81,6 +81,7 @@
void writeItemsToPasteboard(NSArray *items, NSArray *types);
void showDefinitionForAttributedString(NSAttributedString *, CGPoint);
void performWebSearch(NSString *);
+ void performSpotlightSearch(NSString *);
void focusNextAnnotation();
void focusPreviousAnnotation();
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (148716 => 148717)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2013-04-19 00:23:02 UTC (rev 148716)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2013-04-19 00:25:16 UTC (rev 148717)
@@ -167,6 +167,11 @@
_pdfPlugin->performWebSearch(string);
}
+- (void)performSpotlightSearch:(NSString *)string
+{
+ _pdfPlugin->performSpotlightSearch(string);
+}
+
- (void)openWithNativeApplication
{
_pdfPlugin->openWithNativeApplication();
@@ -984,6 +989,11 @@
webFrame()->page()->send(Messages::WebPageProxy::SearchTheWeb(string));
}
+void PDFPlugin::performSpotlightSearch(NSString *string)
+{
+ webFrame()->page()->send(Messages::WebPageProxy::SearchWithSpotlight(string));
+}
+
bool PDFPlugin::handleWheelEvent(const WebWheelEvent& event)
{
PDFDisplayMode displayMode = [m_pdfLayerController.get() displayMode];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes