25 #include "dom/dom_doc.h"
26 #include "dom/html_inline.h"
27 #include "html/html_inlineimpl.h"
28 #include "html/html_baseimpl.h"
29 #include "xml/dom_docimpl.h"
30 #include "misc/htmlhashes.h"
34 HTMLAnchorElement::HTMLAnchorElement() :
HTMLElement()
42 HTMLAnchorElement::HTMLAnchorElement(HTMLAnchorElementImpl *impl) :
HTMLElement(impl)
48 assignOther( other, ID_A );
54 HTMLElement::operator = (other);
58 HTMLAnchorElement::~HTMLAnchorElement()
65 return ((ElementImpl *)impl)->getAttribute(ATTR_ACCESSKEY);
70 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ACCESSKEY, value);
76 return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
81 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
87 return ((ElementImpl *)impl)->getAttribute(ATTR_COORDS);
92 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COORDS, value);
99 return !href.isNull() ? impl->getDocument()->completeURL(href.string()) : href;
104 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
110 return ((ElementImpl *)impl)->getAttribute(ATTR_HREFLANG);
115 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREFLANG, value);
121 return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
126 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
132 return ((ElementImpl *)impl)->getAttribute(ATTR_REL);
137 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REL, value);
143 return ((ElementImpl *)impl)->getAttribute(ATTR_REV);
148 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REV, value);
154 return ((ElementImpl *)impl)->getAttribute(ATTR_SHAPE);
159 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SHAPE, value);
165 return ((ElementImpl *)impl)->getAttribute(ATTR_TABINDEX).toInt();
171 DOMString value(TQString::number(_tabIndex));
172 ((ElementImpl *)impl)->setAttribute(ATTR_TABINDEX,value);
179 return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
184 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
190 return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
195 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
200 if(impl && impl->getDocument()->focusNode()==impl)
201 impl->getDocument()->setFocusNode(0);
207 impl->getDocument()->setFocusNode(static_cast<ElementImpl*>(impl));
226 HTMLBRElement::HTMLBRElement(HTMLBRElementImpl *impl) :
HTMLElement(impl)
232 assignOther( other, ID_BR );
238 HTMLElement::operator = (other);
242 HTMLBRElement::~HTMLBRElement()
249 return ((ElementImpl *)impl)->getAttribute(ATTR_CLEAR);
254 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CLEAR, value);
267 HTMLFontElement::HTMLFontElement(HTMLFontElementImpl *impl) :
HTMLElement(impl)
273 assignOther( other, ID_FONT );
279 HTMLElement::operator = (other);
283 HTMLFontElement::~HTMLFontElement()
290 return ((ElementImpl *)impl)->getAttribute(ATTR_COLOR);
295 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLOR, value);
301 return ((ElementImpl *)impl)->getAttribute(ATTR_FACE);
306 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FACE, value);
312 return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE);
317 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
331 HTMLModElement::HTMLModElement(HTMLElementImpl *_impl)
334 if (_impl && (_impl->id() == ID_INS || _impl->id() == ID_DEL))
338 if ( impl ) impl->ref();
343 if (other.handle() != handle()) {
344 if( other.elementId() != ID_INS &&
345 other.elementId() != ID_DEL )
347 if ( impl ) impl->deref();
350 Node::operator = (other);
358 HTMLElement::operator = (other);
362 HTMLModElement::~HTMLModElement()
369 return ((ElementImpl *)impl)->getAttribute(ATTR_CITE);
374 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CITE, value);
380 return ((ElementImpl *)impl)->getAttribute(ATTR_DATETIME);
385 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_DATETIME, value);
390 HTMLQuoteElement::HTMLQuoteElement() :
HTMLElement()
398 HTMLQuoteElement::HTMLQuoteElement(HTMLGenericElementImpl *_impl)
401 if (_impl && _impl->id() == ID_Q)
405 if ( impl ) impl->ref();
410 assignOther( other, ID_Q );
416 HTMLElement::operator = (other);
420 HTMLQuoteElement::~HTMLQuoteElement()
427 return ((ElementImpl *)impl)->getAttribute(ATTR_CITE);
432 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CITE, value);
Notice of modification to part of a document.
DOMString rel() const
Forward link type.
void setName(const DOMString &)
see name
The Node interface is the primary datatype for the entire Document Object Model.
DOMString dateTime() const
The date and time of the change.
void setRel(const DOMString &)
see rel
DOMString target() const
Frame to render the resource in.
void setRev(const DOMString &)
see rev
DOMString rev() const
Reverse link type.
DOMString name() const
Anchor name.
void setType(const DOMString &)
see type
DOMString href() const
The URI of the linked resource.
DOMString cite() const
A URI designating a document that designates a source document or message.
void setHref(const DOMString &)
see href
long tabIndex() const
Index that represents the element's position in the tabbing order.
void setShape(const DOMString &)
see shape
For the Q and BLOCKQUOTE elements.
DOMString hreflang() const
Language code of the linked resource.
DOMString face() const
Font face identifier.
DOMString clear() const
Control flow of text around floats.
void setTarget(const DOMString &)
see target
void blur()
Removes keyboard focus from this element.
DOMString cite() const
A URI designating a document that describes the reason for the change.
DOMString accessKey() const
A single character access key to give access to the form control.
void setCite(const DOMString &)
see cite
This class implements the basic string we use in the DOM.
void setColor(const DOMString &)
see color
void setCite(const DOMString &)
see cite
void setCoords(const DOMString &)
see coords
DOMString size() const
Font size.
void setHreflang(const DOMString &)
see hreflang
DOMString coords() const
Comma-separated list of lengths, defining an active region geometry.
void setSize(const DOMString &)
see size
void setClear(const DOMString &)
see clear
void setFace(const DOMString &)
see face
DOMString shape() const
The shape of the active area.
DOMString charset() const
The character encoding of the linked resource.
The Document Object Model (DOM) is divided into two parts, the COREDOM core DOM, specifying some core...
void setDateTime(const DOMString &)
see dateTime
DOMString type() const
Advisory content type.
DOMString getAttribute(const DOMString &name)
Retrieves an attribute value by name.
void setAccessKey(const DOMString &)
see accessKey
void focus()
Gives keyboard focus to this element.
void setTabIndex(long)
see tabIndex
void click()
Simulate a mouse-click.
DOMString color() const
Font color.
void setCharset(const DOMString &)
see charset
All HTML element interfaces derive from this class.