OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Simon Hausmann (hausmann@kde.org) | 4 * (C) 2000 Simon Hausmann (hausmann@kde.org) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "core/events/ThreadLocalEventNames.h" | 34 #include "core/events/ThreadLocalEventNames.h" |
35 #include "core/html/HTMLFrameElementBase.h" | 35 #include "core/html/HTMLFrameElementBase.h" |
36 #include "core/html/parser/HTMLParserIdioms.h" | 36 #include "core/html/parser/HTMLParserIdioms.h" |
37 #include "core/frame/Frame.h" | 37 #include "core/frame/Frame.h" |
38 #include "core/frame/FrameView.h" | 38 #include "core/frame/FrameView.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 using namespace HTMLNames; | 42 using namespace HTMLNames; |
43 | 43 |
44 HTMLBodyElement::HTMLBodyElement(const QualifiedName& tagName, Document& documen
t) | 44 HTMLBodyElement::HTMLBodyElement(Document& document) |
45 : HTMLElement(tagName, document) | 45 : HTMLElement(bodyTag, document) |
46 { | 46 { |
47 ASSERT(hasTagName(bodyTag)); | |
48 ScriptWrappable::init(this); | 47 ScriptWrappable::init(this); |
49 } | 48 } |
50 | 49 |
51 PassRefPtr<HTMLBodyElement> HTMLBodyElement::create(Document& document) | 50 PassRefPtr<HTMLBodyElement> HTMLBodyElement::create(Document& document) |
52 { | 51 { |
53 return adoptRef(new HTMLBodyElement(bodyTag, document)); | 52 return adoptRef(new HTMLBodyElement(document)); |
54 } | |
55 | |
56 PassRefPtr<HTMLBodyElement> HTMLBodyElement::create(const QualifiedName& tagName
, Document& document) | |
57 { | |
58 return adoptRef(new HTMLBodyElement(tagName, document)); | |
59 } | 53 } |
60 | 54 |
61 HTMLBodyElement::~HTMLBodyElement() | 55 HTMLBodyElement::~HTMLBodyElement() |
62 { | 56 { |
63 } | 57 } |
64 | 58 |
65 bool HTMLBodyElement::isPresentationAttribute(const QualifiedName& name) const | 59 bool HTMLBodyElement::isPresentationAttribute(const QualifiedName& name) const |
66 { | 60 { |
67 if (name == backgroundAttr || name == marginwidthAttr || name == leftmarginA
ttr || name == marginheightAttr || name == topmarginAttr || name == bgcolorAttr
|| name == textAttr || name == bgpropertiesAttr) | 61 if (name == backgroundAttr || name == marginwidthAttr || name == leftmarginA
ttr || name == marginheightAttr || name == topmarginAttr || name == bgcolorAttr
|| name == textAttr || name == bgpropertiesAttr) |
68 return true; | 62 return true; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 } | 284 } |
291 | 285 |
292 void HTMLBodyElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const | 286 void HTMLBodyElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const |
293 { | 287 { |
294 HTMLElement::addSubresourceAttributeURLs(urls); | 288 HTMLElement::addSubresourceAttributeURLs(urls); |
295 | 289 |
296 addSubresourceURL(urls, document().completeURL(getAttribute(backgroundAttr))
); | 290 addSubresourceURL(urls, document().completeURL(getAttribute(backgroundAttr))
); |
297 } | 291 } |
298 | 292 |
299 } // namespace WebCore | 293 } // namespace WebCore |
OLD | NEW |