Changeset 192969 in webkit


Ignore:
Timestamp:
Dec 2, 2015 2:41:21 PM (8 years ago)
Author:
yoav@yoav.ws
Message:

Fix preloader issue with srcdoc documents.
https://bugs.webkit.org/show_bug.cgi?id=151744

Reviewed by Ryosuke Niwa.

Source/WebCore:

Make sure that PreloadRequest is resolving URLs based on the document's
baseURL() rather than using url() as the base URL, which is not how URLs
are resolved by the parser, and fails when document->url() diverges from
the document's base URL (e.g. in the case of srcdoc based documents).

Test: fast/preloader/iframe-srcdoc.html

  • html/parser/HTMLResourcePreloader.cpp:

(WebCore::PreloadRequest::completeURL):

LayoutTests:

Added a test that makes sure that srcdoc based subresources are properly preloaded.

  • fast/preloader/iframe-srcdoc-expected.txt: Added.
  • fast/preloader/iframe-srcdoc.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r192966 r192969  
     12015-12-02  Yoav Weiss  <yoav@yoav.ws>
     2
     3        Fix preloader issue with srcdoc documents.
     4        https://bugs.webkit.org/show_bug.cgi?id=151744
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Added a test that makes sure that srcdoc based subresources are properly preloaded.
     9
     10        * fast/preloader/iframe-srcdoc-expected.txt: Added.
     11        * fast/preloader/iframe-srcdoc.html: Added.
     12
    1132015-12-02  Jer Noble  <jer.noble@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r192966 r192969  
     12015-12-02  Yoav Weiss  <yoav@yoav.ws>
     2
     3        Fix preloader issue with srcdoc documents.
     4        https://bugs.webkit.org/show_bug.cgi?id=151744
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Make sure that PreloadRequest is resolving URLs based on the document's
     9        baseURL() rather than using url() as the base URL, which is not how URLs
     10        are resolved by the parser, and fails when document->url() diverges from
     11        the document's base URL (e.g. in the case of srcdoc based documents).
     12
     13        Test: fast/preloader/iframe-srcdoc.html
     14
     15        * html/parser/HTMLResourcePreloader.cpp:
     16        (WebCore::PreloadRequest::completeURL):
     17
    1182015-12-02  Jer Noble  <jer.noble@apple.com>
    219
  • trunk/Source/WebCore/html/parser/HTMLResourcePreloader.cpp

    r179242 r192969  
    3838URL PreloadRequest::completeURL(Document& document)
    3939{
    40     return document.completeURL(m_resourceURL, m_baseURL.isEmpty() ? document.url() : m_baseURL);
     40    return document.completeURL(m_resourceURL, m_baseURL.isEmpty() ? document.baseURL() : m_baseURL);
    4141}
    4242
Note: See TracChangeset for help on using the changeset viewer.