diff options
Diffstat (limited to 'Source/WebCore/plugins')
-rw-r--r-- | Source/WebCore/plugins/qt/PluginViewQt.cpp | 9 | ||||
-rw-r--r-- | Source/WebCore/plugins/symbian/PluginPackageSymbian.cpp | 12 | ||||
-rw-r--r-- | Source/WebCore/plugins/symbian/PluginViewSymbian.cpp | 18 |
3 files changed, 31 insertions, 8 deletions
diff --git a/Source/WebCore/plugins/qt/PluginViewQt.cpp b/Source/WebCore/plugins/qt/PluginViewQt.cpp index fdbe552..6cf36e9 100644 --- a/Source/WebCore/plugins/qt/PluginViewQt.cpp +++ b/Source/WebCore/plugins/qt/PluginViewQt.cpp @@ -417,15 +417,14 @@ void setXKeyEventSpecificFields(XEvent* xEvent, KeyboardEvent* event) xEvent->xkey.keycode = keyEvent->nativeScanCode(); // We may not have a nativeScanCode() if the key event is from DRT's eventsender. In that - // case just populate the XEvent's keycode with the Qt platform-independent keycode. The only + // case fetch the XEvent's keycode from the event's text. The only // place this keycode will be used is in webkit_test_plugin_handle_event(). + // FIXME: Create Qt API so that we can set the appropriate keycode in DRT EventSender instead. if (QWebPagePrivate::drtRun && !xEvent->xkey.keycode) { QKeyEvent* qKeyEvent = keyEvent->qtEvent(); ASSERT(qKeyEvent); - if (!qKeyEvent->text().isEmpty()) - xEvent->xkey.keycode = int(qKeyEvent->text().at(0).unicode() + qKeyEvent->modifiers()); - else if (qKeyEvent->key() && (qKeyEvent->key() != Qt::Key_unknown)) - xEvent->xkey.keycode = int(qKeyEvent->key() + qKeyEvent->modifiers()); + QString keyText = qKeyEvent->text().left(1); + xEvent->xkey.keycode = XKeysymToKeycode(QX11Info::display(), XStringToKeysym(keyText.toUtf8().constData())); } xEvent->xkey.same_screen = true; 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; } |