Changeset 16081 in webkit


Ignore:
Timestamp:
Aug 28, 2006 1:43:36 PM (18 years ago)
Author:
aliceli1
Message:

LayoutTests:

Reviewed by Geoff.

Added tests for <rdar://problem/4548537> Document.domain and other attributes are blank for an iframe created with document.write

  • http/tests/misc/iframe-domain-test-expected.txt: Added.
  • http/tests/misc/iframe-domain-test.html: Added.

WebCore:

Reviewed by Geoff.

Fixed <rdar://problem/4548537> Document.domain and other attributes are blank for an iframe created with document.write

  • dom/Document.cpp: (WebCore::Document::open): set the document's url to the parent's url and re-located the code that does this to occur before calling the frame's didExplicitOpen()
  • page/Frame.cpp: (WebCore::Frame::didExplicitOpen): set the frame's url to the document's url
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r16054 r16081  
     12006-08-28  Alice Liu  <alice.liu@apple.com>
     2
     3        Reviewed by Geoff.
     4
     5       Added tests for <rdar://problem/4548537> Document.domain and other attributes are blank for an iframe created with document.write
     6
     7        * http/tests/misc/iframe-domain-test-expected.txt: Added.
     8        * http/tests/misc/iframe-domain-test.html: Added.
     9
    1102006-08-27  Rob Buis  <buis@kde.org>
    211
  • trunk/WebCore/ChangeLog

    r16080 r16081  
     12006-08-28  Alice Liu  <alice.liu@apple.com>
     2
     3        Reviewed by Geoff.
     4
     5        Fixed <rdar://problem/4548537> Document.domain and other attributes are blank for an iframe created with document.write
     6
     7        * dom/Document.cpp:
     8        (WebCore::Document::open):
     9        set the document's url to the parent's url and re-located the code that does this to occur before calling the frame's didExplicitOpen()
     10        * page/Frame.cpp:
     11        (WebCore::Frame::didExplicitOpen):
     12        set the frame's url to the document's url
     13
    1142006-08-28  Brady Eidson  <beidson@apple.com>
    215
  • trunk/WebCore/dom/Document.cpp

    r15828 r16081  
    11091109void Document::open()
    11101110{
     1111    // This is work that we should probably do in clear(), but we can't have it
     1112    // happen when implicitOpen() is called unless we reorganize Frame code.
     1113    if (Document *parent = parentDocument()) {
     1114        setURL(parent->baseURL());
     1115        setBaseURL(parent->baseURL());
     1116    }
     1117    else
     1118        setURL(DeprecatedString());
     1119       
     1120
    11111121    if ((frame() && frame()->isLoadingMainResource()) || (tokenizer() && tokenizer()->executingScript()))
    11121122        return;
     
    11161126    if (frame())
    11171127        frame()->didExplicitOpen();
    1118 
    1119     // This is work that we should probably do in clear(), but we can't have it
    1120     // happen when implicitOpen() is called unless we reorganize Frame code.
    1121     setURL(DeprecatedString());
    1122     if (Document *parent = parentDocument())
    1123         setBaseURL(parent->baseURL());
    11241128}
    11251129
  • trunk/WebCore/page/Frame.cpp

    r16026 r16081  
    272272  // implicitly precedes document.write.
    273273  cancelRedirection();
     274  d->m_url = d->m_doc->URL();
    274275}
    275276
Note: See TracChangeset for help on using the changeset viewer.