From f7279a489b22c536c0cf5916abbe66390072d8b2 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 7 Sep 2010 20:10:08 +0000 Subject: * Imported all kdelibs bugfix patches from Chakra project git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1172682 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khtml/ecma/kjs_dom.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'khtml') diff --git a/khtml/ecma/kjs_dom.cpp b/khtml/ecma/kjs_dom.cpp index c96e99939..08afc6aab 100644 --- a/khtml/ecma/kjs_dom.cpp +++ b/khtml/ecma/kjs_dom.cpp @@ -335,26 +335,26 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const switch (token) { case OffsetLeft: - return rend ? static_cast( Number( rend->offsetLeft() ) ) : Undefined(); + return rend ? static_cast( Number( rend->offsetLeft() ) ) : Number(0); case OffsetTop: - return rend ? static_cast( Number( rend->offsetTop() ) ) : Undefined(); + return rend ? static_cast( Number( rend->offsetTop() ) ) : Number(0); case OffsetWidth: - return rend ? static_cast( Number( rend->offsetWidth() ) ) : Undefined(); + return rend ? static_cast( Number( rend->offsetWidth() ) ) : Number(0); case OffsetHeight: - return rend ? static_cast( Number( rend->offsetHeight() ) ) : Undefined(); + return rend ? static_cast( Number( rend->offsetHeight() ) ) : Number(0); case OffsetParent: { khtml::RenderObject* par = rend ? rend->offsetParent() : 0; return getDOMNode( exec, par ? par->element() : 0 ); } case ClientWidth: - return rend ? static_cast( Number( rend->clientWidth() ) ) : Undefined(); + return rend ? static_cast( Number( rend->clientWidth() ) ) : Number(0); case ClientHeight: - return rend ? static_cast( Number( rend->clientHeight() ) ) : Undefined(); + return rend ? static_cast( Number( rend->clientHeight() ) ) : Number(0); case ScrollWidth: - return rend ? static_cast( Number(rend->scrollWidth()) ) : Undefined(); + return rend ? static_cast( Number(rend->scrollWidth()) ) : Number(0); case ScrollHeight: - return rend ? static_cast( Number(rend->scrollHeight()) ) : Undefined(); + return rend ? static_cast( Number(rend->scrollHeight()) ) : Number(0); case ScrollLeft: if (rend && rend->layer()) { if (rend->isRoot() && !rend->style()->hidesOverflow()) -- cgit v1.2.1