NetworkProcess: DNS prefetch happens in the Web Process
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Aug 2015 07:13:01 +0000 (07:13 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Aug 2015 07:13:01 +0000 (07:13 +0000)
commite3b9819972dbdc2d5cd07404475cace247b19118
treeed68a86025b433c8480c645630226e836a44a11f
parentdaaa0be1fc2a8228427630d227a44cc416879434
NetworkProcess: DNS prefetch happens in the Web Process
https://bugs.webkit.org/show_bug.cgi?id=147824

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Use FrameLoaderClient to do the DNS prefetch.

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
* loader/FrameLoaderClient.h:
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLink):
* page/Chrome.cpp:
(WebCore::Chrome::mouseDidMoveOverElement):

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): Do the
actual DNS prefetch.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
PrefetchDNS message.
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::prefetchDNS): Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
FrameLoaderClient to do the DNS prefetch.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::prefetchDNS): Send the request to the network
process if it's enabled, otherwise do the actual DNS prefetch.
* WebProcess/WebProcess.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/LinkLoader.cpp
Source/WebCore/page/Chrome.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h