From kde-commits Tue Jan 15 20:18:55 2008 From: Maks Orlovich Date: Tue, 15 Jan 2008 20:18:55 +0000 To: kde-commits Subject: branches/KDE/4.0/kdelibs/khtml Message-Id: <1200428335.949918.7068.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120042838525390 SVN commit 761979 by orlovich: Properly handle DOMImplementation::createDocument(null, null, null) --- don't convert the first 2 to "null", "null", and make checkQualifiedName not crash in that case. (Shows up on acid3) M +3 -1 ecma/kjs_dom.cpp M +1 -1 xml/dom_elementimpl.h --- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_dom.cpp #761978:761979 @@ -1342,7 +1342,9 @@ DOM::DocumentTypeImpl* docType = static_cast(supposedDocType); - DOM::DocumentImpl* doc = implementation.createDocument(args[0]->toString(exec).domString(),args[1]->toString(exec).domString(),docType,exception); + DOM::DocumentImpl* doc = implementation.createDocument(valueToStringWithNullCheck(exec, args[0]), + valueToStringWithNullCheck(exec, args[1]), + docType, exception); if (!doc) return jsNull(); KUrl url = static_cast(part->document().handle())->URL(); --- branches/KDE/4.0/kdelibs/khtml/xml/dom_elementimpl.h #761978:761979 @@ -373,7 +373,7 @@ int colonpos = -1; uint i; DOMStringImpl *qname = qualifiedName.implementation(); - for (i = 0 ; i < qname->l ; i++) { + for (i = 0 ; i < (qname ? qname->l : 0); i++) { if ((*qname)[i] == QLatin1Char(':')) { colonpos = i; break;