<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[191566] releases/WebKitGTK/webkit-2.10/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/191566">191566</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-10-26 00:54:34 -0700 (Mon, 26 Oct 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/191381">r191381</a> - NetworkProcess: DNS prefetch happens in the Web Process
https://bugs.webkit.org/show_bug.cgi?id=147824
Reviewed by Chris Dumez.
Source/WebCore:
Use FrameLoaderClient to do the DNS prefetch.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
* loader/EmptyClients.h:
* loader/FrameLoaderClient.h:
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLink):
* page/Chrome.cpp:
(WebCore::Chrome::mouseDidMoveOverElement):
Source/WebKit/mac:
Implement FrameLoaderClient::prefetchDNS().
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
Source/WebKit/win:
Implement FrameLoaderClient::prefetchDNS().
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::prefetchDNS):
* WebCoreSupport/WebFrameLoaderClient.h:
Source/WebKit2:
DNS prefetch requests started in the WebProcess should be sent to
the network process when it's enabled.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::prefetchDNS): Use NetworkProcess::prefetchDNS().
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
PrefetchDNS message.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::prefetchDNS): Do the actual DNS prefetch.
* NetworkProcess/NetworkProcess.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::prefetchDNS): Use WebProcess::prefetchDNS().
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
FrameLoaderClient to do the DNS prefetch.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Initialize the DNS prefetched
hosts cleanup hysteresis activity. Clear the cache of DNS
prefetched when hysteresis activity stopped.
(WebKit::WebProcess::prefetchDNS): Send the request to the network
process if it's enabled, otherwise do the actual DNS prefetch.
* WebProcess/WebProcess.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorehtmlHTMLAnchorElementcpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/html/HTMLAnchorElement.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreloaderEmptyClientsh">releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/EmptyClients.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreloaderFrameLoaderClienth">releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/FrameLoaderClient.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreloaderLinkLoadercpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/LinkLoader.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorepageChromecpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/page/Chrome.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKitmacChangeLog">releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKitmacWebCoreSupportWebFrameLoaderClienth">releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKitwinChangeLog">releases/WebKitGTK/webkit-2.10/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKitwinWebCoreSupportWebFrameLoaderClientcpp">releases/WebKitGTK/webkit-2.10/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKitwinWebCoreSupportWebFrameLoaderClienth">releases/WebKitGTK/webkit-2.10/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2ChangeLog">releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp">releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2NetworkProcessNetworkConnectionToWebProcessh">releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2NetworkProcessNetworkConnectionToWebProcessmessagesin">releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2NetworkProcessNetworkProcesscpp">releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkProcess.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2NetworkProcessNetworkProcessh">releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkProcess.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2WebProcessInjectedBundleAPIgtkWebKitWebExtensioncpp">releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth">releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2WebProcessWebPageiosWebPageIOSmm">releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2WebProcessWebProcesscpp">releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebKit2WebProcessWebProcessh">releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebProcess.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit210SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ NetworkProcess: DNS prefetch happens in the Web Process
+ https://bugs.webkit.org/show_bug.cgi?id=147824
+
+ Reviewed by Chris Dumez.
+
+ Use FrameLoaderClient to do the DNS prefetch.
+
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::parseAttribute):
+ * loader/EmptyClients.h:
+ * loader/FrameLoaderClient.h:
+ * loader/LinkLoader.cpp:
+ (WebCore::LinkLoader::loadLink):
+ * page/Chrome.cpp:
+ (WebCore::Chrome::mouseDidMoveOverElement):
+
</ins><span class="cx"> 2015-10-20 Chris Fleizach <cfleizach@apple.com>
</span><span class="cx">
</span><span class="cx"> AX: CrashTracer: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::AccessibilityTable::tableElement const + 116
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorehtmlHTMLAnchorElementcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/html/HTMLAnchorElement.cpp (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/html/HTMLAnchorElement.cpp        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/html/HTMLAnchorElement.cpp        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -24,7 +24,6 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "HTMLAnchorElement.h"
</span><span class="cx">
</span><del>-#include "DNS.h"
</del><span class="cx"> #include "ElementIterator.h"
</span><span class="cx"> #include "EventHandler.h"
</span><span class="cx"> #include "EventNames.h"
</span><span class="lines">@@ -253,9 +252,9 @@
</span><span class="cx"> setNeedsStyleRecalc();
</span><span class="cx"> if (isLink()) {
</span><span class="cx"> String parsedURL = stripLeadingAndTrailingHTMLSpaces(value);
</span><del>- if (document().isDNSPrefetchEnabled()) {
</del><ins>+ if (document().isDNSPrefetchEnabled() && document().frame()) {
</ins><span class="cx"> if (protocolIsInHTTPFamily(parsedURL) || parsedURL.startsWith("//"))
</span><del>- prefetchDNS(document().completeURL(parsedURL).host());
</del><ins>+ document().frame()->loader().client().prefetchDNS(document().completeURL(parsedURL).host());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> invalidateCachedVisitedLinkHash();
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoreloaderEmptyClientsh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/EmptyClients.h (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/EmptyClients.h        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/EmptyClients.h        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -399,6 +399,8 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> virtual bool isEmptyFrameLoaderClient() override { return true; }
</span><ins>+
+ virtual void prefetchDNS(const String&) override { }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class EmptyTextCheckerClient : public TextCheckerClient {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoreloaderFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/FrameLoaderClient.h (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/FrameLoaderClient.h        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/FrameLoaderClient.h        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -345,6 +345,8 @@
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span><span class="cx"> virtual void contentFilterDidBlockLoad(ContentFilterUnblockHandler) { }
</span><span class="cx"> #endif
</span><ins>+
+ virtual void prefetchDNS(const String&) = 0;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoreloaderLinkLoadercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/LinkLoader.cpp (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/LinkLoader.cpp        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/LinkLoader.cpp        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> #include "CachedResourceLoader.h"
</span><span class="cx"> #include "CachedResourceRequest.h"
</span><span class="cx"> #include "ContainerNode.h"
</span><del>-#include "DNS.h"
</del><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "FrameLoaderClient.h"
</span><span class="lines">@@ -98,8 +97,8 @@
</span><span class="cx"> Settings* settings = document.settings();
</span><span class="cx"> // FIXME: The href attribute of the link element can be in "//hostname" form, and we shouldn't attempt
</span><span class="cx"> // to complete that as URL <https://bugs.webkit.org/show_bug.cgi?id=48857>.
</span><del>- if (settings && settings->dnsPrefetchingEnabled() && href.isValid() && !href.isEmpty())
- prefetchDNS(href.host());
</del><ins>+ if (settings && settings->dnsPrefetchingEnabled() && href.isValid() && !href.isEmpty() && document.frame())
+ document.frame()->loader().client().prefetchDNS(href.host());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorepageChromecpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/page/Chrome.cpp (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/page/Chrome.cpp        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/page/Chrome.cpp        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -23,13 +23,13 @@
</span><span class="cx"> #include "Chrome.h"
</span><span class="cx">
</span><span class="cx"> #include "ChromeClient.h"
</span><del>-#include "DNS.h"
</del><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "DocumentType.h"
</span><span class="cx"> #include "FileIconLoader.h"
</span><span class="cx"> #include "FileChooser.h"
</span><span class="cx"> #include "FileList.h"
</span><span class="cx"> #include "FloatRect.h"
</span><ins>+#include "FrameLoaderClient.h"
</ins><span class="cx"> #include "FrameTree.h"
</span><span class="cx"> #include "Geolocation.h"
</span><span class="cx"> #include "HTMLFormElement.h"
</span><span class="lines">@@ -350,7 +350,7 @@
</span><span class="cx"> void Chrome::mouseDidMoveOverElement(const HitTestResult& result, unsigned modifierFlags)
</span><span class="cx"> {
</span><span class="cx"> if (result.innerNode() && result.innerNode()->document().isDNSPrefetchEnabled())
</span><del>- prefetchDNS(result.absoluteLinkURL().host());
</del><ins>+ m_page.mainFrame().loader().client().prefetchDNS(result.absoluteLinkURL().host());
</ins><span class="cx"> m_client.mouseDidMoveOverElement(result, modifierFlags);
</span><span class="cx">
</span><span class="cx"> InspectorInstrumentation::mouseDidMoveOverElement(m_page, result, modifierFlags);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/ChangeLog (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/ChangeLog        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/ChangeLog        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ NetworkProcess: DNS prefetch happens in the Web Process
+ https://bugs.webkit.org/show_bug.cgi?id=147824
+
+ Reviewed by Chris Dumez.
+
+ Implement FrameLoaderClient::prefetchDNS().
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
</ins><span class="cx"> 2015-10-13 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Avoid useless copies in range-loops that are using 'auto'
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKitmacWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -247,6 +247,8 @@
</span><span class="cx"> void contentFilterDidBlockLoad(WebCore::ContentFilterUnblockHandler) override;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ void prefetchDNS(const String&) override;
+
</ins><span class="cx"> RetainPtr<WebFrame> m_webFrame;
</span><span class="cx">
</span><span class="cx"> RetainPtr<WebFramePolicyListener> m_policyListener;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx"> #import <WebCore/BlockExceptions.h>
</span><span class="cx"> #import <WebCore/CachedFrame.h>
</span><span class="cx"> #import <WebCore/Chrome.h>
</span><ins>+#import <WebCore/DNS.h>
</ins><span class="cx"> #import <WebCore/Document.h>
</span><span class="cx"> #import <WebCore/DocumentLoader.h>
</span><span class="cx"> #import <WebCore/EventHandler.h>
</span><span class="lines">@@ -2284,6 +2285,11 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+void WebFrameLoaderClient::prefetchDNS(const String& hostname)
+{
+ WebCore::prefetchDNS(hostname);
+}
+
</ins><span class="cx"> @implementation WebFramePolicyListener
</span><span class="cx">
</span><span class="cx"> + (void)initialize
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit/win/ChangeLog (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit/win/ChangeLog        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit/win/ChangeLog        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ NetworkProcess: DNS prefetch happens in the Web Process
+ https://bugs.webkit.org/show_bug.cgi?id=147824
+
+ Reviewed by Chris Dumez.
+
+ Implement FrameLoaderClient::prefetchDNS().
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::prefetchDNS):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+
</ins><span class="cx"> 2015-08-17 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> Replace all remaining uses of WTF::Mutex with WTF::Lock
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKitwinWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx"> #include <JavaScriptCore/APICast.h>
</span><span class="cx"> #include <WebCore/BackForwardController.h>
</span><span class="cx"> #include <WebCore/CachedFrame.h>
</span><ins>+#include <WebCore/DNS.h>
</ins><span class="cx"> #include <WebCore/DocumentLoader.h>
</span><span class="cx"> #include <WebCore/FormState.h>
</span><span class="cx"> #include <WebCore/Frame.h>
</span><span class="lines">@@ -1361,3 +1362,8 @@
</span><span class="cx">
</span><span class="cx"> function(action);
</span><span class="cx"> }
</span><ins>+
+void WebFrameLoaderClient::prefetchDNS(const String& hostname)
+{
+ WebCore::prefetchDNS(hostname);
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKitwinWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -202,6 +202,8 @@
</span><span class="cx">
</span><span class="cx"> virtual void dispatchDidFailToStartPlugin(const WebCore::PluginView*) const;
</span><span class="cx">
</span><ins>+ void prefetchDNS(const String&) override;
+
</ins><span class="cx"> protected:
</span><span class="cx"> class WebFramePolicyListenerPrivate;
</span><span class="cx"> std::unique_ptr<WebFramePolicyListenerPrivate> m_policyListenerPrivate;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2015-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ NetworkProcess: DNS prefetch happens in the Web Process
+ https://bugs.webkit.org/show_bug.cgi?id=147824
+
+ Reviewed by Chris Dumez.
+
+ DNS prefetch requests started in the WebProcess should be sent to
+ the network process when it's enabled.
+
+ * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+ (WebKit::NetworkConnectionToWebProcess::prefetchDNS): Use NetworkProcess::prefetchDNS().
+ * NetworkProcess/NetworkConnectionToWebProcess.h:
+ * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
+ PrefetchDNS message.
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::prefetchDNS): Do the actual DNS prefetch.
+ * NetworkProcess/NetworkProcess.h:
+ * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
+ (webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::prefetchDNS): Use WebProcess::prefetchDNS().
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
+ FrameLoaderClient to do the DNS prefetch.
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::WebProcess): Initialize the DNS prefetched
+ hosts cleanup hysteresis activity. Clear the cache of DNS
+ prefetched when hysteresis activity stopped.
+ (WebKit::WebProcess::prefetchDNS): Send the request to the network
+ process if it's enabled, otherwise do the actual DNS prefetch.
+ * WebProcess/WebProcess.h:
+
</ins><span class="cx"> 2015-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><span class="cx"> [UNIX] ASSERTION FAILED: m_shouldWaitForSyncReplies in Connection::connectionDidClose()
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -159,6 +159,11 @@
</span><span class="cx"> loader->setDefersLoading(defers);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void NetworkConnectionToWebProcess::prefetchDNS(const String& hostname)
+{
+ NetworkProcess::singleton().prefetchDNS(hostname);
+}
+
</ins><span class="cx"> static NetworkStorageSession& storageSession(SessionID sessionID)
</span><span class="cx"> {
</span><span class="cx"> if (sessionID.isEphemeral()) {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2NetworkProcessNetworkConnectionToWebProcessh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -73,6 +73,7 @@
</span><span class="cx"> void scheduleResourceLoad(const NetworkResourceLoadParameters&);
</span><span class="cx"> void performSynchronousLoad(const NetworkResourceLoadParameters&, PassRefPtr<Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply>);
</span><span class="cx"> void loadPing(const NetworkResourceLoadParameters&);
</span><ins>+ void prefetchDNS(const String&);
</ins><span class="cx">
</span><span class="cx"> void removeLoadIdentifier(ResourceLoadIdentifier);
</span><span class="cx"> void setDefersLoading(ResourceLoadIdentifier, bool);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2NetworkProcessNetworkConnectionToWebProcessmessagesin"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> LoadPing(WebKit::NetworkResourceLoadParameters resourceLoadParameters)
</span><span class="cx"> RemoveLoadIdentifier(uint64_t resourceLoadIdentifier)
</span><span class="cx"> SetDefersLoading(uint64_t resourceLoadIdentifier, bool defers)
</span><ins>+ PrefetchDNS(String hostname)
</ins><span class="cx">
</span><span class="cx"> StartDownload(WebCore::SessionID sessionID, uint64_t downloadID, WebCore::ResourceRequest request)
</span><span class="cx"> ConvertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, WebCore::ResourceRequest request, WebCore::ResourceResponse response)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2NetworkProcessNetworkProcesscpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> #include "WebCookieManager.h"
</span><span class="cx"> #include "WebProcessPoolMessages.h"
</span><span class="cx"> #include "WebsiteData.h"
</span><ins>+#include <WebCore/DNS.h>
</ins><span class="cx"> #include <WebCore/DiagnosticLoggingClient.h>
</span><span class="cx"> #include <WebCore/Logging.h>
</span><span class="cx"> #include <WebCore/PlatformCookieJar.h>
</span><span class="lines">@@ -529,6 +530,11 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void NetworkProcess::prefetchDNS(const String& hostname)
+{
+ WebCore::prefetchDNS(hostname);
+}
+
</ins><span class="cx"> #if !PLATFORM(COCOA)
</span><span class="cx"> void NetworkProcess::initializeProcess(const ChildProcessInitializationParameters&)
</span><span class="cx"> {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2NetworkProcessNetworkProcessh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkProcess.h (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkProcess.h        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/NetworkProcess.h        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -100,6 +100,8 @@
</span><span class="cx"> void clearHSTSCache(WebCore::NetworkStorageSession&, std::chrono::system_clock::time_point modifiedSince);
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ void prefetchDNS(const String&);
+
</ins><span class="cx"> private:
</span><span class="cx"> NetworkProcess();
</span><span class="cx"> ~NetworkProcess();
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2WebProcessInjectedBundleAPIgtkWebKitWebExtensioncpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #include "WebKitPrivate.h"
</span><span class="cx"> #include "WebKitWebExtensionPrivate.h"
</span><span class="cx"> #include "WebKitWebPagePrivate.h"
</span><del>-#include <WebCore/DNS.h>
</del><ins>+#include "WebProcess.h"
</ins><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/glib/GRefPtr.h>
</span><span class="cx">
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (messageName == String::fromUTF8("PrefetchDNS")) {
</span><span class="cx"> API::String* hostname = static_cast<API::String*>(message.get(String::fromUTF8("Hostname")));
</span><del>- WebCore::prefetchDNS(hostname->string());
</del><ins>+ WebProcess::singleton().prefetchDNS(hostname->string());
</ins><span class="cx"> } else
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -1711,4 +1711,9 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+void WebFrameLoaderClient::prefetchDNS(const String& hostname)
+{
+ WebProcess::singleton().prefetchDNS(hostname);
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -241,6 +241,8 @@
</span><span class="cx"> void contentFilterDidBlockLoad(WebCore::ContentFilterUnblockHandler) override;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ void prefetchDNS(const String&) override;
+
</ins><span class="cx"> WebFrame* m_frame;
</span><span class="cx"> RefPtr<PluginView> m_pluginView;
</span><span class="cx"> bool m_hasSentResponseToPluginView;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -50,7 +50,6 @@
</span><span class="cx"> #import "WebProcess.h"
</span><span class="cx"> #import <CoreText/CTFont.h>
</span><span class="cx"> #import <WebCore/Chrome.h>
</span><del>-#import <WebCore/DNS.h>
</del><span class="cx"> #import <WebCore/DiagnosticLoggingClient.h>
</span><span class="cx"> #import <WebCore/DiagnosticLoggingKeys.h>
</span><span class="cx"> #import <WebCore/Element.h>
</span><span class="lines">@@ -59,6 +58,7 @@
</span><span class="cx"> #import <WebCore/FloatQuad.h>
</span><span class="cx"> #import <WebCore/FocusController.h>
</span><span class="cx"> #import <WebCore/Frame.h>
</span><ins>+#import <WebCore/FrameLoaderClient.h>
</ins><span class="cx"> #import <WebCore/FrameView.h>
</span><span class="cx"> #import <WebCore/GeometryUtilities.h>
</span><span class="cx"> #import <WebCore/HTMLElementTypeHelpers.h>
</span><span class="lines">@@ -628,8 +628,10 @@
</span><span class="cx"> if (!node)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (is<Element>(*node))
- prefetchDNS(downcast<Element>(*node).absoluteLinkURL().host());
</del><ins>+ if (is<Element>(*node)) {
+ ASSERT(m_page);
+ m_page->mainFrame().loader().client().prefetchDNS(downcast<Element>(*node).absoluteLinkURL().host());
+ }
</ins><span class="cx">
</span><span class="cx"> Vector<FloatQuad> quads;
</span><span class="cx"> if (RenderObject *renderer = node->renderer()) {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebProcess.cpp (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebProcess.cpp        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebProcess.cpp        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include "EventDispatcher.h"
</span><span class="cx"> #include "InjectedBundle.h"
</span><span class="cx"> #include "Logging.h"
</span><ins>+#include "NetworkConnectionToWebProcessMessages.h"
</ins><span class="cx"> #include "PluginProcessConnectionManager.h"
</span><span class="cx"> #include "SessionTracker.h"
</span><span class="cx"> #include "StatisticsData.h"
</span><span class="lines">@@ -67,6 +68,7 @@
</span><span class="cx"> #include <WebCore/ApplicationCacheStorage.h>
</span><span class="cx"> #include <WebCore/AuthenticationChallenge.h>
</span><span class="cx"> #include <WebCore/CrossOriginPreflightResultCache.h>
</span><ins>+#include <WebCore/DNS.h>
</ins><span class="cx"> #include <WebCore/FontCache.h>
</span><span class="cx"> #include <WebCore/FontCascade.h>
</span><span class="cx"> #include <WebCore/Frame.h>
</span><span class="lines">@@ -162,6 +164,7 @@
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><span class="cx"> , m_usesNetworkProcess(false)
</span><span class="cx"> , m_webResourceLoadScheduler(new WebResourceLoadScheduler)
</span><ins>+ , m_dnsPrefetchHystereris([this](HysteresisState state) { if (state == HysteresisState::Stopped) m_dnsPrefetchedHosts.clear(); })
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> , m_pluginProcessConnectionManager(PluginProcessConnectionManager::create())
</span><span class="lines">@@ -1451,4 +1454,23 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+void WebProcess::prefetchDNS(const String& hostname)
+{
+ if (hostname.isEmpty())
+ return;
+
+#if ENABLE(NETWORK_PROCESS)
+ if (usesNetworkProcess()) {
+ if (m_dnsPrefetchedHosts.add(hostname).isNewEntry)
+ networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::PrefetchDNS(hostname), 0);
+ // The DNS prefetched hosts cache is only to avoid asking for the same hosts too many times
+ // in a very short period of time, producing a lot of IPC traffic. So we clear this cache after
+ // some time of no DNS requests.
+ m_dnsPrefetchHystereris.impulse();
+ return;
+ }
+#endif
+ WebCore::prefetchDNS(hostname);
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebKit2WebProcessWebProcessh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebProcess.h (191565 => 191566)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebProcess.h        2015-10-26 07:49:34 UTC (rev 191565)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/WebProcess/WebProcess.h        2015-10-26 07:54:34 UTC (rev 191566)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include "TextCheckerState.h"
</span><span class="cx"> #include "ViewUpdateDispatcher.h"
</span><span class="cx"> #include "VisitedLinkTable.h"
</span><ins>+#include <WebCore/HysteresisActivity.h>
</ins><span class="cx"> #include <WebCore/SessionID.h>
</span><span class="cx"> #include <WebCore/Timer.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="lines">@@ -214,6 +215,8 @@
</span><span class="cx"> bool hasRichContentServices() const { return m_hasRichContentServices; }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ void prefetchDNS(const String&);
+
</ins><span class="cx"> private:
</span><span class="cx"> WebProcess();
</span><span class="cx"> ~WebProcess();
</span><span class="lines">@@ -359,6 +362,8 @@
</span><span class="cx"> RefPtr<NetworkProcessConnection> m_networkProcessConnection;
</span><span class="cx"> bool m_usesNetworkProcess;
</span><span class="cx"> WebResourceLoadScheduler* m_webResourceLoadScheduler;
</span><ins>+ HashSet<String> m_dnsPrefetchedHosts;
+ WebCore::HysteresisActivity m_dnsPrefetchHystereris;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(DATABASE_PROCESS)
</span></span></pre>
</div>
</div>
</body>
</html>