| 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 12 matching lines...) Expand all Loading... |
| 23 #ifndef HTMLElement_h | 23 #ifndef HTMLElement_h |
| 24 #define HTMLElement_h | 24 #define HTMLElement_h |
| 25 | 25 |
| 26 #include "core/dom/Element.h" | 26 #include "core/dom/Element.h" |
| 27 | 27 |
| 28 namespace blink { | 28 namespace blink { |
| 29 | 29 |
| 30 class DocumentFragment; | 30 class DocumentFragment; |
| 31 class HTMLCollection; | 31 class HTMLCollection; |
| 32 class HTMLFormElement; | 32 class HTMLFormElement; |
| 33 class HTMLMenuElement; |
| 33 class ExceptionState; | 34 class ExceptionState; |
| 34 | 35 |
| 35 enum TranslateAttributeMode { | 36 enum TranslateAttributeMode { |
| 36 TranslateAttributeYes, | 37 TranslateAttributeYes, |
| 37 TranslateAttributeNo, | 38 TranslateAttributeNo, |
| 38 TranslateAttributeInherit | 39 TranslateAttributeInherit |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 class HTMLElement : public Element { | 42 class HTMLElement : public Element { |
| 42 public: | 43 public: |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 virtual bool isInteractiveContent() const; | 89 virtual bool isInteractiveContent() const; |
| 89 virtual void defaultEventHandler(Event*) OVERRIDE; | 90 virtual void defaultEventHandler(Event*) OVERRIDE; |
| 90 | 91 |
| 91 static const AtomicString& eventNameForAttributeName(const QualifiedName& at
trName); | 92 static const AtomicString& eventNameForAttributeName(const QualifiedName& at
trName); |
| 92 | 93 |
| 93 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; | 94 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; |
| 94 virtual bool matchesReadWritePseudoClass() const OVERRIDE; | 95 virtual bool matchesReadWritePseudoClass() const OVERRIDE; |
| 95 | 96 |
| 96 static const AtomicString& eventParameterName(); | 97 static const AtomicString& eventParameterName(); |
| 97 | 98 |
| 99 HTMLMenuElement* contextMenu() const; |
| 100 void setContextMenu(HTMLMenuElement*); |
| 101 |
| 98 protected: | 102 protected: |
| 99 HTMLElement(const QualifiedName& tagName, Document&, ConstructionType); | 103 HTMLElement(const QualifiedName& tagName, Document&, ConstructionType); |
| 100 | 104 |
| 101 void addHTMLLengthToStyle(MutableStylePropertySet*, CSSPropertyID, const Str
ing& value); | 105 void addHTMLLengthToStyle(MutableStylePropertySet*, CSSPropertyID, const Str
ing& value); |
| 102 void addHTMLColorToStyle(MutableStylePropertySet*, CSSPropertyID, const Stri
ng& color); | 106 void addHTMLColorToStyle(MutableStylePropertySet*, CSSPropertyID, const Stri
ng& color); |
| 103 | 107 |
| 104 void applyAlignmentAttributeToStyle(const AtomicString&, MutableStylePropert
ySet*); | 108 void applyAlignmentAttributeToStyle(const AtomicString&, MutableStylePropert
ySet*); |
| 105 void applyBorderAttributeToStyle(const AtomicString&, MutableStylePropertySe
t*); | 109 void applyBorderAttributeToStyle(const AtomicString&, MutableStylePropertySe
t*); |
| 106 | 110 |
| 107 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 111 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r
eturn is##thisType(node.get()); } \ | 165 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r
eturn is##thisType(node.get()); } \ |
| 162 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur
n is##thisType(node.get()); } \ | 166 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur
n is##thisType(node.get()); } \ |
| 163 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e
lement) { return is##thisType(element); } \ | 167 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e
lement) { return is##thisType(element); } \ |
| 164 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) | 168 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) |
| 165 | 169 |
| 166 } // namespace blink | 170 } // namespace blink |
| 167 | 171 |
| 168 #include "core/HTMLElementTypeHelpers.h" | 172 #include "core/HTMLElementTypeHelpers.h" |
| 169 | 173 |
| 170 #endif // HTMLElement_h | 174 #endif // HTMLElement_h |
| OLD | NEW |