summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/plugins/symbian
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-13 16:23:25 +0100
committerBen Murdoch <benm@google.com>2011-05-16 11:35:02 +0100
commit65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch)
treef478babb801e720de7bfaee23443ffe029f58731 /Source/WebCore/plugins/symbian
parent47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff)
downloadexternal_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Source/WebCore/plugins/symbian')
-rw-r--r--Source/WebCore/plugins/symbian/PluginPackageSymbian.cpp12
-rw-r--r--Source/WebCore/plugins/symbian/PluginViewSymbian.cpp18
2 files changed, 27 insertions, 3 deletions
diff --git a/Source/WebCore/plugins/symbian/PluginPackageSymbian.cpp b/Source/WebCore/plugins/symbian/PluginPackageSymbian.cpp
index 7fca625..a14ac20 100644
--- a/Source/WebCore/plugins/symbian/PluginPackageSymbian.cpp
+++ b/Source/WebCore/plugins/symbian/PluginPackageSymbian.cpp
@@ -55,6 +55,7 @@ bool PluginPackage::fetchInfo()
mime[1].split(UChar(','), false, exts); // <ext1,ext2,ext3,...>
m_mimeToExtensions.add(mime[0], exts); // <MIME>,<ext1,ext2,ext3>
+ determineQuirks(mime[0]);
if (mime.size() > 2)
m_mimeToDescriptions.add(mime[0], mime[2]); // <MIME>,<Description>
}
@@ -63,6 +64,17 @@ bool PluginPackage::fetchInfo()
return true;
}
+void PluginPackage::determineQuirks(const String& mimeType)
+{
+ if (mimeType == "application/x-shockwave-flash") {
+ PlatformModuleVersion flashTenVersion(0x000a0000);
+ if (compareFileVersion(flashTenVersion) >= 0) {
+ // Flash 10 doesn't like having a 0 window handle.
+ m_quirks.add(PluginQuirkDontSetNullWindowHandleOnDestroy);
+ }
+ }
+}
+
bool PluginPackage::load()
{
if (m_isLoaded) {
diff --git a/Source/WebCore/plugins/symbian/PluginViewSymbian.cpp b/Source/WebCore/plugins/symbian/PluginViewSymbian.cpp
index b8a72b1..f3eb033 100644
--- a/Source/WebCore/plugins/symbian/PluginViewSymbian.cpp
+++ b/Source/WebCore/plugins/symbian/PluginViewSymbian.cpp
@@ -53,6 +53,8 @@
#include "npinterface.h"
#include "npruntime_impl.h"
#include "qgraphicswebview.h"
+#include "qwebframe.h"
+#include "qwebframe_p.h"
#include "runtime_root.h"
#include <QGraphicsProxyWidget>
#include <QKeyEvent>
@@ -63,6 +65,13 @@
#include <runtime/JSLock.h>
#include <runtime/JSValue.h>
+typedef void (*_qtwebkit_page_plugin_created)(QWebFrame*, void*, void*); // frame, plugin instance, plugin functions
+static _qtwebkit_page_plugin_created qtwebkit_page_plugin_created = 0;
+QWEBKIT_EXPORT void qtwebkit_setPluginCreatedCallback(_qtwebkit_page_plugin_created cb)
+{
+ qtwebkit_page_plugin_created = cb;
+}
+
using JSC::ExecState;
using JSC::Interpreter;
using JSC::JSLock;
@@ -278,8 +287,8 @@ void PluginView::setNPWindowIfNeeded()
} else {
// always call this method before painting.
- m_npWindow.x = 0;
- m_npWindow.y = 0;
+ m_npWindow.x = m_windowRect.x();
+ m_npWindow.y = m_windowRect.y();
m_npWindow.clipRect.left = 0;
m_npWindow.clipRect.top = 0;
@@ -415,7 +424,10 @@ bool PluginView::platformStart()
}
updatePluginWidget();
setNPWindowIfNeeded();
-
+
+ if (qtwebkit_page_plugin_created)
+ qtwebkit_page_plugin_created(QWebFramePrivate::kit(m_parentFrame.get()), m_instance, (void*)(m_plugin->pluginFuncs()));
+
return true;
}