Changeset 41953 in webkit


Ignore:
Timestamp:
Mar 24, 2009 2:40:24 PM (15 years ago)
Author:
ddkilzer@apple.com
Message:

Bug 23310: Setting an absolute path (/abs) on an <iframe> with no src doesn't resolve the URL properly

<https://bugs.webkit.org/show_bug.cgi?id=23310>

Reviewed by Darin Adler.

WebCore:

Test: fast/frames/iframe-no-src-set-location.html

  • dom/Document.cpp: (WebCore::Document::completeURL): If m_baseURL is empty or is about:blank and we have a parent document, use the parent document's URL for the base when completing a new URL.

LayoutTests:

  • fast/frames/iframe-no-src-set-location-expected.txt: Added.
  • fast/frames/iframe-no-src-set-location.html: Added.
  • fast/frames/resources/iframe-no-src-set-location-pass.html: Copied from LayoutTests/fast/dom/Document/early-document-access-expected.txt.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r41952 r41953  
     12009-03-24  David Kilzer  <ddkilzer@apple.com>
     2
     3        Bug 23310: Setting an absolute path (/abs) on an <iframe> with no src doesn't resolve the URL properly
     4
     5        <https://bugs.webkit.org/show_bug.cgi?id=23310>
     6
     7        Reviewed by Darin Adler.
     8
     9        * fast/frames/iframe-no-src-set-location-expected.txt: Added.
     10        * fast/frames/iframe-no-src-set-location.html: Added.
     11        * fast/frames/resources/iframe-no-src-set-location-pass.html: Copied from LayoutTests/fast/dom/Document/early-document-access-expected.txt.
     12
    1132009-03-24  Simon Fraser  <simon.fraser@apple.com>
    214
  • trunk/WebCore/ChangeLog

    r41952 r41953  
     12009-03-24  David Kilzer  <ddkilzer@apple.com>
     2
     3        Bug 23310: Setting an absolute path (/abs) on an <iframe> with no src doesn't resolve the URL properly
     4
     5        <https://bugs.webkit.org/show_bug.cgi?id=23310>
     6
     7        Reviewed by Darin Adler.
     8
     9        Test: fast/frames/iframe-no-src-set-location.html
     10
     11        * dom/Document.cpp:
     12        (WebCore::Document::completeURL): If m_baseURL is empty or is
     13        about:blank and we have a parent document, use the parent
     14        document's URL for the base when completing a new URL.
     15
    1162009-03-24  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/WebCore/dom/Document.cpp

    r41944 r41953  
    31253125    if (url.isNull())
    31263126        return KURL();
     3127    const KURL& baseURL = ((m_baseURL.isEmpty() || m_baseURL == blankURL()) && parentDocument()) ? parentDocument()->baseURL() : m_baseURL;
    31273128    if (!m_decoder)
    3128         return KURL(m_baseURL, url);
    3129     return KURL(m_baseURL, url, m_decoder->encoding());
     3129        return KURL(baseURL, url);
     3130    return KURL(baseURL, url, m_decoder->encoding());
    31303131}
    31313132
Note: See TracChangeset for help on using the changeset viewer.