Bug 42500

Summary: HTMLLinkElement ignores dnsPrefetchingEnabled setting
Product: WebKit Reporter: Jeff Johnson <opendarwin>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dbates, timothy, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
timothy: review-
patch none

Description Jeff Johnson 2010-07-17 11:36:48 PDT
A setting to disable DNS prefetching was landed in svn r62284:

http://trac.webkit.org/changeset/62284/trunk

DNS prefetching is done by the ResourceHandle::prepareForURL() function. Most calls to prepareForURL() are protected by a check of whether DNS prefetching is enabled. However, HTMLLinkElement does not perform such a check:

https://trac.webkit.org/browser/trunk/WebCore/html/HTMLLinkElement.cpp

193    if (m_relAttribute.m_isDNSPrefetch && m_url.isValid() && !m_url.isEmpty())
194        ResourceHandle::prepareForURL(m_url);

A check should be added here to make sure DNS prefetching is enabled before triggering DNS prefetching.
Comment 1 Daniel Bates 2010-07-17 16:40:25 PDT
It doesn't seem correct to override the WebKit setting for the HTML Link element.
Comment 2 tjlee0909 2010-07-17 18:06:29 PDT
Created attachment 61892 [details]
patch
Comment 3 WebKit Review Bot 2010-07-17 18:07:56 PDT
Attachment 61892 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/ChangeLog:8:  Line contains tab character.  [whitespace/tab] [5]
WebCore/ChangeLog:9:  Line contains tab character.  [whitespace/tab] [5]
WebCore/ChangeLog:11:  Line contains tab character.  [whitespace/tab] [5]
WebCore/ChangeLog:12:  Line contains tab character.  [whitespace/tab] [5]
WebCore/ChangeLog:13:  Line contains tab character.  [whitespace/tab] [5]
WebCore/ChangeLog:14:  Line contains tab character.  [whitespace/tab] [5]
WebCore/ChangeLog:15:  Line contains tab character.  [whitespace/tab] [5]
WebCore/ChangeLog:19:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 8 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Timothy Hatcher 2010-07-17 18:20:44 PDT
Comment on attachment 61892 [details]
patch

r- for tabs.
Comment 5 tjlee0909 2010-07-17 18:25:33 PDT
Created attachment 61893 [details]
patch
Comment 6 WebKit Commit Bot 2010-07-17 18:59:40 PDT
Comment on attachment 61893 [details]
patch

Clearing flags on attachment: 61893

Committed r63622: <http://trac.webkit.org/changeset/63622>
Comment 7 WebKit Commit Bot 2010-07-17 18:59:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 David Kilzer (:ddkilzer) 2010-08-09 17:35:09 PDT
<rdar://problem/8290265>
Comment 9 Alexey Proskuryakov 2010-11-02 12:25:04 PDT
See bug 48813.