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) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "core/dom/Document.h" | 28 #include "core/dom/Document.h" |
29 #include "core/dom/Text.h" | 29 #include "core/dom/Text.h" |
30 #include "core/rendering/style/RenderStyle.h" | 30 #include "core/rendering/style/RenderStyle.h" |
31 #include "core/rendering/style/StyleInheritedData.h" | 31 #include "core/rendering/style/StyleInheritedData.h" |
32 #include "wtf/text/StringBuilder.h" | 32 #include "wtf/text/StringBuilder.h" |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 using namespace HTMLNames; | 36 using namespace HTMLNames; |
37 | 37 |
38 inline HTMLTitleElement::HTMLTitleElement(const QualifiedName& tagName, Document
* document) | 38 inline HTMLTitleElement::HTMLTitleElement(const QualifiedName& tagName, Document
& document) |
39 : HTMLElement(tagName, document) | 39 : HTMLElement(tagName, document) |
40 { | 40 { |
41 ASSERT(hasTagName(titleTag)); | 41 ASSERT(hasTagName(titleTag)); |
42 setHasCustomStyleCallbacks(); | 42 setHasCustomStyleCallbacks(); |
43 ScriptWrappable::init(this); | 43 ScriptWrappable::init(this); |
44 } | 44 } |
45 | 45 |
46 PassRefPtr<HTMLTitleElement> HTMLTitleElement::create(const QualifiedName& tagNa
me, Document* document) | 46 PassRefPtr<HTMLTitleElement> HTMLTitleElement::create(const QualifiedName& tagNa
me, Document& document) |
47 { | 47 { |
48 return adoptRef(new HTMLTitleElement(tagName, document)); | 48 return adoptRef(new HTMLTitleElement(tagName, document)); |
49 } | 49 } |
50 | 50 |
51 Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode*
insertionPoint) | 51 Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode*
insertionPoint) |
52 { | 52 { |
53 HTMLElement::insertedInto(insertionPoint); | 53 HTMLElement::insertedInto(insertionPoint); |
54 if (inDocument() && !isInShadowTree()) | 54 if (inDocument() && !isInShadowTree()) |
55 document().setTitleElement(text(), this); | 55 document().setTitleElement(text(), this); |
56 return InsertionDone; | 56 return InsertionDone; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 String valueCopy(value); | 97 String valueCopy(value); |
98 | 98 |
99 if (numChildren > 0) | 99 if (numChildren > 0) |
100 removeChildren(); | 100 removeChildren(); |
101 | 101 |
102 appendChild(document().createTextNode(valueCopy.impl()), IGNORE_EXCEPTIO
N); | 102 appendChild(document().createTextNode(valueCopy.impl()), IGNORE_EXCEPTIO
N); |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 } | 106 } |
OLD | NEW |