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

List:       kde-commits
Subject:    branches/KDE/4.0/kdelibs/khtml/xml
From:       Harri Porten <porten () kde ! org>
Date:       2008-04-02 20:44:11
Message-ID: 1207169051.145704.26884.nullmailer () svn ! kde ! org
[Download RAW message or body]

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 <!DOCTYPE>
     // 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;
[prev in list] [next in list] [prev in thread] [next in thread] 

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