html_base.cpp
// --------------------------------------------------------------------------
#include "xml/dom_docimpl.h"
#include "dom/html_base.h"
#include "dom/dom_doc.h"
#include "html/html_baseimpl.h"
#include "misc/htmlhashes.h"
using namespace DOM;
HTMLBodyElement::HTMLBodyElement() : HTMLElement()
{
}
HTMLBodyElement::HTMLBodyElement(const HTMLBodyElement &other) : HTMLElement(other)
{
}
HTMLBodyElement::HTMLBodyElement(HTMLBodyElementImpl *impl) : HTMLElement(impl)
{
}
HTMLBodyElement &HTMLBodyElement::operator = (const Node &other)
{
assignOther( other, ID_BODY );
return *this;
}
HTMLBodyElement &HTMLBodyElement::operator = (const HTMLBodyElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLBodyElement::~HTMLBodyElement()
{
}
DOMString HTMLBodyElement::aLink() const
{
return impl ? ((ElementImpl *)impl)->getAttribute(ATTR_ALINK) : DOMString();
}
void HTMLBodyElement::setALink( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALINK, value);
}
DOMString HTMLBodyElement::background() const
{
return impl ? ((ElementImpl *)impl)->getAttribute(ATTR_BACKGROUND) : DOMString();
}
void HTMLBodyElement::setBackground( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BACKGROUND, value);
}
DOMString HTMLBodyElement::bgColor() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
}
void HTMLBodyElement::setBgColor( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
}
DOMString HTMLBodyElement::link() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_LINK);
}
void HTMLBodyElement::setLink( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LINK, value);
}
DOMString HTMLBodyElement::text() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_TEXT);
}
void HTMLBodyElement::setText( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TEXT, value);
}
DOMString HTMLBodyElement::vLink() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_VLINK);
}
void HTMLBodyElement::setVLink( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VLINK, value);
}
// --------------------------------------------------------------------------
HTMLFrameElement::HTMLFrameElement() : HTMLElement()
{
}
HTMLFrameElement::HTMLFrameElement(const HTMLFrameElement &other) : HTMLElement(other)
{
}
HTMLFrameElement::HTMLFrameElement(HTMLFrameElementImpl *impl) : HTMLElement(impl)
{
}
HTMLFrameElement &HTMLFrameElement::operator = (const Node &other)
{
assignOther( other, ID_FRAME );
return *this;
}
HTMLFrameElement &HTMLFrameElement::operator = (const HTMLFrameElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLFrameElement::~HTMLFrameElement()
{
}
DOMString HTMLFrameElement::frameBorder() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_FRAMEBORDER);
}
void HTMLFrameElement::setFrameBorder( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAMEBORDER, value);
}
DOMString HTMLFrameElement::longDesc() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_LONGDESC);
}
void HTMLFrameElement::setLongDesc( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LONGDESC, value);
}
DOMString HTMLFrameElement::marginHeight() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINHEIGHT);
}
void HTMLFrameElement::setMarginHeight( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINHEIGHT, value);
}
DOMString HTMLFrameElement::marginWidth() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINWIDTH);
}
void HTMLFrameElement::setMarginWidth( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINWIDTH, value);
}
DOMString HTMLFrameElement::name() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
}
void HTMLFrameElement::setName( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
}
bool HTMLFrameElement::noResize() const
{
if(!impl) return false;
return !((ElementImpl *)impl)->getAttribute(ATTR_NORESIZE).isNull();
}
void HTMLFrameElement::setNoResize( bool _noResize )
{
if(impl)
{
DOMString str;
if( _noResize )
str = "";
((ElementImpl *)impl)->setAttribute(ATTR_NORESIZE, str);
}
}
DOMString HTMLFrameElement::scrolling() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_SCROLLING);
}
void HTMLFrameElement::setScrolling( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCROLLING, value);
}
DOMString HTMLFrameElement::src() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
}
void HTMLFrameElement::setSrc( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
}
Document HTMLFrameElement::contentDocument() const
{
if (impl) return static_cast<HTMLFrameElementImpl*>(impl)->contentDocument();
return Document();
}
// --------------------------------------------------------------------------
HTMLIFrameElement::HTMLIFrameElement() : HTMLElement()
{
}
HTMLIFrameElement::HTMLIFrameElement(const HTMLIFrameElement &other) : HTMLElement(other)
{
}
HTMLIFrameElement::HTMLIFrameElement(HTMLIFrameElementImpl *impl) : HTMLElement(impl)
{
}
HTMLIFrameElement &HTMLIFrameElement::operator = (const Node &other)
{
assignOther( other, ID_IFRAME );
return *this;
}
HTMLIFrameElement &HTMLIFrameElement::operator = (const HTMLIFrameElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLIFrameElement::~HTMLIFrameElement()
{
}
DOMString HTMLIFrameElement::align() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
}
void HTMLIFrameElement::setAlign( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
}
DOMString HTMLIFrameElement::frameBorder() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_FRAMEBORDER);
}
void HTMLIFrameElement::setFrameBorder( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAMEBORDER, value);
}
DOMString HTMLIFrameElement::height() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_HEIGHT);
}
void HTMLIFrameElement::setHeight( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEIGHT, value);
}
DOMString HTMLIFrameElement::longDesc() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_LONGDESC);
}
void HTMLIFrameElement::setLongDesc( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LONGDESC, value);
}
DOMString HTMLIFrameElement::marginHeight() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINHEIGHT);
}
void HTMLIFrameElement::setMarginHeight( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINHEIGHT, value);
}
DOMString HTMLIFrameElement::marginWidth() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINWIDTH);
}
void HTMLIFrameElement::setMarginWidth( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINWIDTH, value);
}
DOMString HTMLIFrameElement::name() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
}
void HTMLIFrameElement::setName( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
}
DOMString HTMLIFrameElement::scrolling() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_SCROLLING);
}
void HTMLIFrameElement::setScrolling( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCROLLING, value);
}
DOMString HTMLIFrameElement::src() const
{
if(!impl) return DOMString();
DOMString s = ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
return !s.isNull() ? impl->getDocument()->completeURL( s.string() ) : s;
}
void HTMLIFrameElement::setSrc( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
}
DOMString HTMLIFrameElement::width() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
}
void HTMLIFrameElement::setWidth( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
}
Document HTMLIFrameElement::contentDocument() const
{
if (impl) return static_cast<HTMLIFrameElementImpl*>(impl)->contentDocument();
return Document();
}
// --------------------------------------------------------------------------
HTMLFrameSetElement::HTMLFrameSetElement() : HTMLElement()
{
}
HTMLFrameSetElement::HTMLFrameSetElement(const HTMLFrameSetElement &other) : HTMLElement(other)
{
}
HTMLFrameSetElement::HTMLFrameSetElement(HTMLFrameSetElementImpl *impl) : HTMLElement(impl)
{
}
HTMLFrameSetElement &HTMLFrameSetElement::operator = (const Node &other)
{
assignOther( other, ID_FRAMESET );
return *this;
}
HTMLFrameSetElement &HTMLFrameSetElement::operator = (const HTMLFrameSetElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLFrameSetElement::~HTMLFrameSetElement()
{
}
DOMString HTMLFrameSetElement::cols() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_COLS);
}
void HTMLFrameSetElement::setCols( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLS, value);
}
DOMString HTMLFrameSetElement::rows() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_ROWS);
}
void HTMLFrameSetElement::setRows( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ROWS, value);
}
// --------------------------------------------------------------------------
HTMLHeadElement::HTMLHeadElement() : HTMLElement()
{
}
HTMLHeadElement::HTMLHeadElement(const HTMLHeadElement &other) : HTMLElement(other)
{
}
HTMLHeadElement::HTMLHeadElement(HTMLHeadElementImpl *impl) : HTMLElement(impl)
{
}
HTMLHeadElement &HTMLHeadElement::operator = (const Node &other)
{
assignOther( other, ID_HEAD );
return *this;
}
HTMLHeadElement &HTMLHeadElement::operator = (const HTMLHeadElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLHeadElement::~HTMLHeadElement()
{
}
DOMString HTMLHeadElement::profile() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_PROFILE);
}
void HTMLHeadElement::setProfile( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_PROFILE, value);
}
// --------------------------------------------------------------------------
HTMLHtmlElement::HTMLHtmlElement() : HTMLElement()
{
}
HTMLHtmlElement::HTMLHtmlElement(const HTMLHtmlElement &other) : HTMLElement(other)
{
}
HTMLHtmlElement::HTMLHtmlElement(HTMLHtmlElementImpl *impl) : HTMLElement(impl)
{
}
HTMLHtmlElement &HTMLHtmlElement::operator = (const Node &other)
{
assignOther( other, ID_HTML );
return *this;
}
HTMLHtmlElement &HTMLHtmlElement::operator = (const HTMLHtmlElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLHtmlElement::~HTMLHtmlElement()
{
}
DOMString HTMLHtmlElement::version() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_VERSION);
}
void HTMLHtmlElement::setVersion( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VERSION, value);
}
DOM::HTMLIFrameElement::name
DOMString name() const
The frame name (object of the target attribute).
Definition: html_base.cpp:349
DOM::HTMLBodyElement
The HTML document body.
Definition: html_base.h:50
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:274
DOM::HTMLFrameSetElement::rows
DOMString rows() const
The number of rows of frames in the frameset.
Definition: html_base.cpp:441
DOM::HTMLFrameElement::contentDocument
Document contentDocument() const
Introduced in DOM Level 2.
Definition: html_base.cpp:247
DOM::HTMLIFrameElement::setName
void setName(const DOMString &)
see name
Definition: html_base.cpp:355
DOM::HTMLIFrameElement::align
DOMString align() const
Aligns this object (vertically or horizontally) with respect to its surrounding text.
Definition: html_base.cpp:283
DOM::HTMLIFrameElement::src
DOMString src() const
A URI designating the initial frame contents.
Definition: html_base.cpp:371
DOM::HTMLFrameElement::frameBorder
DOMString frameBorder() const
Request frame borders.
Definition: html_base.cpp:153
DOM::HTMLIFrameElement::height
DOMString height() const
Frame height.
Definition: html_base.cpp:305
DOM::HTMLBodyElement::setText
void setText(const DOMString &)
see text
Definition: html_base.cpp:107
DOM::HTMLFrameElement::src
DOMString src() const
A URI designating the initial frame contents.
Definition: html_base.cpp:236
DOM::HTMLFrameSetElement::cols
DOMString cols() const
The number of columns of frames in the frameset.
Definition: html_base.cpp:430
DOM::HTMLBodyElement::setALink
void setALink(const DOMString &)
see aLink
Definition: html_base.cpp:64
DOM::HTMLIFrameElement::setFrameBorder
void setFrameBorder(const DOMString &)
see frameBorder
Definition: html_base.cpp:300
DOM::HTMLBodyElement::setLink
void setLink(const DOMString &)
see link
Definition: html_base.cpp:96
DOM::HTMLHtmlElement::version
DOMString version() const
Version information about the document's DTD.
Definition: html_base.cpp:523
DOM::HTMLFrameElement
Create a frame.
Definition: html_base.h:163
DOM::HTMLIFrameElement::setLongDesc
void setLongDesc(const DOMString &)
see longDesc
Definition: html_base.cpp:322
DOM::HTMLIFrameElement::frameBorder
DOMString frameBorder() const
Request frame borders.
Definition: html_base.cpp:294
DOM::HTMLFrameElement::longDesc
DOMString longDesc() const
URI designating a long description of this image or frame.
Definition: html_base.cpp:164
DOM::HTMLIFrameElement::setHeight
void setHeight(const DOMString &)
see height
Definition: html_base.cpp:311
DOM::HTMLIFrameElement::marginHeight
DOMString marginHeight() const
Frame margin height, in pixels.
Definition: html_base.cpp:327
DOM::HTMLFrameElement::scrolling
DOMString scrolling() const
Specify whether or not the frame should have scrollbars.
Definition: html_base.cpp:225
DOM::HTMLFrameSetElement::setCols
void setCols(const DOMString &)
see cols
Definition: html_base.cpp:436
DOM::HTMLBodyElement::setVLink
void setVLink(const DOMString &)
see vLink
Definition: html_base.cpp:118
DOM::HTMLFrameElement::setSrc
void setSrc(const DOMString &)
see src
Definition: html_base.cpp:242
DOM::HTMLIFrameElement::setScrolling
void setScrolling(const DOMString &)
see scrolling
Definition: html_base.cpp:366
DOM::HTMLFrameElement::noResize
bool noResize() const
When true, forbid user from resizing frame.
Definition: html_base.cpp:208
DOM::HTMLIFrameElement::longDesc
DOMString longDesc() const
URI designating a long description of this image or frame.
Definition: html_base.cpp:316
DOM::HTMLBodyElement::bgColor
DOMString bgColor() const
Document background color.
Definition: html_base.cpp:79
DOM::HTMLIFrameElement::width
DOMString width() const
Frame width.
Definition: html_base.cpp:383
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::HTMLFrameSetElement::setRows
void setRows(const DOMString &)
see rows
Definition: html_base.cpp:447
DOM::Document
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:245
DOM::HTMLFrameElement::setName
void setName(const DOMString &)
see name
Definition: html_base.cpp:203
DOM::HTMLBodyElement::setBackground
void setBackground(const DOMString &)
see background
Definition: html_base.cpp:74
DOM::HTMLFrameElement::marginWidth
DOMString marginWidth() const
Frame margin width, in pixels.
Definition: html_base.cpp:186
DOM::HTMLIFrameElement::contentDocument
Document contentDocument() const
Introduced in DOM Level 2.
Definition: html_base.cpp:394
DOM::HTMLFrameElement::marginHeight
DOMString marginHeight() const
Frame margin height, in pixels.
Definition: html_base.cpp:175
DOM::HTMLFrameElement::setMarginWidth
void setMarginWidth(const DOMString &)
see marginWidth
Definition: html_base.cpp:192
DOM::HTMLIFrameElement::scrolling
DOMString scrolling() const
Specify whether or not the frame should have scrollbars.
Definition: html_base.cpp:360
DOM::HTMLIFrameElement::setWidth
void setWidth(const DOMString &)
see width
Definition: html_base.cpp:389
DOM::HTMLIFrameElement::setMarginHeight
void setMarginHeight(const DOMString &)
see marginHeight
Definition: html_base.cpp:333
DOM::HTMLIFrameElement::marginWidth
DOMString marginWidth() const
Frame margin width, in pixels.
Definition: html_base.cpp:338
DOM::HTMLFrameSetElement
Create a grid of frames.
Definition: html_base.h:309
DOM::HTMLBodyElement::aLink
DOMString aLink() const
Color of active links (after mouse-button down, but before mouse-button up).
Definition: html_base.cpp:59
DOM::HTMLIFrameElement
Inline subwindows.
Definition: html_base.h:362
DOM::HTMLBodyElement::setBgColor
void setBgColor(const DOMString &)
see bgColor
Definition: html_base.cpp:85
DOM::HTMLIFrameElement::setSrc
void setSrc(const DOMString &)
see src
Definition: html_base.cpp:378
DOM::HTMLIFrameElement::setMarginWidth
void setMarginWidth(const DOMString &)
see marginWidth
Definition: html_base.cpp:344
DOM::HTMLFrameElement::setScrolling
void setScrolling(const DOMString &)
see scrolling
Definition: html_base.cpp:231
DOM::HTMLHtmlElement
Root of an HTML document.
Definition: html_base.h:577
DOM::HTMLFrameElement::name
DOMString name() const
The frame name (object of the target attribute).
Definition: html_base.cpp:197
DOM::HTMLHeadElement::profile
DOMString profile() const
URI designating a metadata profile.
Definition: html_base.cpp:482
DOM::HTMLFrameElement::setNoResize
void setNoResize(bool)
see noResize
Definition: html_base.cpp:214
DOM::HTMLHeadElement
Document head information.
Definition: html_base.h:536
DOM::HTMLBodyElement::background
DOMString background() const
URI of the background texture tile image.
Definition: html_base.cpp:69
DOM::HTMLFrameElement::setMarginHeight
void setMarginHeight(const DOMString &)
see marginHeight
Definition: html_base.cpp:181
DOM::HTMLFrameElement::setFrameBorder
void setFrameBorder(const DOMString &)
see frameBorder
Definition: html_base.cpp:159
DOM::HTMLIFrameElement::setAlign
void setAlign(const DOMString &)
see align
Definition: html_base.cpp:289
DOM::HTMLBodyElement::text
DOMString text() const
Document text color.
Definition: html_base.cpp:101
DOM::HTMLBodyElement::vLink
DOMString vLink() const
Color of links that have been visited by the user.
Definition: html_base.cpp:112
DOM::HTMLBodyElement::link
DOMString link() const
Color of links that are not active and unvisited.
Definition: html_base.cpp:90
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:69
DOM::HTMLHeadElement::setProfile
void setProfile(const DOMString &)
see profile
Definition: html_base.cpp:488
DOM::HTMLFrameElement::setLongDesc
void setLongDesc(const DOMString &)
see longDesc
Definition: html_base.cpp:170
DOM::HTMLHtmlElement::setVersion
void setVersion(const DOMString &)
see version
Definition: html_base.cpp:529

KDE Home | KDE Accessibility Home | Description of Access Keys