Reviewed by John.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 May 2005 17:44:19 +0000 (17:44 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 May 2005 17:44:19 +0000 (17:44 +0000)
commit5219667f79bf84596d5393cc0080c06bab508949
tree340f06d36b99d64364d849ce075fdda4609e2bde
parent9ffecbb5a92422a9fb2b1ab511af9b1448202337
    Reviewed by John.

- fixed <rdar://problem/3598589> onunload handler doesn't fire when a window is closed

        Test cases added:
        * layout-tests/fast/events/onunload-expected.txt: Added.
        * layout-tests/fast/events/onunload.html: Added.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::detach): Don't remove all event handlers from the document here...
        * khtml/khtml_part.cpp:
        (KHTMLPart::closeURL): ...instead do it here, after firing the unload event, but only
if the document is not in the back/forward cache...
        * kwq/KWQPageState.mm:
        (-[KWQPageState finalize]): ...and take care of the back/forward cache case here.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@9200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/fast/events/onunload-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/onunload.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23
WebCore/khtml/khtml_part.cpp
WebCore/khtml/xml/dom_docimpl.cpp
WebCore/kwq/KWQPageState.mm