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);