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: https://svn.webkit.org/repository/webkit/trunk@9200
268f45cc-cd09-0410-ab3c-
d52691b4dbfc