00001
00022
00023
00024
#include "dom/html_head.h"
00025
#include "html/html_headimpl.h"
00026
#include "misc/htmlhashes.h"
00027
#include "xml/dom_docimpl.h"
00028
00029
using namespace DOM;
00030
00031 HTMLBaseElement::HTMLBaseElement() :
HTMLElement()
00032 {
00033 }
00034
00035 HTMLBaseElement::HTMLBaseElement(
const HTMLBaseElement &other) :
HTMLElement(other)
00036 {
00037 }
00038
00039 HTMLBaseElement::HTMLBaseElement(HTMLBaseElementImpl *impl) :
HTMLElement(impl)
00040 {
00041 }
00042
00043
HTMLBaseElement &HTMLBaseElement::operator = (
const Node &other)
00044 {
00045 assignOther( other, ID_BASE );
00046
return *
this;
00047 }
00048
00049
HTMLBaseElement &HTMLBaseElement::operator = (
const HTMLBaseElement &other)
00050 {
00051 HTMLElement::operator = (other);
00052
return *
this;
00053 }
00054
00055 HTMLBaseElement::~HTMLBaseElement()
00056 {
00057 }
00058
00059 DOMString HTMLBaseElement::href()
const
00060
{
00061
if(!impl)
return DOMString();
00062
DOMString href = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_HREF);
00063
return !href.
isNull() ? impl->getDocument()->completeURL(href.
string()) : href;
00064 }
00065
00066 void HTMLBaseElement::setHref(
const DOMString &value )
00067 {
00068
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
00069 }
00070
00071 DOMString HTMLBaseElement::target()
const
00072
{
00073
if(!impl)
return DOMString();
00074
return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
00075 }
00076
00077 void HTMLBaseElement::setTarget(
const DOMString &value )
00078 {
00079
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
00080 }
00081
00082
00083
00084 HTMLLinkElement::HTMLLinkElement() :
HTMLElement()
00085 {
00086 }
00087
00088 HTMLLinkElement::HTMLLinkElement(
const HTMLLinkElement &other) :
HTMLElement(other)
00089 {
00090 }
00091
00092 HTMLLinkElement::HTMLLinkElement(HTMLLinkElementImpl *impl) :
HTMLElement(impl)
00093 {
00094 }
00095
00096
HTMLLinkElement &HTMLLinkElement::operator = (
const Node &other)
00097 {
00098 assignOther( other, ID_LINK );
00099
return *
this;
00100 }
00101
00102
HTMLLinkElement &HTMLLinkElement::operator = (
const HTMLLinkElement &other)
00103 {
00104 HTMLElement::operator = (other);
00105
return *
this;
00106 }
00107
00108 HTMLLinkElement::~HTMLLinkElement()
00109 {
00110 }
00111
00112 bool HTMLLinkElement::disabled()
const
00113
{
00114
if(!impl)
return 0;
00115
return !((ElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
00116 }
00117
00118 void HTMLLinkElement::setDisabled(
bool _disabled )
00119 {
00120
if(impl)
00121 ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ?
"" : 0);
00122 }
00123
00124 DOMString HTMLLinkElement::charset()
const
00125
{
00126
if(!impl)
return DOMString();
00127
return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
00128 }
00129
00130 void HTMLLinkElement::setCharset(
const DOMString &value )
00131 {
00132
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
00133 }
00134
00135 DOMString HTMLLinkElement::href()
const
00136
{
00137
if(!impl)
return DOMString();
00138
DOMString href = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_HREF);
00139
return !href.
isNull() ? impl->getDocument()->completeURL(href.
string()) : href;
00140 }
00141
00142 void HTMLLinkElement::setHref(
const DOMString &value )
00143 {
00144
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
00145 }
00146
00147 DOMString HTMLLinkElement::hreflang()
const
00148
{
00149
if(!impl)
return DOMString();
00150
return ((ElementImpl *)impl)->getAttribute(ATTR_HREFLANG);
00151 }
00152
00153 void HTMLLinkElement::setHreflang(
const DOMString &value )
00154 {
00155
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREFLANG, value);
00156 }
00157
00158 DOMString HTMLLinkElement::media()
const
00159
{
00160
if(!impl)
return DOMString();
00161
return ((ElementImpl *)impl)->getAttribute(ATTR_MEDIA);
00162 }
00163
00164 void HTMLLinkElement::setMedia(
const DOMString &value )
00165 {
00166
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MEDIA, value);
00167 }
00168
00169 DOMString HTMLLinkElement::rel()
const
00170
{
00171
if(!impl)
return DOMString();
00172
return ((ElementImpl *)impl)->getAttribute(ATTR_REL);
00173 }
00174
00175 void HTMLLinkElement::setRel(
const DOMString &value )
00176 {
00177
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REL, value);
00178 }
00179
00180 DOMString HTMLLinkElement::rev()
const
00181
{
00182
if(!impl)
return DOMString();
00183
return ((ElementImpl *)impl)->getAttribute(ATTR_REV);
00184 }
00185
00186 void HTMLLinkElement::setRev(
const DOMString &value )
00187 {
00188
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REV, value);
00189 }
00190
00191 DOMString HTMLLinkElement::target()
const
00192
{
00193
if(!impl)
return DOMString();
00194
return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
00195 }
00196
00197 void HTMLLinkElement::setTarget(
const DOMString &value )
00198 {
00199
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
00200 }
00201
00202 DOMString HTMLLinkElement::type()
const
00203
{
00204
if(!impl)
return DOMString();
00205
return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
00206 }
00207
00208 void HTMLLinkElement::setType(
const DOMString &value )
00209 {
00210
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
00211 }
00212
00213 StyleSheet HTMLLinkElement::sheet()
const
00214
{
00215
if(!impl)
return 0;
00216
return ((HTMLLinkElementImpl *)impl)->sheet();
00217 }
00218
00219
00220
00221 HTMLMetaElement::HTMLMetaElement() :
HTMLElement()
00222 {
00223 }
00224
00225 HTMLMetaElement::HTMLMetaElement(
const HTMLMetaElement &other) :
HTMLElement(other)
00226 {
00227 }
00228
00229 HTMLMetaElement::HTMLMetaElement(HTMLMetaElementImpl *impl) :
HTMLElement(impl)
00230 {
00231 }
00232
00233
HTMLMetaElement &HTMLMetaElement::operator = (
const Node &other)
00234 {
00235 assignOther( other, ID_META );
00236
return *
this;
00237 }
00238
00239
HTMLMetaElement &HTMLMetaElement::operator = (
const HTMLMetaElement &other)
00240 {
00241 HTMLElement::operator = (other);
00242
return *
this;
00243 }
00244
00245 HTMLMetaElement::~HTMLMetaElement()
00246 {
00247 }
00248
00249 DOMString HTMLMetaElement::content()
const
00250
{
00251
if(!impl)
return DOMString();
00252
return ((ElementImpl *)impl)->getAttribute(ATTR_CONTENT);
00253 }
00254
00255 void HTMLMetaElement::setContent(
const DOMString &value )
00256 {
00257
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CONTENT, value);
00258 }
00259
00260 DOMString HTMLMetaElement::httpEquiv()
const
00261
{
00262
if(!impl)
return DOMString();
00263
return ((ElementImpl *)impl)->getAttribute(ATTR_HTTP_EQUIV);
00264 }
00265
00266 void HTMLMetaElement::setHttpEquiv(
const DOMString &value )
00267 {
00268
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HTTP_EQUIV, value);
00269 }
00270
00271 DOMString HTMLMetaElement::name()
const
00272
{
00273
if(!impl)
return DOMString();
00274
return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
00275 }
00276
00277 void HTMLMetaElement::setName(
const DOMString &value )
00278 {
00279
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
00280 }
00281
00282 DOMString HTMLMetaElement::scheme()
const
00283
{
00284
if(!impl)
return DOMString();
00285
return ((ElementImpl *)impl)->getAttribute(ATTR_SCHEME);
00286 }
00287
00288 void HTMLMetaElement::setScheme(
const DOMString &value )
00289 {
00290
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCHEME, value);
00291 }
00292
00293
00294
00295 HTMLScriptElement::HTMLScriptElement() :
HTMLElement()
00296 {
00297 }
00298
00299 HTMLScriptElement::HTMLScriptElement(
const HTMLScriptElement &other) :
HTMLElement(other)
00300 {
00301 }
00302
00303 HTMLScriptElement::HTMLScriptElement(HTMLScriptElementImpl *impl) :
HTMLElement(impl)
00304 {
00305 }
00306
00307
HTMLScriptElement &HTMLScriptElement::operator = (
const Node &other)
00308 {
00309 assignOther( other, ID_SCRIPT );
00310
return *
this;
00311 }
00312
00313
HTMLScriptElement &HTMLScriptElement::operator = (
const HTMLScriptElement &other)
00314 {
00315 HTMLElement::operator = (other);
00316
return *
this;
00317 }
00318
00319 HTMLScriptElement::~HTMLScriptElement()
00320 {
00321 }
00322
00323 DOMString HTMLScriptElement::text()
const
00324
{
00325
if(!impl)
return DOMString();
00326
return ((HTMLScriptElementImpl *)impl)->text();
00327 }
00328
00329 void HTMLScriptElement::setText(
const DOMString &value )
00330 {
00331
if(impl) ((HTMLScriptElementImpl *)impl)->setText(value);
00332 }
00333
00334 DOMString HTMLScriptElement::htmlFor()
const
00335
{
00336
00337
return DOMString();
00338 }
00339
00340 void HTMLScriptElement::setHtmlFor(
const DOMString & )
00341 {
00342
00343 }
00344
00345 DOMString HTMLScriptElement::event()
const
00346
{
00347
00348
return DOMString();
00349 }
00350
00351 void HTMLScriptElement::setEvent(
const DOMString & )
00352 {
00353
00354 }
00355
00356 DOMString HTMLScriptElement::charset()
const
00357
{
00358
if(!impl)
return DOMString();
00359
return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
00360 }
00361
00362 void HTMLScriptElement::setCharset(
const DOMString &value )
00363 {
00364
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
00365 }
00366
00367 bool HTMLScriptElement::defer()
const
00368
{
00369
if(!impl)
return 0;
00370
return !((ElementImpl *)impl)->getAttribute(ATTR_DEFER).isNull();
00371 }
00372
00373 void HTMLScriptElement::setDefer(
bool _defer )
00374 {
00375
00376
if(impl)
00377 ((ElementImpl *)impl)->setAttribute(ATTR_DEFER,_defer ?
"" : 0);
00378 }
00379
00380 DOMString HTMLScriptElement::src()
const
00381
{
00382
if(!impl)
return DOMString();
00383
DOMString s = ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
00384
return !s.
isNull() ? impl->getDocument()->completeURL(s.
string()) : s;
00385 }
00386
00387 void HTMLScriptElement::setSrc(
const DOMString &value )
00388 {
00389
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
00390 }
00391
00392 DOMString HTMLScriptElement::type()
const
00393
{
00394
if(!impl)
return DOMString();
00395
return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
00396 }
00397
00398 void HTMLScriptElement::setType(
const DOMString &value )
00399 {
00400
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
00401 }
00402
00403
00404
00405 HTMLStyleElement::HTMLStyleElement() :
HTMLElement()
00406 {
00407 }
00408
00409 HTMLStyleElement::HTMLStyleElement(
const HTMLStyleElement &other) :
HTMLElement(other)
00410 {
00411 }
00412
00413 HTMLStyleElement::HTMLStyleElement(HTMLStyleElementImpl *impl) :
HTMLElement(impl)
00414 {
00415 }
00416
00417
HTMLStyleElement &HTMLStyleElement::operator = (
const Node &other)
00418 {
00419 assignOther( other, ID_STYLE );
00420
return *
this;
00421 }
00422
00423
HTMLStyleElement &HTMLStyleElement::operator = (
const HTMLStyleElement &other)
00424 {
00425 HTMLElement::operator = (other);
00426
return *
this;
00427 }
00428
00429 HTMLStyleElement::~HTMLStyleElement()
00430 {
00431 }
00432
00433 bool HTMLStyleElement::disabled()
const
00434
{
00435
if(!impl)
return 0;
00436
return !((HTMLStyleElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
00437 }
00438
00439 void HTMLStyleElement::setDisabled(
bool _disabled )
00440 {
00441
00442
if(impl)
00443 ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED,_disabled ?
"" : 0);
00444 }
00445
00446 DOMString HTMLStyleElement::media()
const
00447
{
00448
if(!impl)
return DOMString();
00449
return ((ElementImpl *)impl)->getAttribute(ATTR_MEDIA);
00450 }
00451
00452 void HTMLStyleElement::setMedia(
const DOMString &value )
00453 {
00454
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MEDIA, value);
00455 }
00456
00457 DOMString HTMLStyleElement::type()
const
00458
{
00459
if(!impl)
return DOMString();
00460
return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
00461 }
00462
00463 void HTMLStyleElement::setType(
const DOMString &value )
00464 {
00465
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
00466 }
00467
00468 StyleSheet HTMLStyleElement::sheet()
const
00469
{
00470
if(!impl)
return 0;
00471
return ((HTMLStyleElementImpl *)impl)->sheet();
00472 }
00473
00474
00475
00476
00477 HTMLTitleElement::HTMLTitleElement() :
HTMLElement()
00478 {
00479 }
00480
00481 HTMLTitleElement::HTMLTitleElement(
const HTMLTitleElement &other) :
HTMLElement(other)
00482 {
00483 }
00484
00485 HTMLTitleElement::HTMLTitleElement(HTMLTitleElementImpl *impl) :
HTMLElement(impl)
00486 {
00487 }
00488
00489
HTMLTitleElement &HTMLTitleElement::operator = (
const Node &other)
00490 {
00491 assignOther( other, ID_TITLE );
00492
return *
this;
00493 }
00494
00495
HTMLTitleElement &HTMLTitleElement::operator = (
const HTMLTitleElement &other)
00496 {
00497 HTMLElement::operator = (other);
00498
return *
this;
00499 }
00500
00501 HTMLTitleElement::~HTMLTitleElement()
00502 {
00503 }
00504
00505 DOMString HTMLTitleElement::text()
const
00506
{
00507
if(!impl)
return DOMString();
00508
return ((HTMLTitleElementImpl *)impl)->text();
00509 }
00510
00511 void HTMLTitleElement::setText(
const DOMString &value )
00512 {
00513
if(impl) ((HTMLTitleElementImpl *)impl)->setText(value);
00514 }
00515