Diff
Modified: trunk/Source/WebCore/ChangeLog (89575 => 89576)
--- trunk/Source/WebCore/ChangeLog 2011-06-23 15:48:51 UTC (rev 89575)
+++ trunk/Source/WebCore/ChangeLog 2011-06-23 15:53:03 UTC (rev 89576)
@@ -1,3 +1,33 @@
+2011-06-23 Balazs Kelemen <[email protected]>
+
+ Reviewed by Adam Roben.
+
+ PluginView::dispatchNPEvent is deceptive
+ https://bugs.webkit.org/show_bug.cgi?id=63243
+
+ Straighten the inverted logic of dispatchNPEvent
+ and it's callers.
+
+ No change in behaviour so no new tests.
+ Existing plugin tests cover this.
+
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::PluginView::dispatchNPEvent):
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::PluginView::handleMouseEvent):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::dispatchNPEvent):
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::PluginView::handleMouseEvent):
+ * plugins/symbian/PluginViewSymbian.cpp:
+ (WebCore::PluginView::dispatchNPEvent):
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::PluginView::handleMouseEvent):
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::dispatchNPEvent):
+ (WebCore::PluginView::handleKeyboardEvent):
+ (WebCore::PluginView::handleMouseEvent):
+
2011-06-23 Tommy Widenflycht <[email protected]>
Reviewed by Tony Gentilcore.
Modified: trunk/Source/WebCore/plugins/gtk/PluginViewGtk.cpp (89575 => 89576)
--- trunk/Source/WebCore/plugins/gtk/PluginViewGtk.cpp 2011-06-23 15:48:51 UTC (rev 89575)
+++ trunk/Source/WebCore/plugins/gtk/PluginViewGtk.cpp 2011-06-23 15:53:03 UTC (rev 89576)
@@ -107,7 +107,7 @@
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
setCallingPlugin(true);
- bool accepted = m_plugin->pluginFuncs()->event(m_instance, &event);
+ bool accepted = !m_plugin->pluginFuncs()->event(m_instance, &event);
setCallingPlugin(false);
PluginView::setCurrentPluginView(0);
@@ -303,7 +303,7 @@
xEvent.xkey.y_root = 0;
#endif
- if (!dispatchNPEvent(xEvent))
+ if (dispatchNPEvent(xEvent))
event->setDefaultHandled();
}
@@ -435,7 +435,7 @@
return;
#endif
- if (!dispatchNPEvent(xEvent))
+ if (dispatchNPEvent(xEvent))
event->setDefaultHandled();
}
Modified: trunk/Source/WebCore/plugins/qt/PluginViewQt.cpp (89575 => 89576)
--- trunk/Source/WebCore/plugins/qt/PluginViewQt.cpp 2011-06-23 15:48:51 UTC (rev 89575)
+++ trunk/Source/WebCore/plugins/qt/PluginViewQt.cpp 2011-06-23 15:53:03 UTC (rev 89576)
@@ -404,7 +404,7 @@
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
#endif
setCallingPlugin(true);
- bool accepted = m_plugin->pluginFuncs()->event(m_instance, &event);
+ bool accepted = !m_plugin->pluginFuncs()->event(m_instance, &event);
setCallingPlugin(false);
PluginView::setCurrentPluginView(0);
@@ -480,7 +480,7 @@
initXEvent(&npEvent);
setXKeyEventSpecificFields(&npEvent, event);
- if (!dispatchNPEvent(npEvent))
+ if (dispatchNPEvent(npEvent))
event->setDefaultHandled();
}
@@ -589,7 +589,7 @@
else
return;
- if (!dispatchNPEvent(npEvent))
+ if (dispatchNPEvent(npEvent))
event->setDefaultHandled();
}
Modified: trunk/Source/WebCore/plugins/symbian/PluginViewSymbian.cpp (89575 => 89576)
--- trunk/Source/WebCore/plugins/symbian/PluginViewSymbian.cpp 2011-06-23 15:48:51 UTC (rev 89575)
+++ trunk/Source/WebCore/plugins/symbian/PluginViewSymbian.cpp 2011-06-23 15:53:03 UTC (rev 89576)
@@ -222,7 +222,7 @@
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
setCallingPlugin(true);
- bool accepted = m_plugin->pluginFuncs()->event(m_instance, &event);
+ bool accepted = !m_plugin->pluginFuncs()->event(m_instance, &event);
setCallingPlugin(false);
PluginView::setCurrentPluginView(0);
@@ -236,7 +236,7 @@
ASSERT(event->keyEvent()->qtEvent());
QEvent& npEvent = *(event->keyEvent()->qtEvent());
- if (!dispatchNPEvent(npEvent))
+ if (dispatchNPEvent(npEvent))
event->setDefaultHandled();
}
@@ -289,7 +289,7 @@
modifiers |= Qt::MetaModifier;
QMouseEvent mouseEvent(type, position, button, button, modifiers);
QEvent& npEvent = mouseEvent;
- if (!dispatchNPEvent(npEvent))
+ if (dispatchNPEvent(npEvent))
event->setDefaultHandled();
}
Modified: trunk/Source/WebCore/plugins/win/PluginViewWin.cpp (89575 => 89576)
--- trunk/Source/WebCore/plugins/win/PluginViewWin.cpp 2011-06-23 15:48:51 UTC (rev 89575)
+++ trunk/Source/WebCore/plugins/win/PluginViewWin.cpp 2011-06-23 15:53:03 UTC (rev 89576)
@@ -508,13 +508,13 @@
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
setCallingPlugin(true);
- bool result = m_plugin->pluginFuncs()->event(m_instance, &npEvent);
+ bool accepted = !m_plugin->pluginFuncs()->event(m_instance, &npEvent);
setCallingPlugin(false);
if (shouldPop)
popPopupsEnabledState();
- return result;
+ return accepted;
}
void PluginView::paintIntoTransformedContext(HDC hdc)
@@ -652,7 +652,7 @@
}
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
- if (!dispatchNPEvent(npEvent))
+ if (dispatchNPEvent(npEvent))
event->setDefaultHandled();
}
@@ -720,7 +720,7 @@
return;
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
- if (!dispatchNPEvent(npEvent))
+ if (dispatchNPEvent(npEvent))
event->setDefaultHandled();
#if !PLATFORM(QT) && !PLATFORM(WX) && !OS(WINCE)