• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • khtml
 

khtml

  • khtml
  • dom
html_base.cpp
1 
21 // --------------------------------------------------------------------------
22 
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"
28 
29 using namespace DOM;
30 
31 HTMLBodyElement::HTMLBodyElement() : HTMLElement()
32 {
33 }
34 
35 HTMLBodyElement::HTMLBodyElement(const HTMLBodyElement &other) : HTMLElement(other)
36 {
37 }
38 
39 HTMLBodyElement::HTMLBodyElement(HTMLBodyElementImpl *impl) : HTMLElement(impl)
40 {
41 }
42 
43 HTMLBodyElement &HTMLBodyElement::operator = (const Node &other)
44 {
45  assignOther( other, ID_BODY );
46  return *this;
47 }
48 
49 HTMLBodyElement &HTMLBodyElement::operator = (const HTMLBodyElement &other)
50 {
51  HTMLElement::operator = (other);
52  return *this;
53 }
54 
55 HTMLBodyElement::~HTMLBodyElement()
56 {
57 }
58 
59 DOMString HTMLBodyElement::aLink() const
60 {
61  return impl ? ((ElementImpl *)impl)->getAttribute(ATTR_ALINK) : DOMString();
62 }
63 
64 void HTMLBodyElement::setALink( const DOMString &value )
65 {
66  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALINK, value);
67 }
68 
69 DOMString HTMLBodyElement::background() const
70 {
71  return impl ? ((ElementImpl *)impl)->getAttribute(ATTR_BACKGROUND) : DOMString();
72 }
73 
74 void HTMLBodyElement::setBackground( const DOMString &value )
75 {
76  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BACKGROUND, value);
77 }
78 
79 DOMString HTMLBodyElement::bgColor() const
80 {
81  if(!impl) return DOMString();
82  return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
83 }
84 
85 void HTMLBodyElement::setBgColor( const DOMString &value )
86 {
87  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
88 }
89 
90 DOMString HTMLBodyElement::link() const
91 {
92  if(!impl) return DOMString();
93  return ((ElementImpl *)impl)->getAttribute(ATTR_LINK);
94 }
95 
96 void HTMLBodyElement::setLink( const DOMString &value )
97 {
98  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LINK, value);
99 }
100 
101 DOMString HTMLBodyElement::text() const
102 {
103  if(!impl) return DOMString();
104  return ((ElementImpl *)impl)->getAttribute(ATTR_TEXT);
105 }
106 
107 void HTMLBodyElement::setText( const DOMString &value )
108 {
109  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TEXT, value);
110 }
111 
112 DOMString HTMLBodyElement::vLink() const
113 {
114  if(!impl) return DOMString();
115  return ((ElementImpl *)impl)->getAttribute(ATTR_VLINK);
116 }
117 
118 void HTMLBodyElement::setVLink( const DOMString &value )
119 {
120  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VLINK, value);
121 }
122 
123 // --------------------------------------------------------------------------
124 
125 HTMLFrameElement::HTMLFrameElement() : HTMLElement()
126 {
127 }
128 
129 HTMLFrameElement::HTMLFrameElement(const HTMLFrameElement &other) : HTMLElement(other)
130 {
131 }
132 
133 HTMLFrameElement::HTMLFrameElement(HTMLFrameElementImpl *impl) : HTMLElement(impl)
134 {
135 }
136 
137 HTMLFrameElement &HTMLFrameElement::operator = (const Node &other)
138 {
139  assignOther( other, ID_FRAME );
140  return *this;
141 }
142 
143 HTMLFrameElement &HTMLFrameElement::operator = (const HTMLFrameElement &other)
144 {
145  HTMLElement::operator = (other);
146  return *this;
147 }
148 
149 HTMLFrameElement::~HTMLFrameElement()
150 {
151 }
152 
153 DOMString HTMLFrameElement::frameBorder() const
154 {
155  if(!impl) return DOMString();
156  return ((ElementImpl *)impl)->getAttribute(ATTR_FRAMEBORDER);
157 }
158 
159 void HTMLFrameElement::setFrameBorder( const DOMString &value )
160 {
161  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAMEBORDER, value);
162 }
163 
164 DOMString HTMLFrameElement::longDesc() const
165 {
166  if(!impl) return DOMString();
167  return ((ElementImpl *)impl)->getAttribute(ATTR_LONGDESC);
168 }
169 
170 void HTMLFrameElement::setLongDesc( const DOMString &value )
171 {
172  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LONGDESC, value);
173 }
174 
175 DOMString HTMLFrameElement::marginHeight() const
176 {
177  if(!impl) return DOMString();
178  return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINHEIGHT);
179 }
180 
181 void HTMLFrameElement::setMarginHeight( const DOMString &value )
182 {
183  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINHEIGHT, value);
184 }
185 
186 DOMString HTMLFrameElement::marginWidth() const
187 {
188  if(!impl) return DOMString();
189  return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINWIDTH);
190 }
191 
192 void HTMLFrameElement::setMarginWidth( const DOMString &value )
193 {
194  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINWIDTH, value);
195 }
196 
197 DOMString HTMLFrameElement::name() const
198 {
199  if(!impl) return DOMString();
200  return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
201 }
202 
203 void HTMLFrameElement::setName( const DOMString &value )
204 {
205  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
206 }
207 
208 bool HTMLFrameElement::noResize() const
209 {
210  if(!impl) return false;
211  return !((ElementImpl *)impl)->getAttribute(ATTR_NORESIZE).isNull();
212 }
213 
214 void HTMLFrameElement::setNoResize( bool _noResize )
215 {
216  if(impl)
217  {
218  DOMString str;
219  if( _noResize )
220  str = "";
221  ((ElementImpl *)impl)->setAttribute(ATTR_NORESIZE, str);
222  }
223 }
224 
225 DOMString HTMLFrameElement::scrolling() const
226 {
227  if(!impl) return DOMString();
228  return ((ElementImpl *)impl)->getAttribute(ATTR_SCROLLING);
229 }
230 
231 void HTMLFrameElement::setScrolling( const DOMString &value )
232 {
233  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCROLLING, value);
234 }
235 
236 DOMString HTMLFrameElement::src() const
237 {
238  if(!impl) return DOMString();
239  return ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
240 }
241 
242 void HTMLFrameElement::setSrc( const DOMString &value )
243 {
244  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
245 }
246 
247 Document HTMLFrameElement::contentDocument() const
248 {
249  if (impl) return static_cast<HTMLFrameElementImpl*>(impl)->contentDocument();
250  return Document();
251 }
252 
253 // --------------------------------------------------------------------------
254 
255 HTMLIFrameElement::HTMLIFrameElement() : HTMLElement()
256 {
257 }
258 
259 HTMLIFrameElement::HTMLIFrameElement(const HTMLIFrameElement &other) : HTMLElement(other)
260 {
261 }
262 
263 HTMLIFrameElement::HTMLIFrameElement(HTMLIFrameElementImpl *impl) : HTMLElement(impl)
264 {
265 }
266 
267 HTMLIFrameElement &HTMLIFrameElement::operator = (const Node &other)
268 {
269  assignOther( other, ID_IFRAME );
270  return *this;
271 }
272 
273 HTMLIFrameElement &HTMLIFrameElement::operator = (const HTMLIFrameElement &other)
274 {
275  HTMLElement::operator = (other);
276  return *this;
277 }
278 
279 HTMLIFrameElement::~HTMLIFrameElement()
280 {
281 }
282 
283 DOMString HTMLIFrameElement::align() const
284 {
285  if(!impl) return DOMString();
286  return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
287 }
288 
289 void HTMLIFrameElement::setAlign( const DOMString &value )
290 {
291  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
292 }
293 
294 DOMString HTMLIFrameElement::frameBorder() const
295 {
296  if(!impl) return DOMString();
297  return ((ElementImpl *)impl)->getAttribute(ATTR_FRAMEBORDER);
298 }
299 
300 void HTMLIFrameElement::setFrameBorder( const DOMString &value )
301 {
302  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAMEBORDER, value);
303 }
304 
305 DOMString HTMLIFrameElement::height() const
306 {
307  if(!impl) return DOMString();
308  return ((ElementImpl *)impl)->getAttribute(ATTR_HEIGHT);
309 }
310 
311 void HTMLIFrameElement::setHeight( const DOMString &value )
312 {
313  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEIGHT, value);
314 }
315 
316 DOMString HTMLIFrameElement::longDesc() const
317 {
318  if(!impl) return DOMString();
319  return ((ElementImpl *)impl)->getAttribute(ATTR_LONGDESC);
320 }
321 
322 void HTMLIFrameElement::setLongDesc( const DOMString &value )
323 {
324  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LONGDESC, value);
325 }
326 
327 DOMString HTMLIFrameElement::marginHeight() const
328 {
329  if(!impl) return DOMString();
330  return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINHEIGHT);
331 }
332 
333 void HTMLIFrameElement::setMarginHeight( const DOMString &value )
334 {
335  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINHEIGHT, value);
336 }
337 
338 DOMString HTMLIFrameElement::marginWidth() const
339 {
340  if(!impl) return DOMString();
341  return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINWIDTH);
342 }
343 
344 void HTMLIFrameElement::setMarginWidth( const DOMString &value )
345 {
346  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINWIDTH, value);
347 }
348 
349 DOMString HTMLIFrameElement::name() const
350 {
351  if(!impl) return DOMString();
352  return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
353 }
354 
355 void HTMLIFrameElement::setName( const DOMString &value )
356 {
357  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
358 }
359 
360 DOMString HTMLIFrameElement::scrolling() const
361 {
362  if(!impl) return DOMString();
363  return ((ElementImpl *)impl)->getAttribute(ATTR_SCROLLING);
364 }
365 
366 void HTMLIFrameElement::setScrolling( const DOMString &value )
367 {
368  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCROLLING, value);
369 }
370 
371 DOMString HTMLIFrameElement::src() const
372 {
373  if(!impl) return DOMString();
374  DOMString s = ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
375  return !s.isNull() ? impl->getDocument()->completeURL( s.string() ) : s;
376 }
377 
378 void HTMLIFrameElement::setSrc( const DOMString &value )
379 {
380  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
381 }
382 
383 DOMString HTMLIFrameElement::width() const
384 {
385  if(!impl) return DOMString();
386  return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
387 }
388 
389 void HTMLIFrameElement::setWidth( const DOMString &value )
390 {
391  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
392 }
393 
394 Document HTMLIFrameElement::contentDocument() const
395 {
396  if (impl) return static_cast<HTMLIFrameElementImpl*>(impl)->contentDocument();
397  return Document();
398 }
399 
400 // --------------------------------------------------------------------------
401 
402 HTMLFrameSetElement::HTMLFrameSetElement() : HTMLElement()
403 {
404 }
405 
406 HTMLFrameSetElement::HTMLFrameSetElement(const HTMLFrameSetElement &other) : HTMLElement(other)
407 {
408 }
409 
410 HTMLFrameSetElement::HTMLFrameSetElement(HTMLFrameSetElementImpl *impl) : HTMLElement(impl)
411 {
412 }
413 
414 HTMLFrameSetElement &HTMLFrameSetElement::operator = (const Node &other)
415 {
416  assignOther( other, ID_FRAMESET );
417  return *this;
418 }
419 
420 HTMLFrameSetElement &HTMLFrameSetElement::operator = (const HTMLFrameSetElement &other)
421 {
422  HTMLElement::operator = (other);
423  return *this;
424 }
425 
426 HTMLFrameSetElement::~HTMLFrameSetElement()
427 {
428 }
429 
430 DOMString HTMLFrameSetElement::cols() const
431 {
432  if(!impl) return DOMString();
433  return ((ElementImpl *)impl)->getAttribute(ATTR_COLS);
434 }
435 
436 void HTMLFrameSetElement::setCols( const DOMString &value )
437 {
438  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLS, value);
439 }
440 
441 DOMString HTMLFrameSetElement::rows() const
442 {
443  if(!impl) return DOMString();
444  return ((ElementImpl *)impl)->getAttribute(ATTR_ROWS);
445 }
446 
447 void HTMLFrameSetElement::setRows( const DOMString &value )
448 {
449  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ROWS, value);
450 }
451 
452 // --------------------------------------------------------------------------
453 
454 HTMLHeadElement::HTMLHeadElement() : HTMLElement()
455 {
456 }
457 
458 HTMLHeadElement::HTMLHeadElement(const HTMLHeadElement &other) : HTMLElement(other)
459 {
460 }
461 
462 HTMLHeadElement::HTMLHeadElement(HTMLHeadElementImpl *impl) : HTMLElement(impl)
463 {
464 }
465 
466 HTMLHeadElement &HTMLHeadElement::operator = (const Node &other)
467 {
468  assignOther( other, ID_HEAD );
469  return *this;
470 }
471 
472 HTMLHeadElement &HTMLHeadElement::operator = (const HTMLHeadElement &other)
473 {
474  HTMLElement::operator = (other);
475  return *this;
476 }
477 
478 HTMLHeadElement::~HTMLHeadElement()
479 {
480 }
481 
482 DOMString HTMLHeadElement::profile() const
483 {
484  if(!impl) return DOMString();
485  return ((ElementImpl *)impl)->getAttribute(ATTR_PROFILE);
486 }
487 
488 void HTMLHeadElement::setProfile( const DOMString &value )
489 {
490  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_PROFILE, value);
491 }
492 
493 // --------------------------------------------------------------------------
494 
495 HTMLHtmlElement::HTMLHtmlElement() : HTMLElement()
496 {
497 }
498 
499 HTMLHtmlElement::HTMLHtmlElement(const HTMLHtmlElement &other) : HTMLElement(other)
500 {
501 }
502 
503 HTMLHtmlElement::HTMLHtmlElement(HTMLHtmlElementImpl *impl) : HTMLElement(impl)
504 {
505 }
506 
507 HTMLHtmlElement &HTMLHtmlElement::operator = (const Node &other)
508 {
509  assignOther( other, ID_HTML );
510  return *this;
511 }
512 
513 HTMLHtmlElement &HTMLHtmlElement::operator = (const HTMLHtmlElement &other)
514 {
515  HTMLElement::operator = (other);
516  return *this;
517 }
518 
519 HTMLHtmlElement::~HTMLHtmlElement()
520 {
521 }
522 
523 DOMString HTMLHtmlElement::version() const
524 {
525  if(!impl) return DOMString();
526  return ((ElementImpl *)impl)->getAttribute(ATTR_VERSION);
527 }
528 
529 void HTMLHtmlElement::setVersion( const DOMString &value )
530 {
531  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VERSION, value);
532 }
533 

khtml

Skip menu "khtml"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

khtml

Skip menu "khtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for khtml by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |