diff options
Diffstat (limited to 'WebCore/html/HTMLPlugInElement.cpp')
-rw-r--r-- | WebCore/html/HTMLPlugInElement.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/WebCore/html/HTMLPlugInElement.cpp b/WebCore/html/HTMLPlugInElement.cpp index 7737dc4..2ce44a6 100644 --- a/WebCore/html/HTMLPlugInElement.cpp +++ b/WebCore/html/HTMLPlugInElement.cpp @@ -92,13 +92,21 @@ PassScriptInstance HTMLPlugInElement::getInstance() const if (m_instance) return m_instance; - RenderWidget* renderWidget = renderWidgetForJSBindings(); - if (renderWidget && renderWidget->widget()) - m_instance = frame->script()->createScriptInstanceForWidget(renderWidget->widget()); + if (Widget* widget = pluginWidget()) + m_instance = frame->script()->createScriptInstanceForWidget(widget); return m_instance; } +Widget* HTMLPlugInElement::pluginWidget() const +{ + RenderWidget* renderWidget = renderWidgetForJSBindings(); + if (!renderWidget) + return 0; + + return renderWidget->widget(); +} + bool HTMLPlugInElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const { if (attrName == widthAttr || |