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, 2012 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights reserv
ed. |
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 class LayoutPart; | 38 class LayoutPart; |
39 class Widget; | 39 class Widget; |
40 | 40 |
41 enum PreferPlugInsForImagesOption { | 41 enum PreferPlugInsForImagesOption { |
42 ShouldPreferPlugInsForImages, | 42 ShouldPreferPlugInsForImages, |
43 ShouldNotPreferPlugInsForImages | 43 ShouldNotPreferPlugInsForImages |
44 }; | 44 }; |
45 | 45 |
46 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement { | 46 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement { |
47 public: | 47 public: |
48 virtual ~HTMLPlugInElement(); | 48 ~HTMLPlugInElement() override; |
49 DECLARE_VIRTUAL_TRACE(); | 49 DECLARE_VIRTUAL_TRACE(); |
50 #if ENABLE(OILPAN) | 50 #if ENABLE(OILPAN) |
51 virtual void disconnectContentFrame() override; | 51 void disconnectContentFrame() override; |
52 void shouldDisposePlugin(); | 52 void shouldDisposePlugin(); |
53 #endif | 53 #endif |
54 | 54 |
55 void resetInstance(); | 55 void resetInstance(); |
56 | 56 |
57 // Returns the existing plugin widget, if there is one. | 57 // Returns the existing plugin widget, if there is one. |
58 Widget* existingPluginWidget() const; | 58 Widget* existingPluginWidget() const; |
59 | 59 |
60 // Returns the plugin widget, forcing layout and post-layout tasks | 60 // Returns the plugin widget, forcing layout and post-layout tasks |
61 // to happen synchronously (e.g. for JS bindings). | 61 // to happen synchronously (e.g. for JS bindings). |
(...skipping 17 matching lines...) Expand all Loading... |
79 void createPluginWithoutLayoutObject(); | 79 void createPluginWithoutLayoutObject(); |
80 | 80 |
81 // Public for Internals::forcePluginPlaceholder. | 81 // Public for Internals::forcePluginPlaceholder. |
82 bool usePlaceholderContent() const { return m_placeholder; } | 82 bool usePlaceholderContent() const { return m_placeholder; } |
83 void setPlaceholder(PassOwnPtrWillBeRawPtr<PluginPlaceholder>); | 83 void setPlaceholder(PassOwnPtrWillBeRawPtr<PluginPlaceholder>); |
84 | 84 |
85 protected: | 85 protected: |
86 HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByPar
ser, PreferPlugInsForImagesOption); | 86 HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByPar
ser, PreferPlugInsForImagesOption); |
87 | 87 |
88 // Node functions: | 88 // Node functions: |
89 virtual void didMoveToNewDocument(Document& oldDocument) override; | 89 void didMoveToNewDocument(Document& oldDocument) override; |
90 | 90 |
91 // Element functions: | 91 // Element functions: |
92 virtual bool isPresentationAttribute(const QualifiedName&) const override; | 92 bool isPresentationAttribute(const QualifiedName&) const override; |
93 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) override; | 93 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic
String&, MutableStylePropertySet*) override; |
94 | 94 |
95 virtual bool hasFallbackContent() const; | 95 virtual bool hasFallbackContent() const; |
96 virtual bool useFallbackContent() const; | 96 virtual bool useFallbackContent() const; |
97 // Create or update the LayoutPart and return it, triggering layout if | 97 // Create or update the LayoutPart and return it, triggering layout if |
98 // necessary. | 98 // necessary. |
99 virtual LayoutPart* layoutPartForJSBindings() const; | 99 virtual LayoutPart* layoutPartForJSBindings() const; |
100 | 100 |
101 bool isImageType(); | 101 bool isImageType(); |
102 bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForI
mages; } | 102 bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForI
mages; } |
103 LayoutEmbeddedObject* layoutEmbeddedObject() const; | 103 LayoutEmbeddedObject* layoutEmbeddedObject() const; |
104 bool allowedToLoadFrameURL(const String& url); | 104 bool allowedToLoadFrameURL(const String& url); |
105 bool requestObject(const String& url, const String& mimeType, const Vector<S
tring>& paramNames, const Vector<String>& paramValues); | 105 bool requestObject(const String& url, const String& mimeType, const Vector<S
tring>& paramNames, const Vector<String>& paramValues); |
106 bool shouldUsePlugin(const KURL&, const String& mimeType, bool hasFallback,
bool& useFallback); | 106 bool shouldUsePlugin(const KURL&, const String& mimeType, bool hasFallback,
bool& useFallback); |
107 | 107 |
108 void dispatchErrorEvent(); | 108 void dispatchErrorEvent(); |
109 void lazyReattachIfNeeded(); | 109 void lazyReattachIfNeeded(); |
110 | 110 |
111 String m_serviceType; | 111 String m_serviceType; |
112 String m_url; | 112 String m_url; |
113 KURL m_loadedUrl; | 113 KURL m_loadedUrl; |
114 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; | 114 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; |
115 bool m_isDelayingLoadEvent; | 115 bool m_isDelayingLoadEvent; |
116 | 116 |
117 private: | 117 private: |
118 // EventTarget functions: | 118 // EventTarget functions: |
119 virtual void removeAllEventListeners() override final; | 119 void removeAllEventListeners() final; |
120 | 120 |
121 // Node functions: | 121 // Node functions: |
122 virtual bool canContainRangeEndPoint() const override { return false; } | 122 bool canContainRangeEndPoint() const override { return false; } |
123 virtual bool willRespondToMouseClickEvents() override final; | 123 bool willRespondToMouseClickEvents() final; |
124 virtual void defaultEventHandler(Event*) override final; | 124 void defaultEventHandler(Event*) final; |
125 virtual void attach(const AttachContext& = AttachContext()) override final; | 125 void attach(const AttachContext& = AttachContext()) final; |
126 virtual void detach(const AttachContext& = AttachContext()) override final; | 126 void detach(const AttachContext& = AttachContext()) final; |
127 virtual void finishParsingChildren() override final; | 127 void finishParsingChildren() final; |
128 | 128 |
129 // Element functions: | 129 // Element functions: |
130 virtual LayoutObject* createLayoutObject(const ComputedStyle&) override; | 130 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
131 virtual bool supportsFocus() const override final { return true; } | 131 bool supportsFocus() const final { return true; } |
132 virtual bool layoutObjectIsFocusable() const override final; | 132 bool layoutObjectIsFocusable() const final; |
133 virtual bool isKeyboardFocusable() const override final; | 133 bool isKeyboardFocusable() const final; |
134 virtual void didAddUserAgentShadowRoot(ShadowRoot&) override final; | 134 void didAddUserAgentShadowRoot(ShadowRoot&) final; |
135 virtual void willAddFirstOpenShadowRoot() override final; | 135 void willAddFirstOpenShadowRoot() final; |
136 | 136 |
137 // HTMLElement function: | 137 // HTMLElement function: |
138 virtual bool hasCustomFocusLogic() const override; | 138 bool hasCustomFocusLogic() const override; |
139 virtual bool isPluginElement() const override final; | 139 bool isPluginElement() const final; |
140 | 140 |
141 // Return any existing LayoutPart without triggering relayout, or 0 if it | 141 // Return any existing LayoutPart without triggering relayout, or 0 if it |
142 // doesn't yet exist. | 142 // doesn't yet exist. |
143 virtual LayoutPart* existingLayoutPart() const = 0; | 143 virtual LayoutPart* existingLayoutPart() const = 0; |
144 virtual void updateWidgetInternal() = 0; | 144 virtual void updateWidgetInternal() = 0; |
145 | 145 |
146 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p
aramNames, const Vector<String>& paramValues, bool useFallback, bool requireLayo
utObject); | 146 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p
aramNames, const Vector<String>& paramValues, bool useFallback, bool requireLayo
utObject); |
147 bool pluginIsLoadable(const KURL&, const String& mimeType); | 147 bool pluginIsLoadable(const KURL&, const String& mimeType); |
148 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; | 148 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; |
149 | 149 |
(...skipping 18 matching lines...) Expand all Loading... |
168 inline bool isHTMLPlugInElement(const HTMLElement& element) | 168 inline bool isHTMLPlugInElement(const HTMLElement& element) |
169 { | 169 { |
170 return element.isPluginElement(); | 170 return element.isPluginElement(); |
171 } | 171 } |
172 | 172 |
173 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); | 173 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); |
174 | 174 |
175 } // namespace blink | 175 } // namespace blink |
176 | 176 |
177 #endif // HTMLPlugInElement_h | 177 #endif // HTMLPlugInElement_h |
OLD | NEW |