Changeset 63622 in webkit


Ignore:
Timestamp:
Jul 17, 2010 6:59:27 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-07-17 TJ Lee <tjlee0909@gmail.com>

Reviewed by Timothy Hatcher.

HTMLLinkElement ignores dnsPrefetchingEnabled setting
https://bugs.webkit.org/show_bug.cgi?id=42500

Changed the HTML Link tag to check that the browser
has DNS-prefetching enabled before calling ResourceHandle::prepareForURL.

There are no test cases for this patch because it was unclear how to test
this using a layout test. A possible test case would be to
clear the DNS cache on the client's machine before loading a page with
<link rel="dns-prefetch" href="SomeSiteThatsNotTheCurrentOne.com"> and
then check the number of DNS cache entries.

  • html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63620 r63622  
     12010-07-17  TJ Lee  <tjlee0909@gmail.com>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        HTMLLinkElement ignores dnsPrefetchingEnabled setting
     6        https://bugs.webkit.org/show_bug.cgi?id=42500
     7
     8        Changed the HTML Link tag to check that the browser
     9        has DNS-prefetching enabled before calling ResourceHandle::prepareForURL.
     10
     11        There are no test cases for this patch because it was unclear how to test
     12        this using a layout test. A possible test case would be to
     13        clear the DNS cache on the client's machine before loading a page with
     14        <link rel="dns-prefetch" href="SomeSiteThatsNotTheCurrentOne.com"> and
     15        then check the number of DNS cache entries.
     16
     17        * html/HTMLLinkElement.cpp:
     18        (WebCore::HTMLLinkElement::process):
     19
    1202010-07-16  Maciej Stachowiak  <mjs@apple.com>
    221
  • trunk/WebCore/html/HTMLLinkElement.cpp

    r63032 r63622  
    191191        document()->setIconURL(m_url.string(), type);
    192192
    193     if (m_relAttribute.m_isDNSPrefetch && m_url.isValid() && !m_url.isEmpty())
     193    if (m_relAttribute.m_isDNSPrefetch && document()->isDNSPrefetchEnabled() && m_url.isValid() && !m_url.isEmpty())
    194194        ResourceHandle::prepareForURL(m_url);
    195195
Note: See TracChangeset for help on using the changeset viewer.