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 27 matching lines...) Expand all Loading... |
38 TranslateAttributeInherit | 38 TranslateAttributeInherit |
39 }; | 39 }; |
40 | 40 |
41 class HTMLElement : public Element { | 41 class HTMLElement : public Element { |
42 DEFINE_WRAPPERTYPEINFO(); | 42 DEFINE_WRAPPERTYPEINFO(); |
43 public: | 43 public: |
44 DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLElement); | 44 DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLElement); |
45 | 45 |
46 bool hasTagName(const HTMLQualifiedName& name) const { return hasLocalName(n
ame.localName()); } | 46 bool hasTagName(const HTMLQualifiedName& name) const { return hasLocalName(n
ame.localName()); } |
47 | 47 |
48 virtual String title() const OVERRIDE FINAL; | 48 virtual String title() const override final; |
49 virtual short tabIndex() const OVERRIDE; | 49 virtual short tabIndex() const override; |
50 | 50 |
51 void setInnerText(const String&, ExceptionState&); | 51 void setInnerText(const String&, ExceptionState&); |
52 void setOuterText(const String&, ExceptionState&); | 52 void setOuterText(const String&, ExceptionState&); |
53 | 53 |
54 virtual bool hasCustomFocusLogic() const; | 54 virtual bool hasCustomFocusLogic() const; |
55 | 55 |
56 String contentEditable() const; | 56 String contentEditable() const; |
57 void setContentEditable(const String&, ExceptionState&); | 57 void setContentEditable(const String&, ExceptionState&); |
58 | 58 |
59 virtual bool draggable() const; | 59 virtual bool draggable() const; |
60 void setDraggable(bool); | 60 void setDraggable(bool); |
61 | 61 |
62 bool spellcheck() const; | 62 bool spellcheck() const; |
63 void setSpellcheck(bool); | 63 void setSpellcheck(bool); |
64 | 64 |
65 bool translate() const; | 65 bool translate() const; |
66 void setTranslate(bool); | 66 void setTranslate(bool); |
67 | 67 |
68 const AtomicString& dir(); | 68 const AtomicString& dir(); |
69 void setDir(const AtomicString&); | 69 void setDir(const AtomicString&); |
70 | 70 |
71 void click(); | 71 void click(); |
72 | 72 |
73 virtual void accessKeyAction(bool sendMouseEvents) OVERRIDE; | 73 virtual void accessKeyAction(bool sendMouseEvents) override; |
74 | 74 |
75 bool ieForbidsInsertHTML() const; | 75 bool ieForbidsInsertHTML() const; |
76 | 76 |
77 virtual HTMLFormElement* formOwner() const { return 0; } | 77 virtual HTMLFormElement* formOwner() const { return 0; } |
78 | 78 |
79 HTMLFormElement* findFormAncestor() const; | 79 HTMLFormElement* findFormAncestor() const; |
80 | 80 |
81 bool hasDirectionAuto() const; | 81 bool hasDirectionAuto() const; |
82 TextDirection directionalityIfhasDirAutoAttribute(bool& isAuto) const; | 82 TextDirection directionalityIfhasDirAutoAttribute(bool& isAuto) const; |
83 | 83 |
84 virtual bool isHTMLUnknownElement() const { return false; } | 84 virtual bool isHTMLUnknownElement() const { return false; } |
85 virtual bool isPluginElement() const { return false; } | 85 virtual bool isPluginElement() const { return false; } |
86 | 86 |
87 virtual bool isLabelable() const { return false; } | 87 virtual bool isLabelable() const { return false; } |
88 // http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html
#interactive-content | 88 // http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html
#interactive-content |
89 virtual bool isInteractiveContent() const; | 89 virtual bool isInteractiveContent() const; |
90 virtual void defaultEventHandler(Event*) OVERRIDE; | 90 virtual void defaultEventHandler(Event*) override; |
91 | 91 |
92 static const AtomicString& eventNameForAttributeName(const QualifiedName& at
trName); | 92 static const AtomicString& eventNameForAttributeName(const QualifiedName& at
trName); |
93 | 93 |
94 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; | 94 virtual bool matchesReadOnlyPseudoClass() const override; |
95 virtual bool matchesReadWritePseudoClass() const OVERRIDE; | 95 virtual bool matchesReadWritePseudoClass() const override; |
96 | 96 |
97 static const AtomicString& eventParameterName(); | 97 static const AtomicString& eventParameterName(); |
98 | 98 |
99 HTMLMenuElement* contextMenu() const; | 99 HTMLMenuElement* contextMenu() const; |
100 void setContextMenu(HTMLMenuElement*); | 100 void setContextMenu(HTMLMenuElement*); |
101 | 101 |
102 protected: | 102 protected: |
103 HTMLElement(const QualifiedName& tagName, Document&, ConstructionType); | 103 HTMLElement(const QualifiedName& tagName, Document&, ConstructionType); |
104 | 104 |
105 void addHTMLLengthToStyle(MutableStylePropertySet*, CSSPropertyID, const Str
ing& value); | 105 void addHTMLLengthToStyle(MutableStylePropertySet*, CSSPropertyID, const Str
ing& value); |
106 void addHTMLColorToStyle(MutableStylePropertySet*, CSSPropertyID, const Stri
ng& color); | 106 void addHTMLColorToStyle(MutableStylePropertySet*, CSSPropertyID, const Stri
ng& color); |
107 | 107 |
108 void applyAlignmentAttributeToStyle(const AtomicString&, MutableStylePropert
ySet*); | 108 void applyAlignmentAttributeToStyle(const AtomicString&, MutableStylePropert
ySet*); |
109 void applyBorderAttributeToStyle(const AtomicString&, MutableStylePropertySe
t*); | 109 void applyBorderAttributeToStyle(const AtomicString&, MutableStylePropertySe
t*); |
110 | 110 |
111 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 111 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; |
112 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 112 virtual bool isPresentationAttribute(const QualifiedName&) const override; |
113 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 113 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) override; |
114 unsigned parseBorderWidthAttribute(const AtomicString&) const; | 114 unsigned parseBorderWidthAttribute(const AtomicString&) const; |
115 | 115 |
116 virtual void childrenChanged(const ChildrenChange&) OVERRIDE; | 116 virtual void childrenChanged(const ChildrenChange&) override; |
117 void calculateAndAdjustDirectionality(); | 117 void calculateAndAdjustDirectionality(); |
118 | 118 |
119 private: | 119 private: |
120 virtual String nodeName() const OVERRIDE FINAL; | 120 virtual String nodeName() const override final; |
121 | 121 |
122 bool isHTMLElement() const WTF_DELETED_FUNCTION; // This will catch anyone d
oing an unnecessary check. | 122 bool isHTMLElement() const WTF_DELETED_FUNCTION; // This will catch anyone d
oing an unnecessary check. |
123 bool isStyledElement() const WTF_DELETED_FUNCTION; // This will catch anyone
doing an unnecessary check. | 123 bool isStyledElement() const WTF_DELETED_FUNCTION; // This will catch anyone
doing an unnecessary check. |
124 | 124 |
125 void mapLanguageAttributeToLocale(const AtomicString&, MutableStylePropertyS
et*); | 125 void mapLanguageAttributeToLocale(const AtomicString&, MutableStylePropertyS
et*); |
126 | 126 |
127 PassRefPtrWillBeRawPtr<DocumentFragment> textToFragment(const String&, Excep
tionState&); | 127 PassRefPtrWillBeRawPtr<DocumentFragment> textToFragment(const String&, Excep
tionState&); |
128 | 128 |
129 void dirAttributeChanged(const AtomicString&); | 129 void dirAttributeChanged(const AtomicString&); |
130 void adjustDirectionalityIfNeededAfterChildAttributeChanged(Element* child); | 130 void adjustDirectionalityIfNeededAfterChildAttributeChanged(Element* child); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r
eturn is##thisType(node.get()); } \ | 173 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 RefPtr<T>& node) { retur
n is##thisType(node.get()); } \ | 174 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur
n is##thisType(node.get()); } \ |
175 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e
lement) { return is##thisType(element); } \ | 175 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e
lement) { return is##thisType(element); } \ |
176 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) | 176 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) |
177 | 177 |
178 } // namespace blink | 178 } // namespace blink |
179 | 179 |
180 #include "core/HTMLElementTypeHelpers.h" | 180 #include "core/HTMLElementTypeHelpers.h" |
181 | 181 |
182 #endif // HTMLElement_h | 182 #endif // HTMLElement_h |
OLD | NEW |