26 #include "dom/html_block.h"
27 #include "dom/html_misc.h"
28 #include "html/html_blockimpl.h"
29 #include "html/html_miscimpl.h"
33 #include "misc/htmlhashes.h"
35 HTMLBlockquoteElement::HTMLBlockquoteElement()
45 HTMLBlockquoteElement::HTMLBlockquoteElement(HTMLElementImpl *impl)
52 assignOther( other, ID_BLOCKQUOTE );
58 HTMLElement::operator = (other);
62 HTMLBlockquoteElement::~HTMLBlockquoteElement()
69 return ((ElementImpl *)impl)->getAttribute(ATTR_CITE);
74 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CITE, value);
79 HTMLDivElement::HTMLDivElement()
89 HTMLDivElement::HTMLDivElement(HTMLDivElementImpl *impl)
96 assignOther( other, ID_DIV );
102 HTMLElement::operator = (other);
106 HTMLDivElement::~HTMLDivElement()
113 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
118 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
123 HTMLHRElement::HTMLHRElement()
133 HTMLHRElement::HTMLHRElement(HTMLHRElementImpl *impl)
140 assignOther( other, ID_HR );
146 HTMLElement::operator = (other);
150 HTMLHRElement::~HTMLHRElement()
157 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
162 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
167 if(!impl)
return false;
168 return !((ElementImpl *)impl)->getAttribute(ATTR_NOSHADE).isNull();
178 ((ElementImpl *)impl)->setAttribute(ATTR_NOSHADE, str);
185 return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE);
190 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
196 return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
201 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
206 HTMLHeadingElement::HTMLHeadingElement()
216 HTMLHeadingElement::HTMLHeadingElement(HTMLElementImpl *impl)
223 if(other.elementId() != ID_H1 &&
224 other.elementId() != ID_H2 &&
225 other.elementId() != ID_H3 &&
226 other.elementId() != ID_H4 &&
227 other.elementId() != ID_H5 &&
228 other.elementId() != ID_H6 )
230 if ( impl ) impl->deref();
233 Node::operator = (other);
240 HTMLElement::operator = (other);
244 HTMLHeadingElement::~HTMLHeadingElement()
251 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
256 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
261 HTMLParagraphElement::HTMLParagraphElement() :
HTMLElement()
270 HTMLParagraphElement::HTMLParagraphElement(HTMLElementImpl *impl)
277 assignOther( other, ID_P );
283 HTMLElement::operator = (other);
287 HTMLParagraphElement::~HTMLParagraphElement()
294 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
299 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
313 HTMLPreElement::HTMLPreElement(HTMLPreElementImpl *impl)
320 assignOther( other, ID_PRE );
326 HTMLElement::operator = (other);
330 HTMLPreElement::~HTMLPreElement()
337 DOMString w = ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
346 aStr.sprintf(
"%ld", _width);
348 ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
353 HTMLLayerElement::HTMLLayerElement() :
HTMLElement()
362 HTMLLayerElement::HTMLLayerElement(HTMLLayerElementImpl *impl)
369 assignOther( other, ID_LAYER );
375 HTMLElement::operator = (other);
379 HTMLLayerElement::~HTMLLayerElement()
386 DOMString t = ((ElementImpl *)impl)->getAttribute(ATTR_TOP);
395 aStr.sprintf(
"%ld", _top);
397 ((ElementImpl *)impl)->setAttribute(ATTR_TOP, value);
403 DOMString l = ((ElementImpl *)impl)->getAttribute(ATTR_LEFT);
412 aStr.sprintf(
"%ld", _left);
414 ((ElementImpl *)impl)->setAttribute(ATTR_LEFT, value);
420 return ((ElementImpl *)impl)->getAttribute(ATTR_VISIBILITY);
425 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VISIBILITY, value);
431 return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
436 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);