Fixed <rdar://problem/
4062336> REGRESSION (406-407): HTML submenus not working at hrweb.apple.com after going back
Rolled out the fix for <rdar://problem/
4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
We clearly need a better solution to
4041374. We can't indiscriminately remove event listeners in closeURL() after-all. Since event listeners are registered in a <script> tag, which is evaluated and executed at page load time, this becomes a problem since we don't reevaluate a page's <script> that is in the back/forward cache. Thus once you leave the page, the listeners are gone for good. This is the problem.
* khtml/khtml_part.cpp:
(KHTMLPart::closeURL):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::detach):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8962
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-03-22 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Vicki.
+
+ Fixed <rdar://problem/4062336> REGRESSION (406-407): HTML submenus not working at hrweb.apple.com after going back
+
+ Rolled out the fix for <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
+
+ We clearly need a better solution to 4041374. We can't indiscriminately remove event listeners in closeURL() after-all. Since event listeners are registered in a <script> tag, which is evaluated and executed at page load time, this becomes a problem since we don't reevaluate a page's <script> that is in the back/forward cache. Thus once you leave the page, the listeners are gone for good. This is the problem.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::closeURL):
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::detach):
+
=== Safari-410 ===
2005-03-22 Vicki Murley <vicki@apple.com>
}
}
- if (d->m_doc) {
- d->m_doc->removeAllEventListenersFromAllNodes();
- }
-
d->m_bComplete = true; // to avoid emitting completed() in slotFinishedParsing() (David)
d->m_bLoadingMainResource = false;
d->m_bLoadEventEmitted = true; // don't want that one either
// objects to remove themselves from the lists.
m_imageLoadEventDispatchSoonList.clear();
m_imageLoadEventDispatchingList.clear();
-
+
+
+ // FIXME: UNLOAD_EVENT will not dispatch due to deleting event listeners prior to closeURL().
+ removeAllEventListenersFromAllNodes();
NodeBaseImpl::detach();