[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:15:54 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 100139462a03e3078f7066e6bc3fee1b15c514b2
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 3 19:46:12 2003 +0000
Reviewed by Ken.
<rdar://problem/3395759>: results of parent.document.getElementsByTagName can't be added to string
* khtml/ecma/kjs_dom.cpp:
(DOMNodeList::toPrimitive): Always convert to string instead of trying to convert
to number and failing, as is done for DOMNode.
* khtml/ecma/kjs_dom.h: Prototype new method.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 530ef24..1c6b0f0 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2003-12-03 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Ken.
+
+ <rdar://problem/3395759>: results of parent.document.getElementsByTagName can't be added to string
+
+ * khtml/ecma/kjs_dom.cpp:
+ (DOMNodeList::toPrimitive): Always convert to string instead of trying to convert
+ to number and failing, as is done for DOMNode.
+ * khtml/ecma/kjs_dom.h: Prototype new method.
+
2003-12-02 Richard Williamson <rjw at apple.com>
Return a value that is backed by RuntimeObjectImpl, instead
diff --git a/WebCore/khtml/ecma/kjs_dom.cpp b/WebCore/khtml/ecma/kjs_dom.cpp
index 5e588fb..b19d78c 100644
--- a/WebCore/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/khtml/ecma/kjs_dom.cpp
@@ -496,6 +496,16 @@ DOMNodeList::~DOMNodeList()
ScriptInterpreter::forgetDOMObject(list.handle());
}
+Value DOMNodeList::toPrimitive(ExecState *exec, Type /*preferred*/) const
+{
+ if (list.isNull())
+ return Null();
+
+ return String(toString(exec));
+}
+
+
+
// We have to implement hasProperty since we don't use a hashtable for 'length' and 'item'
// ## this breaks "for (..in..)" though.
bool DOMNodeList::hasProperty(ExecState *exec, const Identifier &p) const
diff --git a/WebCore/khtml/ecma/kjs_dom.h b/WebCore/khtml/ecma/kjs_dom.h
index 92fd594..d57f687 100644
--- a/WebCore/khtml/ecma/kjs_dom.h
+++ b/WebCore/khtml/ecma/kjs_dom.h
@@ -84,6 +84,9 @@ namespace KJS {
virtual bool toBoolean(ExecState *) const { return true; }
static const ClassInfo info;
DOM::NodeList nodeList() const { return list; }
+
+ virtual Value toPrimitive(ExecState *exec, Type preferred = UndefinedType) const;
+
private:
DOM::NodeList list;
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list