Chromium Code Reviews| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 | 109 |
| 110 void HTMLPlugInElement::setPersistedPluginWidget(Widget* widget) | 110 void HTMLPlugInElement::setPersistedPluginWidget(Widget* widget) |
| 111 { | 111 { |
| 112 if (m_persistedPluginWidget == widget) | 112 if (m_persistedPluginWidget == widget) |
| 113 return; | 113 return; |
| 114 #if ENABLE(OILPAN) | 114 #if ENABLE(OILPAN) |
| 115 if (m_persistedPluginWidget && m_persistedPluginWidget->isPluginView()) { | 115 if (m_persistedPluginWidget && m_persistedPluginWidget->isPluginView()) { |
| 116 LocalFrame* frame = toPluginView(m_persistedPluginWidget.get())->pluginF rame(); | 116 LocalFrame* frame = toPluginView(m_persistedPluginWidget.get())->pluginF rame(); |
| 117 ASSERT(frame); | 117 ASSERT(frame); |
| 118 frame->unregisterPluginElement(this); | 118 frame->unregisterPluginElement(this); |
| 119 if (!widget) | |
| 120 m_persistedPluginWidget->dispose(); | |
|
haraken
2015/09/01 14:32:25
I'm wondering why we don't call m_persistedPluginW
sof
2015/09/01 21:37:31
The prompt disposal (via deref() on clearing) will
| |
| 119 } | 121 } |
| 120 if (widget && widget->isPluginView()) { | 122 if (widget && widget->isPluginView()) { |
| 121 LocalFrame* frame = toPluginView(widget)->pluginFrame(); | 123 LocalFrame* frame = toPluginView(widget)->pluginFrame(); |
| 122 ASSERT(frame); | 124 ASSERT(frame); |
| 123 frame->registerPluginElement(this); | 125 frame->registerPluginElement(this); |
| 124 } | 126 } |
| 125 #endif | 127 #endif |
| 126 m_persistedPluginWidget = widget; | 128 m_persistedPluginWidget = widget; |
| 127 } | 129 } |
| 128 | 130 |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 633 return openShadowRoot(); | 635 return openShadowRoot(); |
| 634 } | 636 } |
| 635 | 637 |
| 636 void HTMLPlugInElement::lazyReattachIfNeeded() | 638 void HTMLPlugInElement::lazyReattachIfNeeded() |
| 637 { | 639 { |
| 638 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma geType()) | 640 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma geType()) |
| 639 lazyReattachIfAttached(); | 641 lazyReattachIfAttached(); |
| 640 } | 642 } |
| 641 | 643 |
| 642 } | 644 } |
| OLD | NEW |