diff options
Diffstat (limited to 'Source/WebKit2/WebProcess/Plugins/PluginView.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/Plugins/PluginView.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp b/Source/WebKit2/WebProcess/Plugins/PluginView.cpp index 3b1629d..ec770ec 100644 --- a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp +++ b/Source/WebKit2/WebProcess/Plugins/PluginView.cpp @@ -825,6 +825,11 @@ void PluginView::invalidateRect(const IntRect& dirtyRect) if (!parent() || !m_plugin || !m_isInitialized) return; +#if PLATFORM(MAC) + if (m_plugin->pluginLayer()) + return; +#endif + IntRect dirtyRectInWindowCoordinates = convertToContainingWindow(dirtyRect); parent()->hostWindow()->invalidateContentsAndWindow(intersection(dirtyRectInWindowCoordinates, clipRectInWindowCoordinates()), false); @@ -926,11 +931,12 @@ NPObject* PluginView::pluginElementNPObject() bool PluginView::evaluate(NPObject* npObject, const String& scriptString, NPVariant* result, bool allowPopups) { - if (!frame()) + RefPtr<Frame> frame = m_pluginElement->document()->frame(); + if (!frame) return false; - bool oldAllowPopups = frame()->script()->allowPopupsFromPlugin(); - frame()->script()->setAllowPopupsFromPlugin(allowPopups); + bool oldAllowPopups = frame->script()->allowPopupsFromPlugin(); + frame->script()->setAllowPopupsFromPlugin(allowPopups); // Calling evaluate will run JavaScript that can potentially remove the plug-in element, so we need to // protect the plug-in view from destruction. @@ -938,7 +944,7 @@ bool PluginView::evaluate(NPObject* npObject, const String& scriptString, NPVari bool returnValue = m_npRuntimeObjectMap.evaluate(npObject, scriptString, result); - frame()->script()->setAllowPopupsFromPlugin(oldAllowPopups); + frame->script()->setAllowPopupsFromPlugin(oldAllowPopups); return returnValue; } |