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 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 void setAlinkColor(const String&); | 58 void setAlinkColor(const String&); |
59 String linkColor(); | 59 String linkColor(); |
60 void setLinkColor(const String&); | 60 void setLinkColor(const String&); |
61 String vlinkColor(); | 61 String vlinkColor(); |
62 void setVlinkColor(const String&); | 62 void setVlinkColor(const String&); |
63 | 63 |
64 void clear(); | 64 void clear(); |
65 | 65 |
66 void addNamedItem(const AtomicString& name); | 66 void addNamedItem(const AtomicString& name); |
67 void removeNamedItem(const AtomicString& name); | 67 void removeNamedItem(const AtomicString& name); |
68 bool hasNamedItem(AtomicStringImpl* name); | 68 bool hasNamedItem(StringImpl* name); |
69 | 69 |
70 void addExtraNamedItem(const AtomicString& name); | 70 void addExtraNamedItem(const AtomicString& name); |
71 void removeExtraNamedItem(const AtomicString& name); | 71 void removeExtraNamedItem(const AtomicString& name); |
72 bool hasExtraNamedItem(AtomicStringImpl* name); | 72 bool hasExtraNamedItem(StringImpl* name); |
73 | 73 |
74 static bool isCaseSensitiveAttribute(const QualifiedName&); | 74 static bool isCaseSensitiveAttribute(const QualifiedName&); |
75 | 75 |
76 protected: | 76 protected: |
77 HTMLDocument(const DocumentInit&, DocumentClassFlags extendedDocumentClasses
= DefaultDocumentClass); | 77 HTMLDocument(const DocumentInit&, DocumentClassFlags extendedDocumentClasses
= DefaultDocumentClass); |
78 | 78 |
79 private: | 79 private: |
80 HTMLBodyElement* bodyAsHTMLBodyElement() const; | 80 HTMLBodyElement* bodyAsHTMLBodyElement() const; |
81 void addItemToMap(HashCountedSet<AtomicStringImpl*>&, const AtomicString&); | 81 void addItemToMap(HashCountedSet<StringImpl*>&, const AtomicString&); |
82 void removeItemFromMap(HashCountedSet<AtomicStringImpl*>&, const AtomicStrin
g&); | 82 void removeItemFromMap(HashCountedSet<StringImpl*>&, const AtomicString&); |
83 | 83 |
84 HashCountedSet<AtomicStringImpl*> m_namedItemCounts; | 84 HashCountedSet<StringImpl*> m_namedItemCounts; |
85 HashCountedSet<AtomicStringImpl*> m_extraNamedItemCounts; | 85 HashCountedSet<StringImpl*> m_extraNamedItemCounts; |
86 }; | 86 }; |
87 | 87 |
88 inline bool HTMLDocument::hasNamedItem(AtomicStringImpl* name) | 88 inline bool HTMLDocument::hasNamedItem(StringImpl* name) |
89 { | 89 { |
90 ASSERT(name); | 90 ASSERT(name); |
91 return m_namedItemCounts.contains(name); | 91 return m_namedItemCounts.contains(name); |
92 } | 92 } |
93 | 93 |
94 inline bool HTMLDocument::hasExtraNamedItem(AtomicStringImpl* name) | 94 inline bool HTMLDocument::hasExtraNamedItem(StringImpl* name) |
95 { | 95 { |
96 ASSERT(name); | 96 ASSERT(name); |
97 return m_extraNamedItemCounts.contains(name); | 97 return m_extraNamedItemCounts.contains(name); |
98 } | 98 } |
99 | 99 |
100 inline HTMLDocument* toHTMLDocument(Document* document) | 100 inline HTMLDocument* toHTMLDocument(Document* document) |
101 { | 101 { |
102 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); | 102 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); |
103 return static_cast<HTMLDocument*>(document); | 103 return static_cast<HTMLDocument*>(document); |
104 } | 104 } |
105 | 105 |
106 inline const HTMLDocument* toHTMLDocument(const Document* document) | 106 inline const HTMLDocument* toHTMLDocument(const Document* document) |
107 { | 107 { |
108 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); | 108 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); |
109 return static_cast<const HTMLDocument*>(document); | 109 return static_cast<const HTMLDocument*>(document); |
110 } | 110 } |
111 | 111 |
112 // This will catch anyone doing an unnecessary cast. | 112 // This will catch anyone doing an unnecessary cast. |
113 void toHTMLDocument(const HTMLDocument*); | 113 void toHTMLDocument(const HTMLDocument*); |
114 | 114 |
115 } // namespace WebCore | 115 } // namespace WebCore |
116 | 116 |
117 #endif // HTMLDocument_h | 117 #endif // HTMLDocument_h |
OLD | NEW |