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 22 matching lines...) Expand all Loading... |
33 class HTMLMenuElement; | 33 class HTMLMenuElement; |
34 class ExceptionState; | 34 class ExceptionState; |
35 | 35 |
36 enum TranslateAttributeMode { | 36 enum TranslateAttributeMode { |
37 TranslateAttributeYes, | 37 TranslateAttributeYes, |
38 TranslateAttributeNo, | 38 TranslateAttributeNo, |
39 TranslateAttributeInherit | 39 TranslateAttributeInherit |
40 }; | 40 }; |
41 | 41 |
42 class HTMLElement : public Element { | 42 class HTMLElement : public Element { |
| 43 DEFINE_WRAPPERTYPEINFO(); |
43 public: | 44 public: |
44 DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLElement); | 45 DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLElement); |
45 | 46 |
46 bool hasTagName(const HTMLQualifiedName& name) const { return hasLocalName(n
ame.localName()); } | 47 bool hasTagName(const HTMLQualifiedName& name) const { return hasLocalName(n
ame.localName()); } |
47 | 48 |
48 virtual String title() const OVERRIDE FINAL; | 49 virtual String title() const OVERRIDE FINAL; |
49 virtual short tabIndex() const OVERRIDE; | 50 virtual short tabIndex() const OVERRIDE; |
50 | 51 |
51 void setInnerText(const String&, ExceptionState&); | 52 void setInnerText(const String&, ExceptionState&); |
52 void setOuterText(const String&, ExceptionState&); | 53 void setOuterText(const String&, ExceptionState&); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 static const AtomicString& eventNameForAttributeName(const QualifiedName& at
trName); | 93 static const AtomicString& eventNameForAttributeName(const QualifiedName& at
trName); |
93 | 94 |
94 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; | 95 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; |
95 virtual bool matchesReadWritePseudoClass() const OVERRIDE; | 96 virtual bool matchesReadWritePseudoClass() const OVERRIDE; |
96 | 97 |
97 static const AtomicString& eventParameterName(); | 98 static const AtomicString& eventParameterName(); |
98 | 99 |
99 HTMLMenuElement* contextMenu() const; | 100 HTMLMenuElement* contextMenu() const; |
100 void setContextMenu(HTMLMenuElement*); | 101 void setContextMenu(HTMLMenuElement*); |
101 | 102 |
| 103 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext,
v8::Isolate*) OVERRIDE; |
| 104 |
102 protected: | 105 protected: |
103 HTMLElement(const QualifiedName& tagName, Document&, ConstructionType); | 106 HTMLElement(const QualifiedName& tagName, Document&, ConstructionType); |
104 | 107 |
105 void addHTMLLengthToStyle(MutableStylePropertySet*, CSSPropertyID, const Str
ing& value); | 108 void addHTMLLengthToStyle(MutableStylePropertySet*, CSSPropertyID, const Str
ing& value); |
106 void addHTMLColorToStyle(MutableStylePropertySet*, CSSPropertyID, const Stri
ng& color); | 109 void addHTMLColorToStyle(MutableStylePropertySet*, CSSPropertyID, const Stri
ng& color); |
107 | 110 |
108 void applyAlignmentAttributeToStyle(const AtomicString&, MutableStylePropert
ySet*); | 111 void applyAlignmentAttributeToStyle(const AtomicString&, MutableStylePropert
ySet*); |
109 void applyBorderAttributeToStyle(const AtomicString&, MutableStylePropertySe
t*); | 112 void applyBorderAttributeToStyle(const AtomicString&, MutableStylePropertySe
t*); |
110 | 113 |
111 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 114 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r
eturn is##thisType(node.get()); } \ | 177 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r
eturn is##thisType(node.get()); } \ |
175 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur
n is##thisType(node.get()); } \ | 178 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur
n is##thisType(node.get()); } \ |
176 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e
lement) { return is##thisType(element); } \ | 179 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e
lement) { return is##thisType(element); } \ |
177 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) | 180 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) |
178 | 181 |
179 } // namespace blink | 182 } // namespace blink |
180 | 183 |
181 #include "core/HTMLElementTypeHelpers.h" | 184 #include "core/HTMLElementTypeHelpers.h" |
182 | 185 |
183 #endif // HTMLElement_h | 186 #endif // HTMLElement_h |
OLD | NEW |