From kde-commits Wed Apr 02 20:44:11 2008 From: Harri Porten Date: Wed, 02 Apr 2008 20:44:11 +0000 To: kde-commits Subject: branches/KDE/4.0/kdelibs/khtml/xml Message-Id: <1207169051.145704.26884.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120716906225901 SVN commit 793010 by porten: Provide setter function for whoever wants to tackle the ToDo mentioned in Dirk's comment. M +8 -3 dom_docimpl.cpp M +1 -0 dom_docimpl.h --- branches/KDE/4.0/kdelibs/khtml/xml/dom_docimpl.cpp #793009:793010 @@ -344,11 +344,10 @@ // ### this should be created during parsing a // not during construction. Not sure who added that and why (Dirk) - m_doctype = new DocumentTypeImpl(_implementation, getDocument(), + setDocType( new DocumentTypeImpl(_implementation, getDocument(), DOMString() /* qualifiedName */, DOMString() /* publicId */, - DOMString() /* systemId */); - m_doctype->ref(); + DOMString() /* systemId */) ); m_implementation = _implementation; m_implementation->ref(); @@ -499,6 +498,12 @@ return m_doctype; } +void DocumentImpl::setDocType(DocumentTypeImpl* dt) +{ + m_doctype = dt; + m_doctype->ref(); +} + DOMImplementationImpl *DocumentImpl::implementation() const { return m_implementation; --- branches/KDE/4.0/kdelibs/khtml/xml/dom_docimpl.h #793009:793010 @@ -189,6 +189,7 @@ // DOM methods & attributes for Document DocumentTypeImpl *doctype() const; + void setDocType(DocumentTypeImpl* dt); DOMImplementationImpl *implementation() const; ElementImpl *documentElement() const;