[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/khtml/xml
From:       Germain Garand <germain () ebooksfrance ! com>
Date:       2007-10-07 0:07:25
Message-ID: 1191715645.409702.15964.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 722243 by ggarand:

patch by Antti Koivisto <koivisto@iki.fi>  WC/#12918/r19897/
events to dead node should not propagate further



 M  +10 -3     dom_nodeimpl.cpp  


--- trunk/KDE/kdelibs/khtml/xml/dom_nodeimpl.cpp #722242:722243
@@ -434,9 +434,16 @@
     // work out what nodes to send event to
     Q3PtrList<NodeImpl> nodeChain;
     NodeImpl *n;
-    for (n = this; n; n = n->parentNode()) {
-        n->ref();
-        nodeChain.prepend(n);
+ 
+    if (inDocument()) {
+        for (n = this; n; n = n->parentNode()) {
+            n->ref();
+            nodeChain.prepend(n);
+        } 
+    } else {
+        // if node is not in the document just send event to itself 
+        ref();
+        nodeChain.prepend(this);
     }
 
     // trigger any capturing event handlers on our way down
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic