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);
DOMString marginWidth() const
Frame margin width, in pixels.
DOMString height() const
Frame height.
The Node interface is the primary datatype for the entire Document Object Model.
DOMString profile() const
URI designating a metadata profile.
DOMString marginWidth() const
Frame margin width, in pixels.
void setName(const DOMString &)
see name
void setText(const DOMString &)
see text
void setALink(const DOMString &)
see aLink
void setFrameBorder(const DOMString &)
see frameBorder
void setLink(const DOMString &)
see link
DOMString link() const
Color of links that are not active and unvisited.
DOMString width() const
Frame width.
DOMString name() const
The frame name (object of the target attribute).
void setLongDesc(const DOMString &)
see longDesc
DOMString aLink() const
Color of active links (after mouse-button down, but before mouse-button up).
DOMString cols() const
The number of columns of frames in the frameset.
void setHeight(const DOMString &)
see height
void setCols(const DOMString &)
see cols
void setVLink(const DOMString &)
see vLink
void setSrc(const DOMString &)
see src
void setScrolling(const DOMString &)
see scrolling
Document contentDocument() const
Introduced in DOM Level 2.
This class implements the basic string we use in the DOM.
void setRows(const DOMString &)
see rows
The Document interface represents the entire HTML or XML document.
void setName(const DOMString &)
see name
void setBackground(const DOMString &)
see background
DOMString background() const
URI of the background texture tile image.
DOMString marginHeight() const
Frame margin height, in pixels.
DOMString align() const
Aligns this object (vertically or horizontally) with respect to its surrounding text.
void setMarginWidth(const DOMString &)
see marginWidth
The Document Object Model (DOM) is divided into two parts, the COREDOM core DOM, specifying some core...
DOMString marginHeight() const
Frame margin height, in pixels.
void setWidth(const DOMString &)
see width
DOMString rows() const
The number of rows of frames in the frameset.
void setMarginHeight(const DOMString &)
see marginHeight
DOMString longDesc() const
URI designating a long description of this image or frame.
DOMString scrolling() const
Specify whether or not the frame should have scrollbars.
DOMString name() const
The frame name (object of the target attribute).
DOMString scrolling() const
Specify whether or not the frame should have scrollbars.
DOMString src() const
A URI designating the initial frame contents.
DOMString text() const
Document text color.
DOMString longDesc() const
URI designating a long description of this image or frame.
void setBgColor(const DOMString &)
see bgColor
void setSrc(const DOMString &)
see src
void setMarginWidth(const DOMString &)
see marginWidth
void setScrolling(const DOMString &)
see scrolling
Root of an HTML document.
void setNoResize(bool)
see noResize
DOMString frameBorder() const
Request frame borders.
Document head information.
void setMarginHeight(const DOMString &)
see marginHeight
void setFrameBorder(const DOMString &)
see frameBorder
void setAlign(const DOMString &)
see align
DOMString frameBorder() const
Request frame borders.
Document contentDocument() const
Introduced in DOM Level 2.
DOMString version() const
Version information about the document's DTD.
All HTML element interfaces derive from this class.
DOMString bgColor() const
Document background color.
bool noResize() const
When true, forbid user from resizing frame.
DOMString vLink() const
Color of links that have been visited by the user.
DOMString src() const
A URI designating the initial frame contents.
void setProfile(const DOMString &)
see profile
void setLongDesc(const DOMString &)
see longDesc
void setVersion(const DOMString &)
see version