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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 inline bool HTMLDocument::hasNamedItem(const AtomicString& name) | 102 inline bool HTMLDocument::hasNamedItem(const AtomicString& name) |
103 { | 103 { |
104 return m_namedItemCounts.contains(name); | 104 return m_namedItemCounts.contains(name); |
105 } | 105 } |
106 | 106 |
107 inline bool HTMLDocument::hasExtraNamedItem(const AtomicString& name) | 107 inline bool HTMLDocument::hasExtraNamedItem(const AtomicString& name) |
108 { | 108 { |
109 return m_extraNamedItemCounts.contains(name); | 109 return m_extraNamedItemCounts.contains(name); |
110 } | 110 } |
111 | 111 |
112 inline HTMLDocument* toHTMLDocument(Document* document) | 112 DEFINE_DOCUMENT_TYPE_CASTS(HTMLDocument); |
113 { | |
114 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); | |
115 return static_cast<HTMLDocument*>(document); | |
116 } | |
117 | |
118 inline const HTMLDocument* toHTMLDocument(const Document* document) | |
119 { | |
120 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); | |
121 return static_cast<const HTMLDocument*>(document); | |
122 } | |
123 | |
124 inline HTMLDocument& toHTMLDocument(Document& document) | |
125 { | |
126 ASSERT_WITH_SECURITY_IMPLICATION(document.isHTMLDocument()); | |
127 return static_cast<HTMLDocument&>(document); | |
128 } | |
129 | |
130 inline const HTMLDocument& toHTMLDocument(const Document& document) | |
131 { | |
132 ASSERT_WITH_SECURITY_IMPLICATION(document.isHTMLDocument()); | |
133 return static_cast<const HTMLDocument&>(document); | |
134 } | |
135 | |
136 // This will catch anyone doing an unnecessary cast. | |
137 void toHTMLDocument(const HTMLDocument*); | |
138 | 113 |
139 } // namespace WebCore | 114 } // namespace WebCore |
140 | 115 |
141 #endif // HTMLDocument_h | 116 #endif // HTMLDocument_h |
OLD | NEW |