diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index c034a941a735..2c401a503d35 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -4,19 +4,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef MOZ_WIDGET_QT -#include -#include -#if defined(MOZ_X11) -#if defined(Q_WS_X11) -#include -#else -#include "gfxQtPlatform.h" -#endif -#endif -#undef slots -#endif - #ifdef MOZ_X11 #include #include "gfxXlibSurface.h" @@ -2150,46 +2137,6 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent) } #endif -#ifdef MOZ_WIDGET_QT - const WidgetKeyboardEvent& keyEvent = *anEvent.AsKeyboardEvent(); - - memset( &event, 0, sizeof(event) ); - event.time = anEvent.time; - - QWidget* qWidget = static_cast(widget->GetNativeData(NS_NATIVE_WINDOW)); - - if (qWidget) -#if defined(Q_WS_X11) - event.root = qWidget->x11Info().appRootWindow(); -#else - event.root = RootWindowOfScreen(DefaultScreenOfDisplay(gfxQtPlatform::GetXDisplay(qWidget))); -#endif - - // deduce keycode from the information in the attached QKeyEvent - const QKeyEvent* qtEvent = static_cast(anEvent.pluginEvent); - if (qtEvent) { - - if (qtEvent->nativeModifiers()) - event.state = qtEvent->nativeModifiers(); - else // fallback - event.state = XInputEventState(keyEvent); - - if (qtEvent->nativeScanCode()) - event.keycode = qtEvent->nativeScanCode(); - else // fallback - event.keycode = XKeysymToKeycode( (widget ? static_cast(widget->GetNativeData(NS_NATIVE_DISPLAY)) : nullptr), qtEvent->key()); - } - - switch (anEvent.message) - { - case NS_KEY_DOWN: - event.type = XKeyPress; - break; - case NS_KEY_UP: - event.type = KeyRelease; - break; - } -#endif // Information that could be obtained from pluginEvent but we may not // want to promise to provide: event.subwindow = None;