[BlackBerry] Enable DNS prefetch
authorcharles.wei@torchmobile.com.cn <charles.wei@torchmobile.com.cn@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2012 09:12:22 +0000 (09:12 +0000)
committercharles.wei@torchmobile.com.cn <charles.wei@torchmobile.com.cn@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2012 09:12:22 +0000 (09:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93846

Reviewed by George Staikos.

Source/WebCore:

No new tests.

* PlatformBlackBerry.cmake:
* platform/blackberry/TemporaryLinkStubs.cpp:
* platform/network/blackberry/DNSBlackBerry.cpp: Copied from Source/WebCore/platform/blackberry/TemporaryLinkStubs.cpp.
(WebCore):
(WebCore::prefetchDNS):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125530 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/PlatformBlackBerry.cmake
Source/WebCore/platform/blackberry/TemporaryLinkStubs.cpp
Source/WebCore/platform/network/blackberry/DNSBlackBerry.cpp [new file with mode: 0644]
Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog

index 738955a..01614ba 100644 (file)
@@ -1,3 +1,18 @@
+2012-08-14  Charles Wei  <charles.wei@torchmobile.com.cn>
+
+        [BlackBerry] Enable DNS prefetch
+        https://bugs.webkit.org/show_bug.cgi?id=93846
+
+        Reviewed by George Staikos.
+
+        No new tests.
+
+        * PlatformBlackBerry.cmake:
+        * platform/blackberry/TemporaryLinkStubs.cpp:
+        * platform/network/blackberry/DNSBlackBerry.cpp: Copied from Source/WebCore/platform/blackberry/TemporaryLinkStubs.cpp.
+        (WebCore):
+        (WebCore::prefetchDNS):
+
 2012-08-14  Hans Wennborg  <hans@chromium.org>
 
         Speech Input: wrong position was reported for scolled-down elements
index 8f6a775..cd4cd42 100644 (file)
@@ -91,6 +91,7 @@ LIST(APPEND WebCore_SOURCES
     platform/network/MIMESniffing.cpp
     platform/network/ProxyServer.cpp
     platform/network/blackberry/AutofillBackingStore.cpp
+    platform/network/blackberry/DNSBlackBerry.cpp
     platform/network/blackberry/DeferredData.cpp
     platform/network/blackberry/NetworkJob.cpp
     platform/network/blackberry/NetworkManager.cpp
index 0e08e26..70f0a2b 100644 (file)
 
 namespace WebCore {
 
-void prefetchDNS(String const&)
-{
-    notImplemented();
-}
-
 void setCookieStoragePrivateBrowsingEnabled(bool)
 {
     notImplemented();
diff --git a/Source/WebCore/platform/network/blackberry/DNSBlackBerry.cpp b/Source/WebCore/platform/network/blackberry/DNSBlackBerry.cpp
new file mode 100644 (file)
index 0000000..54f215f
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef DNSPrefetchBlackBerry_H
+#define DNSPrefetchBlackBerry_H
+
+#include "config.h"
+#include "PlatformString.h"
+
+#include <BlackBerryPlatformCommonFunctions.h>
+#include <wtf/text/CString.h>
+
+namespace WebCore {
+
+void prefetchDNS(const String& host)
+{
+    if (host.isEmpty())
+        return;
+    BlackBerry::Platform::prefetchDNS(host.latin1().data());
+}
+
+}
+#endif
index 3819523..cc30a1e 100644 (file)
@@ -597,6 +597,7 @@ void WebPagePrivate::init(const WebString& pageGroupName)
     Platform::userInterfaceThreadMessageClient()->dispatchSyncMessage(
             createMethodCallMessage(&WebPagePrivate::createCompositor, this));
 #endif
+    m_page->settings()->setDNSPrefetchingEnabled(true);
 }
 
 class DeferredTaskLoadManualScript: public DeferredTask<&WebPagePrivate::m_wouldLoadManualScript> {
index e26c472..f6941e6 100644 (file)
@@ -1,3 +1,14 @@
+2012-08-14  Charles Wei  <charles.wei@torchmobile.com.cn>
+
+        [BlackBerry] Enable DNS prefetch
+        https://bugs.webkit.org/show_bug.cgi?id=93846
+
+        Reviewed by George Staikos.
+
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::init):
+
 2012-08-13  Tom Sepez  <tsepez@chromium.org>
 
         [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.