Title: [133667] trunk/Source/WebKit/blackberry
- Revision
- 133667
- Author
- [email protected]
- Date
- 2012-11-06 14:00:23 -0800 (Tue, 06 Nov 2012)
Log Message
[BlackBerry] Pushing window.external.* events to webplatform
https://bugs.webkit.org/show_bug.cgi?id=101386
Patch by Otto Derek Cheung <[email protected]> on 2012-11-06
Reviewed by Rob Buis.
Adding calls to trigger window.external events so we can handle them on the
browser side.
PR 170059
* Api/WebPageClient.h:
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::addSearchProvider):
(WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/Api/WebPageClient.h (133666 => 133667)
--- trunk/Source/WebKit/blackberry/Api/WebPageClient.h 2012-11-06 21:38:39 UTC (rev 133666)
+++ trunk/Source/WebKit/blackberry/Api/WebPageClient.h 2012-11-06 22:00:23 UTC (rev 133667)
@@ -262,6 +262,9 @@
virtual bool createPopupWebView(const Platform::IntRect&) = 0;
virtual void closePopupWebView() = 0;
+ virtual void addSearchProvider(const Platform::String&) = 0;
+ virtual int isSearchProviderInstalled(const Platform::String&) = 0;
+
// Match with ChromeClient::CustomHandlersState.
enum ProtocolHandlersState {
ProtocolHandlersNew,
Modified: trunk/Source/WebKit/blackberry/ChangeLog (133666 => 133667)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-11-06 21:38:39 UTC (rev 133666)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-11-06 22:00:23 UTC (rev 133667)
@@ -1,5 +1,22 @@
2012-11-06 Otto Derek Cheung <[email protected]>
+ [BlackBerry] Pushing window.external.* events to webplatform
+ https://bugs.webkit.org/show_bug.cgi?id=101386
+
+ Reviewed by Rob Buis.
+
+ Adding calls to trigger window.external events so we can handle them on the
+ browser side.
+
+ PR 170059
+
+ * Api/WebPageClient.h:
+ * WebCoreSupport/ChromeClientBlackBerry.cpp:
+ (WebCore::ChromeClientBlackBerry::addSearchProvider):
+ (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):
+
+2012-11-06 Otto Derek Cheung <[email protected]>
+
[BlackBerry] Adding window.external to our port
https://bugs.webkit.org/show_bug.cgi?id=100868
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp (133666 => 133667)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp 2012-11-06 21:38:39 UTC (rev 133666)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp 2012-11-06 22:00:23 UTC (rev 133667)
@@ -838,7 +838,11 @@
void ChromeClientBlackBerry::addSearchProvider(const BlackBerry::Platform::String& originURL, const BlackBerry::Platform::String& newURL)
{
- notImplemented();
+ // See if the input URL host matches of the origin host.
+ KURL originHost = KURL(KURL(), originURL);
+ KURL url = "" newURL);
+ if (url.isValid() && originHost.host() == url.host())
+ m_webPagePrivate->client()->addSearchProvider(newURL);
}
int ChromeClientBlackBerry::isSearchProviderInstalled(const BlackBerry::Platform::String& originURL, const BlackBerry::Platform::String& newURL)
@@ -847,6 +851,12 @@
// 0 - None of the installed search engines match url.
// 1 - One or more installed search engines match url, but none are the user's default search engine.
// 2 - The user's default search engine matches url.
+
+ // See if the input URL host matches of the origin host.
+ KURL originHost = KURL(KURL(), originURL);
+ KURL url = "" newURL);
+ if (url.isValid() && originHost.host() == url.host())
+ return m_webPagePrivate->client()->isSearchProviderInstalled(newURL);
return 0;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes