Changeset 110669 in webkit
- Timestamp:
- Mar 14, 2012 12:23:49 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r110667 r110669 1 2012-03-13 Sergio Villar Senin <svillar@igalia.com> 2 3 [GTK] Use the same DNS prefetching path than the other ports. 4 https://bugs.webkit.org/show_bug.cgi?id=80997 5 6 Reviewed by Martin Robinson. 7 8 This patch basically reverts r56128. There is no need to add an 9 special code path for GTK+ DNS pre-fetching because the main 10 reason to do that (some potential changes in libsoup) is not 11 going to happen. It also reduces the amount of DNS queries by 12 adding a NULL hostname check. 13 14 No need for new tests as this just moves code around. 15 16 * GNUmakefile.list.am: 17 * html/HTMLAnchorElement.cpp: 18 (WebCore::HTMLAnchorElement::parseAttribute): 19 * html/HTMLLinkElement.cpp: 20 * loader/LinkLoader.cpp: 21 (WebCore::LinkLoader::loadLink): 22 * page/Chrome.cpp: 23 (WebCore::Chrome::mouseDidMoveOverElement): 24 * platform/network/DNS.h: 25 (WebCore): 26 * platform/network/ResourceHandle.cpp: 27 * platform/network/ResourceHandle.h: 28 (ResourceHandle): 29 * platform/network/chromium/DNSChromium.cpp: 30 * platform/network/soup/DNSSoup.cpp: restored. 31 (WebCore): 32 (WebCore::prefetchDNS): 33 * platform/network/soup/ResourceHandleSoup.cpp: 34 1 35 2012-03-14 Kentaro Hara <haraken@chromium.org> 2 36 -
trunk/Source/WebCore/GNUmakefile.list.am
r110639 r110669 3397 3397 Source/WebCore/platform/network/soup/CookieJarSoup.h \ 3398 3398 Source/WebCore/platform/network/soup/CredentialStorageSoup.cpp \ 3399 Source/WebCore/platform/network/soup/DNSSoup.cpp \ 3399 3400 Source/WebCore/platform/network/soup/GOwnPtrSoup.cpp \ 3400 3401 Source/WebCore/platform/network/soup/GOwnPtrSoup.h \ -
trunk/Source/WebCore/html/HTMLAnchorElement.cpp
r107477 r110669 26 26 27 27 #include "Attribute.h" 28 #include "DNS.h" 28 29 #include "EventNames.h" 29 30 #include "Frame.h" … … 38 39 #include "PingLoader.h" 39 40 #include "RenderImage.h" 40 #include "ResourceHandle.h"41 41 #include "SecurityOrigin.h" 42 42 #include "SecurityPolicy.h" … … 222 222 if (document()->isDNSPrefetchEnabled()) { 223 223 if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "https") || parsedURL.startsWith("//")) 224 ResourceHandle::prepareForURL(document()->completeURL(parsedURL));224 prefetchDNS(document()->completeURL(parsedURL).host()); 225 225 } 226 226 if (document()->page() && !document()->page()->javaScriptURLsAreAllowed() && protocolIsJavaScript(parsedURL)) { -
trunk/Source/WebCore/html/HTMLLinkElement.cpp
r108814 r110669 43 43 #include "MediaQueryEvaluator.h" 44 44 #include "Page.h" 45 #include "ResourceHandle.h"46 45 #include "ScriptEventListener.h" 47 46 #include "SecurityOrigin.h" -
trunk/Source/WebCore/loader/LinkLoader.cpp
r95901 r110669 38 38 #include "CachedResourceLoader.h" 39 39 #include "ContainerNode.h" 40 #include "DNS.h" 40 41 #include "Document.h" 41 42 #include "Frame.h" 42 43 #include "FrameView.h" 43 44 #include "LinkRelAttribute.h" 44 #include "ResourceHandle.h"45 45 #include "Settings.h" 46 46 … … 100 100 // to complete that as URL <https://bugs.webkit.org/show_bug.cgi?id=48857>. 101 101 if (settings && settings->dnsPrefetchingEnabled() && href.isValid() && !href.isEmpty()) 102 ResourceHandle::prepareForURL(href);102 prefetchDNS(href.host()); 103 103 } 104 104 -
trunk/Source/WebCore/page/Chrome.cpp
r108957 r110669 374 374 Document* document = result.innerNode()->document(); 375 375 if (document && document->isDNSPrefetchEnabled()) 376 ResourceHandle::prepareForURL(result.absoluteLinkURL());376 prefetchDNS(result.absoluteLinkURL().host()); 377 377 } 378 378 m_client->mouseDidMoveOverElement(result, modifierFlags); -
trunk/Source/WebCore/platform/network/DNS.h
r95901 r110669 31 31 namespace WebCore { 32 32 33 #if !USE(SOUP) 34 void prefetchDNS(const String& hostname); 35 #endif 33 void prefetchDNS(const String& hostname); 36 34 } 37 35 -
trunk/Source/WebCore/platform/network/ResourceHandle.cpp
r110066 r110669 29 29 30 30 #include "BlobRegistry.h" 31 #include "DNS.h"32 31 #include "Logging.h" 33 32 #include "ResourceHandleClient.h" … … 186 185 } 187 186 188 #if !USE(SOUP)189 void ResourceHandle::prepareForURL(const KURL& url)190 {191 return prefetchDNS(url.host());192 }193 #endif194 195 187 void ResourceHandle::cacheMetadata(const ResourceResponse&, const Vector<char>&) 196 188 { -
trunk/Source/WebCore/platform/network/ResourceHandle.h
r110066 r110669 105 105 static void loadResourceSynchronously(NetworkingContext*, const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data); 106 106 107 static void prepareForURL(const KURL&);108 107 static bool willLoadFromCache(ResourceRequest&, Frame*); 109 108 static void cacheMetadata(const ResourceResponse&, const Vector<char>&); -
trunk/Source/WebCore/platform/network/chromium/DNSChromium.cpp
r95901 r110669 28 28 29 29 #include "PlatformSupport.h" 30 #include "ResourceHandle.h"31 30 32 31 namespace WebCore { … … 37 36 } 38 37 39 void ResourceHandle::prepareForURL(const KURL& url)40 {41 return prefetchDNS(url.host());42 }43 44 38 } // namespace WebCore -
trunk/Source/WebCore/platform/network/soup/DNSSoup.cpp
r110668 r110669 1 1 /* 2 * Copyright (C) 2008 Collin Jackson <collinj@webkit.org> 2 * Copyright (C) 2008 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2009, 2012 Igalia S.L. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 27 28 #include "DNS.h" 28 29 29 #include "PlatformSupport.h" 30 #include "CString.h" 31 #include "GOwnPtrSoup.h" 30 32 #include "ResourceHandle.h" 31 33 … … 34 36 void prefetchDNS(const String& hostname) 35 37 { 36 PlatformSupport::prefetchDNS(hostname); 38 if (hostname.isEmpty()) 39 return; 40 41 String uri = "http://" + hostname; 42 GOwnPtr<SoupURI> soupURI(soup_uri_new(uri.utf8().data())); 43 if (!soupURI) 44 return; 45 46 soup_session_prepare_for_uri(ResourceHandle::defaultSession(), soupURI.get()); 37 47 } 38 48 39 void ResourceHandle::prepareForURL(const KURL& url)40 {41 return prefetchDNS(url.host());42 49 } 43 44 } // namespace WebCore -
trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r109791 r110669 180 180 } 181 181 182 void ResourceHandle::prepareForURL(const KURL& url)183 {184 GOwnPtr<SoupURI> soupURI(soup_uri_new(url.string().utf8().data()));185 if (!soupURI)186 return;187 soup_session_prepare_for_uri(ResourceHandle::defaultSession(), soupURI.get());188 }189 190 182 // Called each time the message is going to be sent again except the first time. 191 183 // It's used mostly to let webkit know about redirects.
Note: See TracChangeset
for help on using the changeset viewer.