Bug 163606

Summary: DOM Document adoptNode doesn't always connect event handlers
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, cdumez, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   

Brent Fulgham
Reported 2016-10-18 11:26:43 PDT
If a Node containing an event handler is moved from one document to another, the event handler might not be registered with the new document if the old document has already been destroyed. This appears to be due to some optimizations in the Node::didMoveToNewDocument" that check the original document for event handlers, and assume there's nothing to do if they have been purged. Unfortunately, this can cause us to fail to add event handlers when expected.
Attachments
Ahmad Saleem
Comment 1 2022-09-17 00:06:58 PDT
@Brent - Is this still an issue? In Node.cpp, there is only this reference: https://github.com/WebKit/WebKit/blob/3b347ab447d674df0e53063a8f80547d09b98035/Source/WebCore/dom/Node.cpp#L2178
Ryosuke Niwa
Comment 2 2022-09-18 19:17:19 PDT
I'm pretty sure we've fix this problem by now.
Note You need to log in before you can comment on or make changes to this bug.