Changeset 190605 in webkit


Ignore:
Timestamp:
Oct 5, 2015 10:43:03 PM (8 years ago)
Author:
Chris Dumez
Message:

data: URLs should not be preloaded
https://bugs.webkit.org/show_bug.cgi?id=149829

Reviewed by Ryosuke Niwa.

Source/WebCore:

Update the HTMLPreloadScanner so that data: URLs do not get preloaded.
There is no need as the data is already available.

Test: fast/preloader/image-data-url.html

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):

LayoutTests:

Add layout test to make sure that images with a data: URL do not
get preloaded.

  • fast/preloader/image-data-url-expected.txt: Added.
  • fast/preloader/image-data-url.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r190604 r190605  
     12015-10-05  Chris Dumez  <cdumez@apple.com>
     2
     3        data: URLs should not be preloaded
     4        https://bugs.webkit.org/show_bug.cgi?id=149829
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Add layout test to make sure that images with a data: URL do not
     9        get preloaded.
     10
     11        * fast/preloader/image-data-url-expected.txt: Added.
     12        * fast/preloader/image-data-url.html: Added.
     13
    1142015-10-05  Jer Noble  <jer.noble@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r190604 r190605  
     12015-10-05  Chris Dumez  <cdumez@apple.com>
     2
     3        data: URLs should not be preloaded
     4        https://bugs.webkit.org/show_bug.cgi?id=149829
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Update the HTMLPreloadScanner so that data: URLs do not get preloaded.
     9        There is no need as the data is already available.
     10
     11        Test: fast/preloader/image-data-url.html
     12
     13        * html/parser/HTMLPreloadScanner.cpp:
     14        (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
     15
    1162015-10-05  Jer Noble  <jer.noble@apple.com>
    217
  • trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp

    r185501 r190605  
    219219            return false;
    220220
     221        if (m_urlToLoad.startsWith("data:", false))
     222            return false;
     223
    221224        if (m_tagId == TagId::Link && !m_linkIsStyleSheet)
    222225            return false;
Note: See TracChangeset for help on using the changeset viewer.