Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: Source/core/html/HTMLElement.h

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLDocument.cpp ('k') | Source/core/html/HTMLEmbedElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 DEFINE_ELEMENT_TYPE_CASTS(HTMLElement, isHTMLElement()); 140 DEFINE_ELEMENT_TYPE_CASTS(HTMLElement, isHTMLElement());
141 141
142 template <typename T> bool isElementOfType(const HTMLElement&); 142 template <typename T> bool isElementOfType(const HTMLElement&);
143 template <> inline bool isElementOfType<const HTMLElement>(const HTMLElement&) { return true; } 143 template <> inline bool isElementOfType<const HTMLElement>(const HTMLElement&) { return true; }
144 144
145 inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document& document , ConstructionType type = CreateHTMLElement) 145 inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document& document , ConstructionType type = CreateHTMLElement)
146 : Element(tagName, &document, type) 146 : Element(tagName, &document, type)
147 { 147 {
148 ASSERT(!tagName.localName().isNull()); 148 ASSERT(!tagName.localName().isNull());
149 ScriptWrappable::init(this);
150 } 149 }
151 150
152 inline bool Node::hasTagName(const HTMLQualifiedName& name) const 151 inline bool Node::hasTagName(const HTMLQualifiedName& name) const
153 { 152 {
154 return isHTMLElement() && toHTMLElement(*this).hasTagName(name); 153 return isHTMLElement() && toHTMLElement(*this).hasTagName(name);
155 } 154 }
156 155
157 // Functor used to match HTMLElements with a specific HTML tag when using the El ementTraversal API. 156 // Functor used to match HTMLElements with a specific HTML tag when using the El ementTraversal API.
158 class HasHTMLTagName { 157 class HasHTMLTagName {
159 public: 158 public:
(...skipping 15 matching lines...) Expand all
175 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r eturn is##thisType(node.get()); } \ 174 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r eturn is##thisType(node.get()); } \
176 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur n is##thisType(node.get()); } \ 175 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur n is##thisType(node.get()); } \
177 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e lement) { return is##thisType(element); } \ 176 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e lement) { return is##thisType(element); } \
178 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) 177 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType)
179 178
180 } // namespace blink 179 } // namespace blink
181 180
182 #include "core/HTMLElementTypeHelpers.h" 181 #include "core/HTMLElementTypeHelpers.h"
183 182
184 #endif // HTMLElement_h 183 #endif // HTMLElement_h
OLDNEW
« no previous file with comments | « Source/core/html/HTMLDocument.cpp ('k') | Source/core/html/HTMLEmbedElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698