24 #include "html_document.h"
25 #include "css/csshelper.h"
26 #include "dom/html_misc.h"
27 #include "dom/dom_exception.h"
28 #include "xml/dom_textimpl.h"
29 #include "html/html_documentimpl.h"
30 #include "html/html_miscimpl.h"
31 #include "misc/htmlhashes.h"
35 HTMLDocument::HTMLDocument() :
Document(false)
37 impl = DOMImplementationImpl::instance()->createHTMLDocument();
45 impl = DOMImplementationImpl::instance()->createHTMLDocument(parent);
53 HTMLDocument::HTMLDocument(HTMLDocumentImpl *impl) :
Document(impl)
59 if(other.
nodeType() != DOCUMENT_NODE) {
60 if ( impl ) impl->deref();
63 DocumentImpl *d =
static_cast<DocumentImpl *
>(other.handle());
64 if(!d->isHTMLDocument()) {
65 if ( impl ) impl->deref();
68 Node::operator =(other);
76 Document::operator =(other);
80 HTMLDocument::~HTMLDocument()
87 return static_cast<HTMLDocumentImpl *
>(impl)->
title();
93 static_cast<HTMLDocumentImpl *
>(impl)->
setTitle(value);
99 return ((HTMLDocumentImpl *)impl)->referrer();
104 if(!impl)
return str;
106 return ((HTMLDocumentImpl *)impl)->completeURL(parsed.string());
112 return ((HTMLDocumentImpl *)impl)->domain();
118 return ((HTMLDocumentImpl *)impl)->lastModified();
124 return ((HTMLDocumentImpl *)impl)->URL().url();
130 return ((HTMLDocumentImpl *)impl)->body();
136 int exceptioncode = 0;
137 ((HTMLDocumentImpl *)impl)->setBody(static_cast<HTMLElementImpl *>(_body.handle()), exceptioncode);
194 return ((HTMLDocumentImpl *)impl)->cookie();
200 ((HTMLDocumentImpl *)impl)->setCookie(value);
207 ((HTMLDocumentImpl *)impl)->open( );
213 ((HTMLDocumentImpl *)impl)->close( );
219 ((HTMLDocumentImpl *)impl)->write( text );
225 ((HTMLDocumentImpl *)impl)->writeln( text );
231 return new NameNodeListImpl(impl, elementName);