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 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. | 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 15 matching lines...) Expand all Loading... | |
26 #include "bindings/v8/ScriptController.h" | 26 #include "bindings/v8/ScriptController.h" |
27 #include "bindings/v8/npruntime_impl.h" | 27 #include "bindings/v8/npruntime_impl.h" |
28 #include "core/CSSPropertyNames.h" | 28 #include "core/CSSPropertyNames.h" |
29 #include "core/HTMLNames.h" | 29 #include "core/HTMLNames.h" |
30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
31 #include "core/dom/Node.h" | 31 #include "core/dom/Node.h" |
32 #include "core/dom/shadow/ShadowRoot.h" | 32 #include "core/dom/shadow/ShadowRoot.h" |
33 #include "core/events/Event.h" | 33 #include "core/events/Event.h" |
34 #include "core/frame/FrameView.h" | 34 #include "core/frame/FrameView.h" |
35 #include "core/frame/LocalFrame.h" | 35 #include "core/frame/LocalFrame.h" |
36 #include "core/frame/Settings.h" | |
36 #include "core/frame/csp/ContentSecurityPolicy.h" | 37 #include "core/frame/csp/ContentSecurityPolicy.h" |
37 #include "core/html/HTMLContentElement.h" | 38 #include "core/html/HTMLContentElement.h" |
38 #include "core/html/HTMLImageLoader.h" | 39 #include "core/html/HTMLImageLoader.h" |
39 #include "core/html/PluginDocument.h" | 40 #include "core/html/PluginDocument.h" |
40 #include "core/loader/FrameLoaderClient.h" | 41 #include "core/loader/FrameLoaderClient.h" |
41 #include "core/page/EventHandler.h" | 42 #include "core/page/EventHandler.h" |
42 #include "core/page/Page.h" | 43 #include "core/page/Page.h" |
43 #include "core/frame/Settings.h" | |
44 #include "core/plugins/PluginView.h" | 44 #include "core/plugins/PluginView.h" |
45 #include "core/rendering/RenderEmbeddedObject.h" | 45 #include "core/rendering/RenderEmbeddedObject.h" |
46 #include "core/rendering/RenderImage.h" | 46 #include "core/rendering/RenderImage.h" |
47 #include "core/rendering/RenderWidget.h" | 47 #include "core/rendering/RenderWidget.h" |
48 #include "platform/Logging.h" | 48 #include "platform/Logging.h" |
49 #include "platform/MIMETypeFromURL.h" | 49 #include "platform/MIMETypeFromURL.h" |
50 #include "platform/MIMETypeRegistry.h" | 50 #include "platform/MIMETypeRegistry.h" |
51 #include "platform/Widget.h" | 51 #include "platform/Widget.h" |
52 #include "platform/plugins/PluginData.h" | 52 #include "platform/plugins/PluginData.h" |
53 | 53 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 setNeedsWidgetUpdate(true); | 194 setNeedsWidgetUpdate(true); |
195 if (m_isDelayingLoadEvent) { | 195 if (m_isDelayingLoadEvent) { |
196 m_isDelayingLoadEvent = false; | 196 m_isDelayingLoadEvent = false; |
197 document().decrementLoadEventDelayCount(); | 197 document().decrementLoadEventDelayCount(); |
198 } | 198 } |
199 | 199 |
200 // Only try to persist a plugin widget we actually own. | 200 // Only try to persist a plugin widget we actually own. |
201 Widget* plugin = ownedWidget(); | 201 Widget* plugin = ownedWidget(); |
202 if (plugin && plugin->pluginShouldPersist()) | 202 if (plugin && plugin->pluginShouldPersist()) |
203 m_persistedPluginWidget = plugin; | 203 m_persistedPluginWidget = plugin; |
204 #if ENABLE(OILPAN) | |
205 else if (plugin) | |
206 plugin->detach(); | |
haraken
2014/06/25 05:40:16
Is it OK to detach the plugin that is persisted by
sof
2014/06/25 07:09:32
We don't any kind of detachment in the non-Oilpan
sof
2014/06/25 09:23:50
I don't think we should do this as part of this CL
haraken
2014/06/25 09:31:05
Makes sense, agreed.
| |
207 #endif | |
haraken
2014/06/25 05:40:16
if (plugin) {
#if ENABLE(OILPAN)
plugin->detach(
| |
204 resetInstance(); | 208 resetInstance(); |
205 // FIXME - is this next line necessary? | 209 // FIXME - is this next line necessary? |
206 setWidget(nullptr); | 210 setWidget(nullptr); |
207 | 211 |
208 if (m_isCapturingMouseEvents) { | 212 if (m_isCapturingMouseEvents) { |
209 if (LocalFrame* frame = document().frame()) | 213 if (LocalFrame* frame = document().frame()) |
210 frame->eventHandler().setCapturingMouseEventsNode(nullptr); | 214 frame->eventHandler().setCapturingMouseEventsNode(nullptr); |
211 m_isCapturingMouseEvents = false; | 215 m_isCapturingMouseEvents = false; |
212 } | 216 } |
213 | 217 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
269 // return the cached allocated Bindings::Instance. Not supporting this | 273 // return the cached allocated Bindings::Instance. Not supporting this |
270 // edge-case is OK. | 274 // edge-case is OK. |
271 if (!m_pluginWrapper) { | 275 if (!m_pluginWrapper) { |
272 Widget* plugin; | 276 Widget* plugin; |
273 | 277 |
274 if (m_persistedPluginWidget) | 278 if (m_persistedPluginWidget) |
275 plugin = m_persistedPluginWidget.get(); | 279 plugin = m_persistedPluginWidget.get(); |
276 else | 280 else |
277 plugin = pluginWidget(); | 281 plugin = pluginWidget(); |
278 | 282 |
279 if (plugin) | 283 if (plugin) { |
280 m_pluginWrapper = frame->script().createPluginWrapper(plugin); | 284 m_pluginWrapper = frame->script().createPluginWrapper(plugin); |
285 #if ENABLE(OILPAN) | |
286 plugin->setScriptController(&frame->script()); | |
287 #endif | |
288 } | |
289 | |
281 } | 290 } |
282 return m_pluginWrapper.get(); | 291 return m_pluginWrapper.get(); |
283 } | 292 } |
284 | 293 |
285 Widget* HTMLPlugInElement::pluginWidget() const | 294 Widget* HTMLPlugInElement::pluginWidget() const |
286 { | 295 { |
287 if (RenderWidget* renderWidget = renderWidgetForJSBindings()) | 296 if (RenderWidget* renderWidget = renderWidgetForJSBindings()) |
288 return renderWidget->widget(); | 297 return renderWidget->widget(); |
289 return 0; | 298 return 0; |
290 } | 299 } |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
572 { | 581 { |
573 return false; | 582 return false; |
574 } | 583 } |
575 | 584 |
576 bool HTMLPlugInElement::useFallbackContent() const | 585 bool HTMLPlugInElement::useFallbackContent() const |
577 { | 586 { |
578 return hasAuthorShadowRoot(); | 587 return hasAuthorShadowRoot(); |
579 } | 588 } |
580 | 589 |
581 } | 590 } |
OLD | NEW |