html_head.cpp
// --------------------------------------------------------------------------
#include "dom/html_head.h"
#include "html/html_headimpl.h"
#include "misc/htmlhashes.h"
#include "xml/dom_docimpl.h"
using namespace DOM;
HTMLBaseElement::HTMLBaseElement() : HTMLElement()
{
}
HTMLBaseElement::HTMLBaseElement(const HTMLBaseElement &other) : HTMLElement(other)
{
}
HTMLBaseElement::HTMLBaseElement(HTMLBaseElementImpl *impl) : HTMLElement(impl)
{
}
HTMLBaseElement &HTMLBaseElement::operator = (const Node &other)
{
assignOther( other, ID_BASE );
return *this;
}
HTMLBaseElement &HTMLBaseElement::operator = (const HTMLBaseElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLBaseElement::~HTMLBaseElement()
{
}
DOMString HTMLBaseElement::href() const
{
if(!impl) return DOMString();
DOMString href = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_HREF);
return !href.isNull() ? impl->getDocument()->completeURL(href.string()) : href;
}
void HTMLBaseElement::setHref( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
}
DOMString HTMLBaseElement::target() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
}
void HTMLBaseElement::setTarget( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
}
// --------------------------------------------------------------------------
HTMLLinkElement::HTMLLinkElement() : HTMLElement()
{
}
HTMLLinkElement::HTMLLinkElement(const HTMLLinkElement &other) : HTMLElement(other)
{
}
HTMLLinkElement::HTMLLinkElement(HTMLLinkElementImpl *impl) : HTMLElement(impl)
{
}
HTMLLinkElement &HTMLLinkElement::operator = (const Node &other)
{
assignOther( other, ID_LINK );
return *this;
}
HTMLLinkElement &HTMLLinkElement::operator = (const HTMLLinkElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLLinkElement::~HTMLLinkElement()
{
}
bool HTMLLinkElement::disabled() const
{
if(!impl) return 0;
return !((ElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
}
void HTMLLinkElement::setDisabled( bool _disabled )
{
if(impl)
((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
}
DOMString HTMLLinkElement::charset() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
}
void HTMLLinkElement::setCharset( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
}
DOMString HTMLLinkElement::href() const
{
if(!impl) return DOMString();
DOMString href = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_HREF);
return !href.isNull() ? impl->getDocument()->completeURL(href.string()) : href;
}
void HTMLLinkElement::setHref( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
}
DOMString HTMLLinkElement::hreflang() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_HREFLANG);
}
void HTMLLinkElement::setHreflang( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREFLANG, value);
}
DOMString HTMLLinkElement::media() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_MEDIA);
}
void HTMLLinkElement::setMedia( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MEDIA, value);
}
DOMString HTMLLinkElement::rel() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_REL);
}
void HTMLLinkElement::setRel( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REL, value);
}
DOMString HTMLLinkElement::rev() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_REV);
}
void HTMLLinkElement::setRev( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REV, value);
}
DOMString HTMLLinkElement::target() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
}
void HTMLLinkElement::setTarget( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
}
DOMString HTMLLinkElement::type() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
}
void HTMLLinkElement::setType( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
}
StyleSheet HTMLLinkElement::sheet() const
{
if(!impl) return 0;
return ((HTMLLinkElementImpl *)impl)->sheet();
}
// --------------------------------------------------------------------------
HTMLMetaElement::HTMLMetaElement() : HTMLElement()
{
}
HTMLMetaElement::HTMLMetaElement(const HTMLMetaElement &other) : HTMLElement(other)
{
}
HTMLMetaElement::HTMLMetaElement(HTMLMetaElementImpl *impl) : HTMLElement(impl)
{
}
HTMLMetaElement &HTMLMetaElement::operator = (const Node &other)
{
assignOther( other, ID_META );
return *this;
}
HTMLMetaElement &HTMLMetaElement::operator = (const HTMLMetaElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLMetaElement::~HTMLMetaElement()
{
}
DOMString HTMLMetaElement::content() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_CONTENT);
}
void HTMLMetaElement::setContent( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CONTENT, value);
}
DOMString HTMLMetaElement::httpEquiv() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_HTTP_EQUIV);
}
void HTMLMetaElement::setHttpEquiv( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HTTP_EQUIV, value);
}
DOMString HTMLMetaElement::name() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
}
void HTMLMetaElement::setName( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
}
DOMString HTMLMetaElement::scheme() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_SCHEME);
}
void HTMLMetaElement::setScheme( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCHEME, value);
}
// --------------------------------------------------------------------------
HTMLScriptElement::HTMLScriptElement() : HTMLElement()
{
}
HTMLScriptElement::HTMLScriptElement(const HTMLScriptElement &other) : HTMLElement(other)
{
}
HTMLScriptElement::HTMLScriptElement(HTMLScriptElementImpl *impl) : HTMLElement(impl)
{
}
HTMLScriptElement &HTMLScriptElement::operator = (const Node &other)
{
assignOther( other, ID_SCRIPT );
return *this;
}
HTMLScriptElement &HTMLScriptElement::operator = (const HTMLScriptElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLScriptElement::~HTMLScriptElement()
{
}
DOMString HTMLScriptElement::text() const
{
if(!impl) return DOMString();
return ((HTMLScriptElementImpl *)impl)->text();
}
void HTMLScriptElement::setText( const DOMString &value )
{
if(impl) ((HTMLScriptElementImpl *)impl)->setText(value);
}
DOMString HTMLScriptElement::htmlFor() const
{
// DOM Level 1 says: reserved for future use...
return DOMString();
}
void HTMLScriptElement::setHtmlFor( const DOMString &/*value*/ )
{
// DOM Level 1 says: reserved for future use...
}
DOMString HTMLScriptElement::event() const
{
// DOM Level 1 says: reserved for future use...
return DOMString();
}
void HTMLScriptElement::setEvent( const DOMString &/*value*/ )
{
// DOM Level 1 says: reserved for future use...
}
DOMString HTMLScriptElement::charset() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
}
void HTMLScriptElement::setCharset( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
}
bool HTMLScriptElement::defer() const
{
if(!impl) return 0;
return !((ElementImpl *)impl)->getAttribute(ATTR_DEFER).isNull();
}
void HTMLScriptElement::setDefer( bool _defer )
{
if(impl)
((ElementImpl *)impl)->setAttribute(ATTR_DEFER,_defer ? "" : 0);
}
DOMString HTMLScriptElement::src() const
{
if(!impl) return DOMString();
DOMString s = ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
return !s.isNull() ? impl->getDocument()->completeURL(s.string()) : s;
}
void HTMLScriptElement::setSrc( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
}
DOMString HTMLScriptElement::type() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
}
void HTMLScriptElement::setType( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
}
// --------------------------------------------------------------------------
HTMLStyleElement::HTMLStyleElement() : HTMLElement()
{
}
HTMLStyleElement::HTMLStyleElement(const HTMLStyleElement &other) : HTMLElement(other)
{
}
HTMLStyleElement::HTMLStyleElement(HTMLStyleElementImpl *impl) : HTMLElement(impl)
{
}
HTMLStyleElement &HTMLStyleElement::operator = (const Node &other)
{
assignOther( other, ID_STYLE );
return *this;
}
HTMLStyleElement &HTMLStyleElement::operator = (const HTMLStyleElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLStyleElement::~HTMLStyleElement()
{
}
bool HTMLStyleElement::disabled() const
{
if(!impl) return 0;
return !((HTMLStyleElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
}
void HTMLStyleElement::setDisabled( bool _disabled )
{
if(impl)
((ElementImpl *)impl)->setAttribute(ATTR_DISABLED,_disabled ? "" : 0);
}
DOMString HTMLStyleElement::media() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_MEDIA);
}
void HTMLStyleElement::setMedia( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MEDIA, value);
}
DOMString HTMLStyleElement::type() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
}
void HTMLStyleElement::setType( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
}
StyleSheet HTMLStyleElement::sheet() const
{
if(!impl) return 0;
return ((HTMLStyleElementImpl *)impl)->sheet();
}
// --------------------------------------------------------------------------
HTMLTitleElement::HTMLTitleElement() : HTMLElement()
{
}
HTMLTitleElement::HTMLTitleElement(const HTMLTitleElement &other) : HTMLElement(other)
{
}
HTMLTitleElement::HTMLTitleElement(HTMLTitleElementImpl *impl) : HTMLElement(impl)
{
}
HTMLTitleElement &HTMLTitleElement::operator = (const Node &other)
{
assignOther( other, ID_TITLE );
return *this;
}
HTMLTitleElement &HTMLTitleElement::operator = (const HTMLTitleElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLTitleElement::~HTMLTitleElement()
{
}
DOMString HTMLTitleElement::text() const
{
if(!impl) return DOMString();
return ((HTMLTitleElementImpl *)impl)->text();
}
void HTMLTitleElement::setText( const DOMString &value )
{
if(impl) ((HTMLTitleElementImpl *)impl)->setText(value);
}
DOM::HTMLScriptElement::htmlFor
DOMString htmlFor() const
Reserved for future use.
Definition: html_head.cpp:334
DOM::HTMLLinkElement::media
DOMString media() const
Designed for use with one or more target media.
Definition: html_head.cpp:158
DOM::HTMLLinkElement::setType
void setType(const DOMString &)
see type
Definition: html_head.cpp:208
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:274
DOM::HTMLBaseElement::setTarget
void setTarget(const DOMString &)
see target
Definition: html_head.cpp:77
DOM::HTMLScriptElement::setSrc
void setSrc(const DOMString &)
see src
Definition: html_head.cpp:387
DOM::HTMLLinkElement::disabled
bool disabled() const
Enables/disables the link.
Definition: html_head.cpp:112
DOM::HTMLTitleElement
The document title.
Definition: html_head.h:522
DOM::HTMLTitleElement::setText
void setText(const DOMString &)
see text
Definition: html_head.cpp:511
DOM::HTMLMetaElement::content
DOMString content() const
Associated information.
Definition: html_head.cpp:249
DOM::HTMLLinkElement::setHreflang
void setHreflang(const DOMString &)
see hreflang
Definition: html_head.cpp:153
DOM::HTMLScriptElement::setDefer
void setDefer(bool)
see defer
Definition: html_head.cpp:373
DOM::HTMLScriptElement::setHtmlFor
void setHtmlFor(const DOMString &)
see htmlFor
Definition: html_head.cpp:340
DOM::HTMLScriptElement::defer
bool defer() const
Indicates that the user agent can defer processing of the script.
Definition: html_head.cpp:367
DOM::HTMLScriptElement::setCharset
void setCharset(const DOMString &)
see charset
Definition: html_head.cpp:362
DOM::HTMLMetaElement::setName
void setName(const DOMString &)
see name
Definition: html_head.cpp:277
DOM::HTMLScriptElement::text
DOMString text() const
The script content of the element.
Definition: html_head.cpp:323
DOM::HTMLScriptElement::setType
void setType(const DOMString &)
see type
Definition: html_head.cpp:398
DOM::HTMLMetaElement::name
DOMString name() const
Meta information name.
Definition: html_head.cpp:271
DOM::HTMLLinkElement::charset
DOMString charset() const
The character encoding of the resource being linked to.
Definition: html_head.cpp:124
DOM::HTMLScriptElement::charset
DOMString charset() const
The character encoding of the linked resource.
Definition: html_head.cpp:356
DOM::HTMLMetaElement::httpEquiv
DOMString httpEquiv() const
HTTP response header name.
Definition: html_head.cpp:260
DOM::HTMLScriptElement::type
DOMString type() const
The content type of the script language.
Definition: html_head.cpp:392
DOM::HTMLScriptElement::setEvent
void setEvent(const DOMString &)
see event
Definition: html_head.cpp:351
DOM::HTMLLinkElement::hreflang
DOMString hreflang() const
Language code of the linked resource.
Definition: html_head.cpp:147
DOM::HTMLLinkElement::target
DOMString target() const
Frame to render the resource in.
Definition: html_head.cpp:191
DOM::HTMLStyleElement::setType
void setType(const DOMString &)
see type
Definition: html_head.cpp:463
DOM::HTMLStyleElement::disabled
bool disabled() const
Enables/disables the style sheet.
Definition: html_head.cpp:433
DOM::HTMLLinkElement::setHref
void setHref(const DOMString &)
see href
Definition: html_head.cpp:142
DOM::HTMLTitleElement::text
DOMString text() const
The specified title as a string.
Definition: html_head.cpp:505
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::HTMLStyleElement::sheet
StyleSheet sheet() const
Introduced in DOM Level 2 This method is from the LinkStyle interface.
Definition: html_head.cpp:468
DOM::HTMLStyleElement::media
DOMString media() const
Designed for use with one or more target media.
Definition: html_head.cpp:446
DOM::HTMLLinkElement::setMedia
void setMedia(const DOMString &)
see media
Definition: html_head.cpp:164
DOM::HTMLLinkElement::setRel
void setRel(const DOMString &)
see rel
Definition: html_head.cpp:175
DOM::HTMLStyleElement::type
DOMString type() const
The style sheet language (Internet media type).
Definition: html_head.cpp:457
DOM::HTMLMetaElement::setHttpEquiv
void setHttpEquiv(const DOMString &)
see httpEquiv
Definition: html_head.cpp:266
DOM::HTMLLinkElement::rel
DOMString rel() const
Forward link type.
Definition: html_head.cpp:169
DOM::HTMLBaseElement::target
DOMString target() const
The default target frame.
Definition: html_head.cpp:71
DOM::HTMLLinkElement::setDisabled
void setDisabled(bool)
see disabled
Definition: html_head.cpp:118
DOM::HTMLStyleElement
Style information.
Definition: html_head.h:449
DOM::HTMLLinkElement::setTarget
void setTarget(const DOMString &)
see target
Definition: html_head.cpp:197
DOM::HTMLLinkElement::sheet
StyleSheet sheet() const
Introduced in DOM Level 2 This method is from the LinkStyle interface.
Definition: html_head.cpp:213
DOM::HTMLStyleElement::setDisabled
void setDisabled(bool)
see disabled
Definition: html_head.cpp:439
DOM::StyleSheet
The StyleSheet interface is the abstract base interface for any type of style sheet.
Definition: css_stylesheet.h:58
DOM::HTMLScriptElement::event
DOMString event() const
Reserved for future use.
Definition: html_head.cpp:345
DOM::Element::getAttribute
DOMString getAttribute(const DOMString &name)
Retrieves an attribute value by name.
Definition: dom_element.cpp:147
DOM::HTMLScriptElement
Script statements.
Definition: html_head.h:335
DOM::HTMLMetaElement::setScheme
void setScheme(const DOMString &)
see scheme
Definition: html_head.cpp:288
DOM::HTMLLinkElement
The LINK element specifies a link to an external resource, and defines this document's relationship t...
Definition: html_head.h:101
DOM::HTMLMetaElement::setContent
void setContent(const DOMString &)
see content
Definition: html_head.cpp:255
DOM::HTMLScriptElement::src
DOMString src() const
URI designating an external script.
Definition: html_head.cpp:380
DOM::HTMLMetaElement
This contains generic meta-information about the document.
Definition: html_head.h:256
DOM::HTMLLinkElement::type
DOMString type() const
Advisory content type.
Definition: html_head.cpp:202
DOM::HTMLScriptElement::setText
void setText(const DOMString &)
see text
Definition: html_head.cpp:329
DOM::HTMLMetaElement::scheme
DOMString scheme() const
Select form of content.
Definition: html_head.cpp:282
DOM::HTMLLinkElement::rev
DOMString rev() const
Reverse link type.
Definition: html_head.cpp:180
DOM::HTMLLinkElement::setCharset
void setCharset(const DOMString &)
see charset
Definition: html_head.cpp:130
DOM::HTMLBaseElement
Document base URI.
Definition: html_head.h:46
DOM::HTMLLinkElement::href
DOMString href() const
The URI of the linked resource.
Definition: html_head.cpp:135
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:69
DOM::HTMLStyleElement::setMedia
void setMedia(const DOMString &)
see media
Definition: html_head.cpp:452
DOM::HTMLBaseElement::setHref
void setHref(const DOMString &)
see href
Definition: html_head.cpp:66
DOM::HTMLLinkElement::setRev
void setRev(const DOMString &)
see rev
Definition: html_head.cpp:186
DOM::HTMLBaseElement::href
DOMString href() const
The base URI See the href attribute definition in HTML 4.0.
Definition: html_head.cpp:59

KDE Home | KDE Accessibility Home | Description of Access Keys