WebCore:
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 May 2008 20:14:29 +0000 (20:14 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 May 2008 20:14:29 +0000 (20:14 +0000)
commit330cddd254729ec417249db8aeded2a6b4cf87d7
tree579963334cf0ca01e44f121b388710d4a40f365b
parent59273d39df78e381d9a51d3d2bc0bc13f3536c96
WebCore:

2008-05-09  Adam Barth  <abarth-webkit@adambarth.com>

        Reviewed by Sam Weinig.

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

        Make postMessage generate an event on the window instead of the
        document.

        Test: http/tests/messaging/cross-domain-message-event-dispatch.html

        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::dispatchWindowEvent):
        * dom/EventTargetNode.h:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::postMessageTimerFired):

LayoutTests:

2008-05-09  Adam Barth  <abarth-webkit@adambarth.com>

        Reviewed by Sam Weinig.

        Update tests to listen for message events on the window instead of
        the document.  Also, added a test that the event is sent to the
        window and not to the document.

        * http/tests/messaging/cross-domain-message-event-dispatch-expected.txt: Added.
        * http/tests/messaging/cross-domain-message-event-dispatch.html: Added.
        * http/tests/messaging/cross-domain-message-send.html:
        * http/tests/messaging/resources/cross-domain-message-receive.html:
        * http/tests/security/cross-frame-access-delete.html:
        * http/tests/security/cross-frame-access-history-put.html:
        * http/tests/security/cross-frame-access-location-put.html:
        * http/tests/security/postMessage/delivery-order.html:
        * http/tests/security/postMessage/invalid-origin-throws-exception.html:
        * http/tests/security/postMessage/javascript-page-still-sends-origin.html:
        * http/tests/security/postMessage/origin-unaffected-by-base-tag.html:
        * http/tests/security/postMessage/origin-unaffected-by-document-domain.html:
        * http/tests/security/postMessage/resources/post-message-listener.html:
        * http/tests/security/postMessage/target-origin.html:
        * http/tests/security/resources/cross-frame-iframe-for-delete-test.html:
        * http/tests/security/resources/cross-frame-iframe-for-history-put-test.html:
        * http/tests/security/resources/cross-frame-iframe-for-location-put-test.html:
        * http/tests/security/xss-eval.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/messaging/cross-domain-message-event-dispatch-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/messaging/cross-domain-message-event-dispatch.html [new file with mode: 0644]
LayoutTests/http/tests/messaging/cross-domain-message-send.html
LayoutTests/http/tests/messaging/resources/cross-domain-message-receive.html
LayoutTests/http/tests/security/cross-frame-access-delete.html
LayoutTests/http/tests/security/cross-frame-access-history-put.html
LayoutTests/http/tests/security/cross-frame-access-location-put.html
LayoutTests/http/tests/security/postMessage/delivery-order.html
LayoutTests/http/tests/security/postMessage/invalid-origin-throws-exception.html
LayoutTests/http/tests/security/postMessage/javascript-page-still-sends-origin.html
LayoutTests/http/tests/security/postMessage/origin-unaffected-by-base-tag.html
LayoutTests/http/tests/security/postMessage/origin-unaffected-by-document-domain.html
LayoutTests/http/tests/security/postMessage/resources/post-message-listener.html
LayoutTests/http/tests/security/postMessage/target-origin.html
LayoutTests/http/tests/security/resources/cross-frame-iframe-for-delete-test.html
LayoutTests/http/tests/security/resources/cross-frame-iframe-for-history-put-test.html
LayoutTests/http/tests/security/resources/cross-frame-iframe-for-location-put-test.html
LayoutTests/http/tests/security/xss-eval.html
WebCore/ChangeLog
WebCore/dom/EventTargetNode.cpp
WebCore/dom/EventTargetNode.h
WebCore/page/DOMWindow.cpp