WebCore:

2009-04-03  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin Adler.

        <rdar://problem/6330929>
        https://bugs.webkit.org/show_bug.cgi?id=21456

        Don't update the document pointer for all inactive windows on navigations.
        This change causes us to differ slightly from Firefox when accessing the
        document from within a closure tied to a navigated context, but as all
        browsers differ on this edge case, I don't foresee compatibility issues.

        Test: http/tests/security/cross-frame-access-document-direct.html

        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::clearWindowShell):
        (WebCore::ScriptController::initScript):
        (WebCore::ScriptController::updateDocument):
        * bindings/js/ScriptController.h:

LayoutTests:

2009-04-03  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin Adler.

        Update tests for <rdar://problem/6330929>
        https://bugs.webkit.org/show_bug.cgi?id=21456

        * dom/xhtml/level2/html/HTMLFormElement10-expected.txt:
        * fast/dom/Window/dom-access-from-closure-iframe-expected.txt:
        * fast/dom/Window/dom-access-from-closure-window-expected.txt:
        * http/tests/security/cross-frame-access-document-direct-expected.txt: Added.
        * http/tests/security/cross-frame-access-document-direct.html: Added.
        * http/tests/security/resources/cross-frame-iframe-for-document-direct-test-victim.html: Added.
        * http/tests/security/resources/cross-frame-iframe-for-document-direct-test.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed