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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 const String& classId() const { return m_classId; } | 38 const String& classId() const { return m_classId; } |
39 | 39 |
40 virtual HTMLFormElement* formOwner() const OVERRIDE; | 40 virtual HTMLFormElement* formOwner() const OVERRIDE; |
41 | 41 |
42 bool containsJavaApplet() const; | 42 bool containsJavaApplet() const; |
43 | 43 |
44 virtual bool useFallbackContent() const OVERRIDE; | 44 virtual bool useFallbackContent() const OVERRIDE; |
45 virtual void renderFallbackContent() OVERRIDE; | 45 virtual void renderFallbackContent() OVERRIDE; |
46 | 46 |
47 virtual bool isFormControlElement() const { return false; } | 47 virtual bool isFormControlElement() const OVERRIDE { return false; } |
48 | 48 |
49 virtual bool isEnumeratable() const { return true; } | 49 virtual bool isEnumeratable() const OVERRIDE { return true; } |
50 virtual bool isInteractiveContent() const OVERRIDE; | 50 virtual bool isInteractiveContent() const OVERRIDE; |
51 virtual bool appendFormData(FormDataList&, bool); | 51 virtual bool appendFormData(FormDataList&, bool) OVERRIDE; |
52 | 52 |
53 virtual bool isObjectElement() const OVERRIDE { return true; } | 53 virtual bool isObjectElement() const OVERRIDE { return true; } |
54 | 54 |
55 // Implementations of constraint validation API. | 55 // Implementations of constraint validation API. |
56 // Note that the object elements are always barred from constraint validatio
n. | 56 // Note that the object elements are always barred from constraint validatio
n. |
57 virtual String validationMessage() const OVERRIDE { return String(); } | 57 virtual String validationMessage() const OVERRIDE { return String(); } |
58 bool checkValidity() { return true; } | 58 bool checkValidity() { return true; } |
59 virtual void setCustomValidity(const String&) OVERRIDE { } | 59 virtual void setCustomValidity(const String&) OVERRIDE { } |
60 | 60 |
61 using Node::ref; | 61 using Node::ref; |
62 using Node::deref; | 62 using Node::deref; |
63 | 63 |
64 virtual bool canContainRangeEndPoint() const { return useFallbackContent();
} | 64 virtual bool canContainRangeEndPoint() const OVERRIDE { return useFallbackCo
ntent(); } |
65 | 65 |
66 bool isExposed() const; | 66 bool isExposed() const; |
67 | 67 |
68 private: | 68 private: |
69 HTMLObjectElement(Document&, HTMLFormElement*, bool createdByParser); | 69 HTMLObjectElement(Document&, HTMLFormElement*, bool createdByParser); |
70 | 70 |
71 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 71 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
72 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 72 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; |
73 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 73 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; |
74 | 74 |
75 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 75 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
76 virtual void removedFrom(ContainerNode*) OVERRIDE; | 76 virtual void removedFrom(ContainerNode*) OVERRIDE; |
77 | 77 |
78 virtual bool rendererIsNeeded(const RenderStyle&); | 78 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; |
79 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 79 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; |
80 | 80 |
81 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); | 81 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; |
82 | 82 |
83 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; | 83 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; |
84 virtual const AtomicString imageSourceURL() const OVERRIDE; | 84 virtual const AtomicString imageSourceURL() const OVERRIDE; |
85 | 85 |
86 virtual RenderWidget* existingRenderWidget() const OVERRIDE; | 86 virtual RenderWidget* existingRenderWidget() const OVERRIDE; |
87 | 87 |
88 virtual void updateWidgetInternal() OVERRIDE; | 88 virtual void updateWidgetInternal() OVERRIDE; |
89 void updateDocNamedItem(); | 89 void updateDocNamedItem(); |
90 | 90 |
91 void reattachFallbackContent(); | 91 void reattachFallbackContent(); |
92 | 92 |
93 bool hasFallbackContent() const; | 93 bool hasFallbackContent() const; |
94 | 94 |
95 // FIXME: This function should not deal with url or serviceType | 95 // FIXME: This function should not deal with url or serviceType |
96 // so that we can better share code between <object> and <embed>. | 96 // so that we can better share code between <object> and <embed>. |
97 void parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramVa
lues, String& url, String& serviceType); | 97 void parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramVa
lues, String& url, String& serviceType); |
98 | 98 |
99 bool shouldAllowQuickTimeClassIdQuirk(); | 99 bool shouldAllowQuickTimeClassIdQuirk(); |
100 bool hasValidClassId(); | 100 bool hasValidClassId(); |
101 | 101 |
102 virtual void refFormAssociatedElement() { ref(); } | 102 virtual void refFormAssociatedElement() OVERRIDE { ref(); } |
103 virtual void derefFormAssociatedElement() { deref(); } | 103 virtual void derefFormAssociatedElement() OVERRIDE { deref(); } |
104 | 104 |
105 virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; } | 105 virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; } |
106 virtual bool shouldRegisterAsExtraNamedItem() const OVERRIDE { return true;
} | 106 virtual bool shouldRegisterAsExtraNamedItem() const OVERRIDE { return true;
} |
107 | 107 |
108 String m_classId; | 108 String m_classId; |
109 bool m_useFallbackContent : 1; | 109 bool m_useFallbackContent : 1; |
110 }; | 110 }; |
111 | 111 |
112 DEFINE_NODE_TYPE_CASTS(HTMLObjectElement, hasTagName(HTMLNames::objectTag)); | 112 DEFINE_NODE_TYPE_CASTS(HTMLObjectElement, hasTagName(HTMLNames::objectTag)); |
113 | 113 |
(...skipping 13 matching lines...) Expand all Loading... |
127 const HTMLObjectElement& objectElement = static_cast<const HTMLObjectElement
&>(element); | 127 const HTMLObjectElement& objectElement = static_cast<const HTMLObjectElement
&>(element); |
128 // We need to assert after the cast because FormAssociatedElement doesn't | 128 // We need to assert after the cast because FormAssociatedElement doesn't |
129 // have hasTagName. | 129 // have hasTagName. |
130 ASSERT_WITH_SECURITY_IMPLICATION(objectElement.hasTagName(HTMLNames::objectT
ag)); | 130 ASSERT_WITH_SECURITY_IMPLICATION(objectElement.hasTagName(HTMLNames::objectT
ag)); |
131 return objectElement; | 131 return objectElement; |
132 } | 132 } |
133 | 133 |
134 } | 134 } |
135 | 135 |
136 #endif | 136 #endif |
OLD | NEW |