<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>163606</bug_id>
          
          <creation_ts>2016-10-18 11:26:43 -0700</creation_ts>
          <short_desc>DOM Document adoptNode doesn&apos;t always connect event handlers</short_desc>
          <delta_ts>2022-09-18 19:17:19 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1241516</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-10-18 11:26:43 -0700</bug_when>
    <thetext>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&quot; that check the original document for event handlers, and assume there&apos;s nothing to do if they have been purged. Unfortunately, this can cause us to fail to add event handlers when expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899169</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-17 00:06:58 -0700</bug_when>
    <thetext>@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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899411</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-09-18 19:17:19 -0700</bug_when>
    <thetext>I&apos;m pretty sure we&apos;ve fix this problem by now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>