24 #include "dom/html_head.h"
25 #include "html/html_headimpl.h"
26 #include "xml/dom_docimpl.h"
38 HTMLBaseElement::HTMLBaseElement(HTMLBaseElementImpl *impl) :
HTMLElement(impl)
44 assignOther(other, ID_BASE);
50 HTMLElement::operator = (other);
54 HTMLBaseElement::~HTMLBaseElement()
64 return !
href.isNull() ? impl->document()->completeURL(
href.string()) :
href;
70 ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
79 return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
85 ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
99 HTMLLinkElement::HTMLLinkElement(HTMLLinkElementImpl *impl) :
HTMLElement(impl)
105 assignOther(other, ID_LINK);
111 HTMLElement::operator = (other);
115 HTMLLinkElement::~HTMLLinkElement()
124 return !((ElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
130 ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ?
"" :
nullptr);
139 return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
145 ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
155 return !
href.isNull() ? impl->document()->completeURL(
href.string()) :
href;
161 ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
170 return ((ElementImpl *)impl)->getAttribute(ATTR_HREFLANG);
176 ((ElementImpl *)impl)->setAttribute(ATTR_HREFLANG, value);
185 return ((ElementImpl *)impl)->getAttribute(ATTR_MEDIA);
191 ((ElementImpl *)impl)->setAttribute(ATTR_MEDIA, value);
200 return ((ElementImpl *)impl)->getAttribute(ATTR_REL);
206 ((ElementImpl *)impl)->setAttribute(ATTR_REL, value);
215 return ((ElementImpl *)impl)->getAttribute(ATTR_REV);
221 ((ElementImpl *)impl)->setAttribute(ATTR_REV, value);
230 return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
236 ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
245 return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
251 ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
260 return ((HTMLLinkElementImpl *)impl)->sheet();
273 HTMLMetaElement::HTMLMetaElement(HTMLMetaElementImpl *impl) :
HTMLElement(impl)
279 assignOther(other, ID_META);
285 HTMLElement::operator = (other);
289 HTMLMetaElement::~HTMLMetaElement()
298 return ((ElementImpl *)impl)->getAttribute(ATTR_CONTENT);
304 ((ElementImpl *)impl)->setAttribute(ATTR_CONTENT, value);
313 return ((ElementImpl *)impl)->getAttribute(ATTR_HTTP_EQUIV);
319 ((ElementImpl *)impl)->setAttribute(ATTR_HTTP_EQUIV, value);
328 return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
334 ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
343 return ((ElementImpl *)impl)->getAttribute(ATTR_SCHEME);
349 ((ElementImpl *)impl)->setAttribute(ATTR_SCHEME, value);
355 HTMLScriptElement::HTMLScriptElement() :
HTMLElement()
363 HTMLScriptElement::HTMLScriptElement(HTMLScriptElementImpl *impl) :
HTMLElement(impl)
369 assignOther(other, ID_SCRIPT);
375 HTMLElement::operator = (other);
379 HTMLScriptElement::~HTMLScriptElement()
388 return ((HTMLScriptElementImpl *)impl)->text();
394 ((HTMLScriptElementImpl *)impl)->setText(value);
425 return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
431 ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
440 return !((ElementImpl *)impl)->getAttribute(ATTR_DEFER).isNull();
447 ((ElementImpl *)impl)->setAttribute(ATTR_DEFER, _defer ?
"" :
nullptr);
457 return !s.isNull() ? impl->document()->completeURL(s.string()) : s;
463 ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
472 return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
478 ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
484 HTMLStyleElement::HTMLStyleElement() :
HTMLElement()
492 HTMLStyleElement::HTMLStyleElement(HTMLStyleElementImpl *impl) :
HTMLElement(impl)
498 assignOther(other, ID_STYLE);
504 HTMLElement::operator = (other);
508 HTMLStyleElement::~HTMLStyleElement()
517 return !((HTMLStyleElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
524 ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ?
"" :
nullptr);
533 return ((ElementImpl *)impl)->getAttribute(ATTR_MEDIA);
539 ((ElementImpl *)impl)->setAttribute(ATTR_MEDIA, value);
548 return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
554 ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
563 return ((HTMLStyleElementImpl *)impl)->sheet();
568 HTMLTitleElement::HTMLTitleElement() :
HTMLElement()
576 HTMLTitleElement::HTMLTitleElement(HTMLTitleElementImpl *impl) :
HTMLElement(impl)
582 assignOther(other, ID_TITLE);
588 HTMLElement::operator = (other);
592 HTMLTitleElement::~HTMLTitleElement()
601 return ((HTMLTitleElementImpl *)impl)->text();
607 ((HTMLTitleElementImpl *)impl)->setText(value);