WebCore:
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Oct 2008 09:43:34 +0000 (09:43 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Oct 2008 09:43:34 +0000 (09:43 +0000)
commita428de6799151ffa7b5fb260ca1d462f5eea408d
treedd95fb91e52b8b6b1309d2b7dfdc452414c3b458
parentbd400c93ad0c3be21401fb428e6474f9ea418b03
WebCore:

2008-10-23  Adam Barth  <abarth@webkit.org>

        Reviewed by Sam Weinig.

        https://bugs.webkit.org/show_bug.cgi?id=21787

        Update postMessage to send origin = "null" for non-serializable
        origins to match latest spec.  Merge SecurityOrigin::toString and
        SecurityOrigin::toHTTPOrigin because they are now the same.

        Test: http/tests/security/postMessage/data-url-sends-null-origin.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::outgoingOrigin):
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::addHTTPOriginIfNeeded):
        (WebCore::FrameLoader::loadItem):
        * loader/loader.cpp:
        (WebCore::Loader::Host::servePendingRequests):
        * page/SecurityOrigin.cpp:
        (WebCore::SecurityOrigin::toString):
        * page/SecurityOrigin.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
        (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
        (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
        (WebCore::XMLHttpRequest::didReceiveResponsePreflight):

LayoutTests:

2008-10-23  Adam Barth  <abarth@webkit.org>

        Reviewed by Sam Weinig.

        https://bugs.webkit.org/show_bug.cgi?id=21787

        Add test coverage for postMessaging from a data URL.

        * http/tests/security/postMessage/data-url-sends-null-origin-expected.txt: Added.
        * http/tests/security/postMessage/data-url-sends-null-origin.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/security/postMessage/data-url-sends-null-origin-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/postMessage/data-url-sends-null-origin.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/loader/FrameLoader.cpp
WebCore/loader/loader.cpp
WebCore/page/SecurityOrigin.cpp
WebCore/page/SecurityOrigin.h
WebCore/xml/XMLHttpRequest.cpp