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, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2006, 2007, 2008, 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 Loading... |
23 #ifndef HTMLObjectElement_h | 23 #ifndef HTMLObjectElement_h |
24 #define HTMLObjectElement_h | 24 #define HTMLObjectElement_h |
25 | 25 |
26 #include "core/html/FormAssociatedElement.h" | 26 #include "core/html/FormAssociatedElement.h" |
27 #include "core/html/HTMLPlugInElement.h" | 27 #include "core/html/HTMLPlugInElement.h" |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
30 | 30 |
31 class HTMLFormElement; | 31 class HTMLFormElement; |
32 | 32 |
33 class HTMLObjectElement FINAL : public HTMLPlugInElement, public FormAssociatedE
lement { | 33 class HTMLObjectElement final : public HTMLPlugInElement, public FormAssociatedE
lement { |
34 DEFINE_WRAPPERTYPEINFO(); | 34 DEFINE_WRAPPERTYPEINFO(); |
35 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLObjectElement); | 35 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLObjectElement); |
36 public: | 36 public: |
37 static PassRefPtrWillBeRawPtr<HTMLObjectElement> create(Document&, HTMLFormE
lement*, bool createdByParser); | 37 static PassRefPtrWillBeRawPtr<HTMLObjectElement> create(Document&, HTMLFormE
lement*, bool createdByParser); |
38 virtual ~HTMLObjectElement(); | 38 virtual ~HTMLObjectElement(); |
39 virtual void trace(Visitor*) OVERRIDE; | 39 virtual void trace(Visitor*) override; |
40 | 40 |
41 const String& classId() const { return m_classId; } | 41 const String& classId() const { return m_classId; } |
42 | 42 |
43 virtual HTMLFormElement* formOwner() const OVERRIDE; | 43 virtual HTMLFormElement* formOwner() const override; |
44 | 44 |
45 bool containsJavaApplet() const; | 45 bool containsJavaApplet() const; |
46 | 46 |
47 virtual bool hasFallbackContent() const OVERRIDE; | 47 virtual bool hasFallbackContent() const override; |
48 virtual bool useFallbackContent() const OVERRIDE; | 48 virtual bool useFallbackContent() const override; |
49 virtual void renderFallbackContent() OVERRIDE; | 49 virtual void renderFallbackContent() override; |
50 | 50 |
51 virtual bool isFormControlElement() const OVERRIDE { return false; } | 51 virtual bool isFormControlElement() const override { return false; } |
52 | 52 |
53 virtual bool isEnumeratable() const OVERRIDE { return true; } | 53 virtual bool isEnumeratable() const override { return true; } |
54 virtual bool isInteractiveContent() const OVERRIDE; | 54 virtual bool isInteractiveContent() const override; |
55 virtual bool appendFormData(FormDataList&, bool) OVERRIDE; | 55 virtual bool appendFormData(FormDataList&, bool) override; |
56 | 56 |
57 virtual bool isObjectElement() const OVERRIDE { return true; } | 57 virtual bool isObjectElement() const override { return true; } |
58 | 58 |
59 // Implementations of constraint validation API. | 59 // Implementations of constraint validation API. |
60 // Note that the object elements are always barred from constraint validatio
n. | 60 // Note that the object elements are always barred from constraint validatio
n. |
61 virtual String validationMessage() const OVERRIDE { return String(); } | 61 virtual String validationMessage() const override { return String(); } |
62 bool checkValidity() { return true; } | 62 bool checkValidity() { return true; } |
63 virtual void setCustomValidity(const String&) OVERRIDE { } | 63 virtual void setCustomValidity(const String&) override { } |
64 | 64 |
65 #if !ENABLE(OILPAN) | 65 #if !ENABLE(OILPAN) |
66 using Node::ref; | 66 using Node::ref; |
67 using Node::deref; | 67 using Node::deref; |
68 #endif | 68 #endif |
69 | 69 |
70 virtual bool canContainRangeEndPoint() const OVERRIDE { return useFallbackCo
ntent(); } | 70 virtual bool canContainRangeEndPoint() const override { return useFallbackCo
ntent(); } |
71 | 71 |
72 bool isExposed() const; | 72 bool isExposed() const; |
73 | 73 |
74 private: | 74 private: |
75 HTMLObjectElement(Document&, HTMLFormElement*, bool createdByParser); | 75 HTMLObjectElement(Document&, HTMLFormElement*, bool createdByParser); |
76 | 76 |
77 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 77 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; |
78 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 78 virtual bool isPresentationAttribute(const QualifiedName&) const override; |
79 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 79 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) override; |
80 | 80 |
81 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 81 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
82 virtual void removedFrom(ContainerNode*) OVERRIDE; | 82 virtual void removedFrom(ContainerNode*) override; |
83 | 83 |
84 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; | 84 virtual bool rendererIsNeeded(const RenderStyle&) override; |
85 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 85 virtual void didMoveToNewDocument(Document& oldDocument) override; |
86 | 86 |
87 virtual void childrenChanged(const ChildrenChange&) OVERRIDE; | 87 virtual void childrenChanged(const ChildrenChange&) override; |
88 | 88 |
89 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; | 89 virtual bool isURLAttribute(const Attribute&) const override; |
90 virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE; | 90 virtual bool hasLegalLinkAttribute(const QualifiedName&) const override; |
91 virtual const QualifiedName& subResourceAttributeName() const OVERRIDE; | 91 virtual const QualifiedName& subResourceAttributeName() const override; |
92 virtual const AtomicString imageSourceURL() const OVERRIDE; | 92 virtual const AtomicString imageSourceURL() const override; |
93 | 93 |
94 virtual RenderWidget* existingRenderWidget() const OVERRIDE; | 94 virtual RenderWidget* existingRenderWidget() const override; |
95 | 95 |
96 virtual void updateWidgetInternal() OVERRIDE; | 96 virtual void updateWidgetInternal() override; |
97 void updateDocNamedItem(); | 97 void updateDocNamedItem(); |
98 | 98 |
99 void reattachFallbackContent(); | 99 void reattachFallbackContent(); |
100 | 100 |
101 // FIXME: This function should not deal with url or serviceType | 101 // FIXME: This function should not deal with url or serviceType |
102 // so that we can better share code between <object> and <embed>. | 102 // so that we can better share code between <object> and <embed>. |
103 void parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramVa
lues, String& url, String& serviceType); | 103 void parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramVa
lues, String& url, String& serviceType); |
104 | 104 |
105 bool hasValidClassId(); | 105 bool hasValidClassId(); |
106 | 106 |
107 void reloadPluginOnAttributeChange(const QualifiedName&); | 107 void reloadPluginOnAttributeChange(const QualifiedName&); |
108 | 108 |
109 #if !ENABLE(OILPAN) | 109 #if !ENABLE(OILPAN) |
110 virtual void refFormAssociatedElement() OVERRIDE { ref(); } | 110 virtual void refFormAssociatedElement() override { ref(); } |
111 virtual void derefFormAssociatedElement() OVERRIDE { deref(); } | 111 virtual void derefFormAssociatedElement() override { deref(); } |
112 #endif | 112 #endif |
113 | 113 |
114 virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; } | 114 virtual bool shouldRegisterAsNamedItem() const override { return true; } |
115 virtual bool shouldRegisterAsExtraNamedItem() const OVERRIDE { return true;
} | 115 virtual bool shouldRegisterAsExtraNamedItem() const override { return true;
} |
116 | 116 |
117 String m_classId; | 117 String m_classId; |
118 bool m_useFallbackContent : 1; | 118 bool m_useFallbackContent : 1; |
119 }; | 119 }; |
120 | 120 |
121 // Intentionally left unimplemented, template specialization needs to be provide
d for specific | 121 // Intentionally left unimplemented, template specialization needs to be provide
d for specific |
122 // return types. | 122 // return types. |
123 template<typename T> inline const T& toElement(const FormAssociatedElement&); | 123 template<typename T> inline const T& toElement(const FormAssociatedElement&); |
124 template<typename T> inline const T* toElement(const FormAssociatedElement*); | 124 template<typename T> inline const T* toElement(const FormAssociatedElement*); |
125 | 125 |
(...skipping 16 matching lines...) Expand all Loading... |
142 const HTMLObjectElement& objectElement = static_cast<const HTMLObjectElement
&>(element); | 142 const HTMLObjectElement& objectElement = static_cast<const HTMLObjectElement
&>(element); |
143 // We need to assert after the cast because FormAssociatedElement doesn't | 143 // We need to assert after the cast because FormAssociatedElement doesn't |
144 // have hasTagName. | 144 // have hasTagName. |
145 ASSERT_WITH_SECURITY_IMPLICATION(objectElement.hasTagName(HTMLNames::objectT
ag)); | 145 ASSERT_WITH_SECURITY_IMPLICATION(objectElement.hasTagName(HTMLNames::objectT
ag)); |
146 return objectElement; | 146 return objectElement; |
147 } | 147 } |
148 | 148 |
149 } // namespace blink | 149 } // namespace blink |
150 | 150 |
151 #endif // HTMLObjectElement_h | 151 #endif // HTMLObjectElement_h |
OLD | NEW |