| 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-2007, 2009, 2014 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004-2007, 2009, 2014 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 DEFINE_ELEMENT_TYPE_CASTS(HTMLElement, isHTMLElement()); | 157 DEFINE_ELEMENT_TYPE_CASTS(HTMLElement, isHTMLElement()); |
| 158 | 158 |
| 159 template <typename T> bool isElementOfType(const HTMLElement&); | 159 template <typename T> bool isElementOfType(const HTMLElement&); |
| 160 template <> inline bool isElementOfType<const HTMLElement>(const HTMLElement&) {
return true; } | 160 template <> inline bool isElementOfType<const HTMLElement>(const HTMLElement&) {
return true; } |
| 161 | 161 |
| 162 inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document& document
, ConstructionType type = CreateHTMLElement) | 162 inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document& document
, ConstructionType type = CreateHTMLElement) |
| 163 : Element(tagName, &document, type) | 163 : Element(tagName, &document, type) |
| 164 { | 164 { |
| 165 ASSERT(!tagName.localName().isNull()); | 165 DCHECK(!tagName.localName().isNull()); |
| 166 } | 166 } |
| 167 | 167 |
| 168 inline bool Node::hasTagName(const HTMLQualifiedName& name) const | 168 inline bool Node::hasTagName(const HTMLQualifiedName& name) const |
| 169 { | 169 { |
| 170 return isHTMLElement() && toHTMLElement(*this).hasTagName(name); | 170 return isHTMLElement() && toHTMLElement(*this).hasTagName(name); |
| 171 } | 171 } |
| 172 | 172 |
| 173 // Functor used to match HTMLElements with a specific HTML tag when using the El
ementTraversal API. | 173 // Functor used to match HTMLElements with a specific HTML tag when using the El
ementTraversal API. |
| 174 class HasHTMLTagName { | 174 class HasHTMLTagName { |
| 175 STACK_ALLOCATED(); | 175 STACK_ALLOCATED(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 190 inline bool is##thisType(const Node* node) { return node && is##thisType(*no
de); } \ | 190 inline bool is##thisType(const Node* node) { return node && is##thisType(*no
de); } \ |
| 191 inline bool is##thisType(const Element* element) { return element && is##thi
sType(*element); } \ | 191 inline bool is##thisType(const Element* element) { return element && is##thi
sType(*element); } \ |
| 192 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e
lement) { return is##thisType(element); } \ | 192 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e
lement) { return is##thisType(element); } \ |
| 193 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) | 193 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) |
| 194 | 194 |
| 195 } // namespace blink | 195 } // namespace blink |
| 196 | 196 |
| 197 #include "core/HTMLElementTypeHelpers.h" | 197 #include "core/HTMLElementTypeHelpers.h" |
| 198 | 198 |
| 199 #endif // HTMLElement_h | 199 #endif // HTMLElement_h |
| OLD | NEW |