Commit c44211d7 authored by mrowe@apple.com's avatar mrowe@apple.com

<rdar://problem/6017913> Replace use of HISearchWindowShow in -[WebView...

<rdar://problem/6017913> Replace use of HISearchWindowShow in -[WebView _searchWithSpotlightFromMenu].

Reviewed by Kevin Decker.

* WebView/WebView.mm:
(-[WebView _searchWithSpotlightFromMenu:]): Use -[NSWorkspace showSearchResultsForQueryString:] post-Leopard.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 40c525a4
2009-08-12 Mark Rowe <mrowe@apple.com>
Reviewed by Kevin Decker.
<rdar://problem/6017913> Replace use of HISearchWindowShow in -[WebView _searchWithSpotlightFromMenu].
* WebView/WebView.mm:
(-[WebView _searchWithSpotlightFromMenu:]): Use -[NSWorkspace showSearchResultsForQueryString:] post-Leopard.
2009-08-12 Greg Bolsinga <bolsinga@apple.com>
Reviewed by Eric Seidel.
......
......@@ -5091,13 +5091,16 @@ static WebFrameView *containingFrameView(NSView *view)
id documentView = [[[self selectedFrame] frameView] documentView];
if (![documentView conformsToProtocol:@protocol(WebDocumentText)])
return;
NSString *selectedString = [(id <WebDocumentText>)documentView selectedString];
if ([selectedString length] == 0) {
if (![selectedString length])
return;
}
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
[[NSWorkspace sharedWorkspace] showSearchResultsForQueryString:selectedString];
#else
(void)HISearchWindowShow((CFStringRef)selectedString, kNilOptions);
#endif
}
#if USE(ACCELERATED_COMPOSITING)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment