Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 2cc0d72bb015f9fb0fd56fedb91e149a05fb57f6 https://github.com/WebKit/WebKit/commit/2cc0d72bb015f9fb0fd56fedb91e149a05fb57f6 Author: Ryosuke Niwa <rn...@webkit.org> Date: 2025-08-19 (Tue, 19 Aug 2025)
Changed paths: M Source/WebCore/dom/Document.cpp M Source/WebCore/dom/Document.h M Source/WebCore/dom/Node.cpp M Source/WebCore/html/HTMLFrameOwnerElement.cpp Log Message: ----------- Touch event handler assertion failure in Node::~Node https://bugs.webkit.org/show_bug.cgi?id=297575 Reviewed by Wenson Hsieh. The assertion failure was caused by didRemoveTouchEventHandler not getting called on an inner document in an iframe when the iframe is getting disconnected from the outer document. Since didAddTouchEventHandler recursively calls ancestor document's didAddTouchEventHandler using the content document as the handler, we must call didRemoveTouchEventHandler when the inner document gets disconnected from the frame. * Source/WebCore/dom/Document.cpp: (WebCore::Document::didRemoveTouchEventHandler): Fix a bug that this wasn't passing removal argument to the parent document's didRemoveTouchEventHandler. (WebCore::Document::willBeDisconnectedFromFrame): Added. * Source/WebCore/dom/Document.h: * Source/WebCore/dom/Node.cpp: (WebCore::Node::~Node): * Source/WebCore/html/HTMLFrameOwnerElement.cpp: (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): Call willBeDisconnectedFromFrame, which in turn calls Document::didRemoveTouchEventHandler on the parent document. Note that we can't use tree().parent() in this function since the frame tree had already been updated by the time we get to this function. Canonical link: https://commits.webkit.org/298942@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes