| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 { | 87 { |
| 88 visitor->trace(m_imageLoader); | 88 visitor->trace(m_imageLoader); |
| 89 visitor->trace(m_persistedPluginWidget); | 89 visitor->trace(m_persistedPluginWidget); |
| 90 HTMLFrameOwnerElement::trace(visitor); | 90 HTMLFrameOwnerElement::trace(visitor); |
| 91 } | 91 } |
| 92 | 92 |
| 93 #if ENABLE(OILPAN) | 93 #if ENABLE(OILPAN) |
| 94 void HTMLPlugInElement::disconnectContentFrame() | 94 void HTMLPlugInElement::disconnectContentFrame() |
| 95 { | 95 { |
| 96 if (m_persistedPluginWidget) { | 96 if (m_persistedPluginWidget) { |
| 97 m_persistedPluginWidget->dispose(); | 97 if (m_persistedPluginWidget->isPluginView()) |
| 98 m_persistedPluginWidget->dispose(); |
| 99 else |
| 100 ASSERT(m_persistedPluginWidget->isFrameView()); |
| 98 m_persistedPluginWidget = nullptr; | 101 m_persistedPluginWidget = nullptr; |
| 99 } | 102 } |
| 100 HTMLFrameOwnerElement::disconnectContentFrame(); | 103 HTMLFrameOwnerElement::disconnectContentFrame(); |
| 101 } | 104 } |
| 102 | 105 |
| 103 void HTMLPlugInElement::shouldDisposePlugin() | 106 void HTMLPlugInElement::shouldDisposePlugin() |
| 104 { | 107 { |
| 105 if (m_persistedPluginWidget && m_persistedPluginWidget->isPluginView()) | 108 if (m_persistedPluginWidget && m_persistedPluginWidget->isPluginView()) |
| 106 toPluginView(m_persistedPluginWidget.get())->shouldDisposePlugin(); | 109 toPluginView(m_persistedPluginWidget.get())->shouldDisposePlugin(); |
| 107 } | 110 } |
| 108 #endif | 111 #endif |
| 109 | 112 |
| 110 void HTMLPlugInElement::setPersistedPluginWidget(Widget* widget) | 113 void HTMLPlugInElement::setPersistedPluginWidget(Widget* widget) |
| 111 { | 114 { |
| 112 if (m_persistedPluginWidget == widget) | 115 if (m_persistedPluginWidget == widget) |
| 113 return; | 116 return; |
| 114 #if ENABLE(OILPAN) | 117 #if ENABLE(OILPAN) |
| 115 unregisterAsRenderlessIfNeeded(); | 118 unregisterAsRenderlessIfNeeded(); |
| 116 registerAsRenderless(widget); | 119 registerAsRenderless(widget); |
| 117 if (m_persistedPluginWidget) { | 120 if (m_persistedPluginWidget) { |
| 118 m_persistedPluginWidget->hide(); | 121 if (m_persistedPluginWidget->isPluginView()) { |
| 119 m_persistedPluginWidget->dispose(); | 122 m_persistedPluginWidget->hide(); |
| 123 m_persistedPluginWidget->dispose(); |
| 124 } else { |
| 125 ASSERT(m_persistedPluginWidget->isFrameView()); |
| 126 } |
| 120 } | 127 } |
| 121 #endif | 128 #endif |
| 122 m_persistedPluginWidget = widget; | 129 m_persistedPluginWidget = widget; |
| 123 } | 130 } |
| 124 | 131 |
| 125 #if ENABLE(OILPAN) | 132 #if ENABLE(OILPAN) |
| 126 bool HTMLPlugInElement::unregisterAsRenderlessIfNeeded() | 133 bool HTMLPlugInElement::unregisterAsRenderlessIfNeeded() |
| 127 { | 134 { |
| 128 if (!m_persistedPluginWidget || !m_persistedPluginWidget->isPluginView()) | 135 if (!m_persistedPluginWidget || !m_persistedPluginWidget->isPluginView()) |
| 129 return false; | 136 return false; |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 return openShadowRoot(); | 670 return openShadowRoot(); |
| 664 } | 671 } |
| 665 | 672 |
| 666 void HTMLPlugInElement::lazyReattachIfNeeded() | 673 void HTMLPlugInElement::lazyReattachIfNeeded() |
| 667 { | 674 { |
| 668 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma
geType()) | 675 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma
geType()) |
| 669 lazyReattachIfAttached(); | 676 lazyReattachIfAttached(); |
| 670 } | 677 } |
| 671 | 678 |
| 672 } | 679 } |
| OLD | NEW |