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

List:       kde-commits
Subject:    branches/KDE/4.0/kdelibs/khtml/ecma
From:       Harri Porten <porten () kde ! org>
Date:       2008-03-16 15:23:48
Message-ID: 1205681028.585581.3870.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 786269 by porten:

Fixed type checks in contains() function (IE extension).


 M  +3 -5      kjs_dom.cpp  


--- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_dom.cpp #786268:786269
@@ -623,11 +623,9 @@
     case DOMNode::Contains:
     {
       DOM::NodeImpl* other = toNode(args[0]);
-      if (other && node.isElementNode())
-      {
-          bool retval = other->isAncestor(&node);
-          return jsBoolean(retval);
-      }
+      if (other && other->isElementNode())
+          return jsBoolean(other->isAncestor(&node));
+      setDOMException(exec, DOMException::TYPE_MISMATCH_ERR); // ### a guess
       return jsUndefined();
     }
     case DOMNode::InsertAdjacentHTML:
[prev in list] [next in list] [prev in thread] [next in thread] 

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