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

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

Issue 243403006: Implement contextmenu attribute with basic support of <menu> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added runtime enabled checks Created 6 years, 5 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
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, 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009 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
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 WebCore { 28 namespace WebCore {
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual bool isInteractiveContent() const; 87 virtual bool isInteractiveContent() const;
87 virtual void defaultEventHandler(Event*) OVERRIDE; 88 virtual void defaultEventHandler(Event*) OVERRIDE;
88 89
89 static const AtomicString& eventNameForAttributeName(const QualifiedName& at trName); 90 static const AtomicString& eventNameForAttributeName(const QualifiedName& at trName);
90 91
91 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; 92 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE;
92 virtual bool matchesReadWritePseudoClass() const OVERRIDE; 93 virtual bool matchesReadWritePseudoClass() const OVERRIDE;
93 94
94 static const AtomicString& eventParameterName(); 95 static const AtomicString& eventParameterName();
95 96
97 HTMLMenuElement* menuElement() const;
98
96 protected: 99 protected:
97 HTMLElement(const QualifiedName& tagName, Document&, ConstructionType); 100 HTMLElement(const QualifiedName& tagName, Document&, ConstructionType);
98 101
99 void addHTMLLengthToStyle(MutableStylePropertySet*, CSSPropertyID, const Str ing& value); 102 void addHTMLLengthToStyle(MutableStylePropertySet*, CSSPropertyID, const Str ing& value);
100 void addHTMLColorToStyle(MutableStylePropertySet*, CSSPropertyID, const Stri ng& color); 103 void addHTMLColorToStyle(MutableStylePropertySet*, CSSPropertyID, const Stri ng& color);
101 104
102 void applyAlignmentAttributeToStyle(const AtomicString&, MutableStylePropert ySet*); 105 void applyAlignmentAttributeToStyle(const AtomicString&, MutableStylePropert ySet*);
103 void applyBorderAttributeToStyle(const AtomicString&, MutableStylePropertySe t*); 106 void applyBorderAttributeToStyle(const AtomicString&, MutableStylePropertySe t*);
104 107
105 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 108 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r eturn is##thisType(node.get()); } \ 155 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r eturn is##thisType(node.get()); } \
153 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur n is##thisType(node.get()); } \ 156 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur n is##thisType(node.get()); } \
154 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e lement) { return is##thisType(element); } \ 157 template <> inline bool isElementOfType<const thisType>(const HTMLElement& e lement) { return is##thisType(element); } \
155 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) 158 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType)
156 159
157 } // namespace WebCore 160 } // namespace WebCore
158 161
159 #include "core/HTMLElementTypeHelpers.h" 162 #include "core/HTMLElementTypeHelpers.h"
160 163
161 #endif // HTMLElement_h 164 #endif // HTMLElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698