summaryrefslogtreecommitdiff
path: root/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp')
-rw-r--r--Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp27
1 files changed, 4 insertions, 23 deletions
diff --git a/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp b/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp
index 3c3ae0ce8..d25320125 100644
--- a/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp
+++ b/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp
@@ -14,7 +14,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -39,7 +39,7 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <wtf/StdLibExtras.h>
-#include <wtf/glib/GUniquePtr.h>
+#include <wtf/gobject/GUniquePtr.h>
#include <wtf/text/WTFString.h>
namespace WTR {
@@ -162,17 +162,8 @@ void EventSenderProxy::updateClickCountForButton(int button)
m_clickButton = button;
}
-void EventSenderProxy::dispatchEvent(GdkEvent* event)
+static void dispatchEvent(GdkEvent* event)
{
- ASSERT(m_testController->mainWebView());
-
- // If we are sending an escape key to the WebView, this has the side-effect of dismissing
- // any current popups anyway. Chances are that the test is doing this to dismiss the popup
- // anyway. Not all tests properly dismiss popup menus, so we still need to do it manually
- // if this isn't an escape key press.
- if (event->type != GDK_KEY_PRESS || event->key.keyval != GDK_KEY_Escape)
- m_testController->mainWebView()->dismissAllPopupMenus();
-
gtk_main_do_event(event);
gdk_event_free(event);
}
@@ -286,8 +277,6 @@ int getGDKKeySymForKeyRef(WKStringRef keyRef, unsigned location, guint* modifier
return GDK_KEY_Tab;
if (charCode == '\x8')
return GDK_KEY_BackSpace;
- if (charCode == 0x001B)
- return GDK_KEY_Escape;
if (WTF::isASCIIUpper(charCode))
*modifiers |= GDK_SHIFT_MASK;
@@ -444,13 +433,6 @@ void EventSenderProxy::continuousMouseScrollBy(int horizontal, int vertical, boo
sendOrQueueEvent(event);
}
-void EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases(int x, int y, int /*phase*/, int /*momentum*/)
-{
- // Gtk+ does not have the concept of wheel gesture phases or momentum. Just relay to
- // the mouse wheel handler.
- mouseScrollBy(x, y);
-}
-
void EventSenderProxy::leapForward(int milliseconds)
{
if (m_eventQueue.isEmpty())
@@ -484,7 +466,6 @@ GUniquePtr<GdkEvent> EventSenderProxy::createTouchEvent(GdkEventType eventType,
return touchEvent;
}
-#if ENABLE(TOUCH_EVENTS)
void EventSenderProxy::addTouchPoint(int x, int y)
{
// Touch ID is array index plus one, so 0 is skipped.
@@ -575,6 +556,6 @@ void EventSenderProxy::setTouchModifier(WKEventModifiers modifier, bool enable)
m_updatedTouchEvents.add(GPOINTER_TO_INT(event->touch.sequence));
}
}
-#endif // ENABLE(TOUCH_EVENTS)
+
} // namespace WTR