23 #include "xml/dom_docimpl.h"
24 #include "dom/html_base.h"
25 #include "dom/dom_doc.h"
26 #include "html/html_baseimpl.h"
27 #include "misc/htmlhashes.h"
39 HTMLBodyElement::HTMLBodyElement(HTMLBodyElementImpl *impl) :
HTMLElement(impl)
45 assignOther( other, ID_BODY );
51 HTMLElement::operator = (other);
55 HTMLBodyElement::~HTMLBodyElement()
61 return impl ? ((ElementImpl *)impl)->getAttribute(ATTR_ALINK) :
DOMString();
66 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALINK, value);
71 return impl ? ((ElementImpl *)impl)->getAttribute(ATTR_BACKGROUND) :
DOMString();
76 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BACKGROUND, value);
82 return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
87 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
93 return ((ElementImpl *)impl)->getAttribute(ATTR_LINK);
98 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LINK, value);
104 return ((ElementImpl *)impl)->getAttribute(ATTR_TEXT);
109 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TEXT, value);
115 return ((ElementImpl *)impl)->getAttribute(ATTR_VLINK);
120 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VLINK, value);
125 HTMLFrameElement::HTMLFrameElement() :
HTMLElement()
133 HTMLFrameElement::HTMLFrameElement(HTMLFrameElementImpl *impl) :
HTMLElement(impl)
139 assignOther( other, ID_FRAME );
145 HTMLElement::operator = (other);
149 HTMLFrameElement::~HTMLFrameElement()
156 return ((ElementImpl *)impl)->getAttribute(ATTR_FRAMEBORDER);
161 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAMEBORDER, value);
167 return ((ElementImpl *)impl)->getAttribute(ATTR_LONGDESC);
172 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LONGDESC, value);
178 return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINHEIGHT);
183 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINHEIGHT, value);
189 return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINWIDTH);
194 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINWIDTH, value);
200 return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
205 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
210 if(!impl)
return false;
211 return !((ElementImpl *)impl)->getAttribute(ATTR_NORESIZE).isNull();
221 ((ElementImpl *)impl)->setAttribute(ATTR_NORESIZE, str);
228 return ((ElementImpl *)impl)->getAttribute(ATTR_SCROLLING);
233 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCROLLING, value);
239 return ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
244 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
249 if (impl)
return static_cast<HTMLFrameElementImpl*
>(impl)->
contentDocument();
255 HTMLIFrameElement::HTMLIFrameElement() :
HTMLElement()
263 HTMLIFrameElement::HTMLIFrameElement(HTMLIFrameElementImpl *impl) :
HTMLElement(impl)
269 assignOther( other, ID_IFRAME );
275 HTMLElement::operator = (other);
279 HTMLIFrameElement::~HTMLIFrameElement()
286 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
291 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
297 return ((ElementImpl *)impl)->getAttribute(ATTR_FRAMEBORDER);
302 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAMEBORDER, value);
308 return ((ElementImpl *)impl)->getAttribute(ATTR_HEIGHT);
313 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEIGHT, value);
319 return ((ElementImpl *)impl)->getAttribute(ATTR_LONGDESC);
324 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LONGDESC, value);
330 return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINHEIGHT);
335 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINHEIGHT, value);
341 return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINWIDTH);
346 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINWIDTH, value);
352 return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
357 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
363 return ((ElementImpl *)impl)->getAttribute(ATTR_SCROLLING);
368 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCROLLING, value);
374 DOMString s = ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
375 return !s.isNull() ? impl->getDocument()->completeURL( s.string() ) : s;
380 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
386 return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
391 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
396 if (impl)
return static_cast<HTMLIFrameElementImpl*
>(impl)->
contentDocument();
402 HTMLFrameSetElement::HTMLFrameSetElement() :
HTMLElement()
410 HTMLFrameSetElement::HTMLFrameSetElement(HTMLFrameSetElementImpl *impl) :
HTMLElement(impl)
416 assignOther( other, ID_FRAMESET );
422 HTMLElement::operator = (other);
426 HTMLFrameSetElement::~HTMLFrameSetElement()
433 return ((ElementImpl *)impl)->getAttribute(ATTR_COLS);
438 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLS, value);
444 return ((ElementImpl *)impl)->getAttribute(ATTR_ROWS);
449 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ROWS, value);
462 HTMLHeadElement::HTMLHeadElement(HTMLHeadElementImpl *impl) :
HTMLElement(impl)
468 assignOther( other, ID_HEAD );
474 HTMLElement::operator = (other);
478 HTMLHeadElement::~HTMLHeadElement()
485 return ((ElementImpl *)impl)->getAttribute(ATTR_PROFILE);
490 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_PROFILE, value);
503 HTMLHtmlElement::HTMLHtmlElement(HTMLHtmlElementImpl *impl) :
HTMLElement(impl)
509 assignOther( other, ID_HTML );
515 HTMLElement::operator = (other);
519 HTMLHtmlElement::~HTMLHtmlElement()
526 return ((ElementImpl *)impl)->getAttribute(ATTR_VERSION);
531 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VERSION, value);
This class implements the basic string we use in the DOM.
The Document interface represents the entire HTML or XML document.
DOMString text() const
Document text color.
void setVLink(const DOMString &)
see vLink
DOMString link() const
Color of links that are not active and unvisited.
void setBackground(const DOMString &)
see background
void setALink(const DOMString &)
see aLink
void setLink(const DOMString &)
see link
DOMString background() const
URI of the background texture tile image.
void setText(const DOMString &)
see text
DOMString bgColor() const
Document background color.
DOMString aLink() const
Color of active links (after mouse-button down, but before mouse-button up).
void setBgColor(const DOMString &)
see bgColor
DOMString vLink() const
Color of links that have been visited by the user.
All HTML element interfaces derive from this class.
DOMString src() const
A URI designating the initial frame contents.
bool noResize() const
When true, forbid user from resizing frame.
DOMString longDesc() const
URI designating a long description of this image or frame.
void setScrolling(const DOMString &)
see scrolling
void setNoResize(bool)
see noResize
void setSrc(const DOMString &)
see src
DOMString scrolling() const
Specify whether or not the frame should have scrollbars.
DOMString name() const
The frame name (object of the target attribute).
Document contentDocument() const
Introduced in DOM Level 2.
void setLongDesc(const DOMString &)
see longDesc
void setFrameBorder(const DOMString &)
see frameBorder
DOMString marginWidth() const
Frame margin width, in pixels.
void setName(const DOMString &)
see name
void setMarginWidth(const DOMString &)
see marginWidth
void setMarginHeight(const DOMString &)
see marginHeight
DOMString frameBorder() const
Request frame borders.
DOMString marginHeight() const
Frame margin height, in pixels.
void setRows(const DOMString &)
see rows
void setCols(const DOMString &)
see cols
DOMString cols() const
The number of columns of frames in the frameset.
DOMString rows() const
The number of rows of frames in the frameset.
Document head information.
DOMString profile() const
URI designating a metadata profile.
void setProfile(const DOMString &)
see profile
Root of an HTML document.
void setVersion(const DOMString &)
see version
DOMString version() const
Version information about the document's DTD.
void setWidth(const DOMString &)
see width
void setName(const DOMString &)
see name
DOMString align() const
Aligns this object (vertically or horizontally) with respect to its surrounding text.
void setLongDesc(const DOMString &)
see longDesc
DOMString src() const
A URI designating the initial frame contents.
void setAlign(const DOMString &)
see align
DOMString frameBorder() const
Request frame borders.
void setHeight(const DOMString &)
see height
DOMString height() const
Frame height.
DOMString longDesc() const
URI designating a long description of this image or frame.
void setFrameBorder(const DOMString &)
see frameBorder
DOMString scrolling() const
Specify whether or not the frame should have scrollbars.
Document contentDocument() const
Introduced in DOM Level 2.
DOMString marginWidth() const
Frame margin width, in pixels.
DOMString marginHeight() const
Frame margin height, in pixels.
void setMarginWidth(const DOMString &)
see marginWidth
DOMString name() const
The frame name (object of the target attribute).
void setSrc(const DOMString &)
see src
DOMString width() const
Frame width.
void setScrolling(const DOMString &)
see scrolling
void setMarginHeight(const DOMString &)
see marginHeight
The Node interface is the primary datatype for the entire Document Object Model.
The Document Object Model (DOM) is divided into two parts, the COREDOM core DOM, specifying some core...