Title: [152627] trunk/Source/WebKit2
Revision
152627
Author
commit-qu...@webkit.org
Date
2013-07-15 01:49:48 -0700 (Mon, 15 Jul 2013)

Log Message

[GTK] [WK2] Check if the keyEventQueue is empty in WebPageProxy::getEditorCommandsForKeyEvent
https://bugs.webkit.org/show_bug.cgi?id=118530

Patch by Simon Pena <simon.p...@samsung.com> on 2013-07-15
Reviewed by Carlos Garcia Campos.

When a key event is started in the WebProcess (e.g. in the inspector)
it doesn't have an associated GdkEvent queued. Adding a check in
WebPageProxy::getEditorCommandsForKeyEvent ensures there's always a queued
key event to process.

In GTK-WK2, inspector-protocol/input/dispatchKeyEvent.html no longer crashes once
this fix is in place.

* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::getEditorCommandsForKeyEvent): Ensure m_keyEventQueue is
not empty.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (152626 => 152627)


--- trunk/Source/WebKit2/ChangeLog	2013-07-15 08:14:18 UTC (rev 152626)
+++ trunk/Source/WebKit2/ChangeLog	2013-07-15 08:49:48 UTC (rev 152627)
@@ -1,3 +1,22 @@
+2013-07-15  Simon Pena  <simon.p...@samsung.com>
+
+        [GTK] [WK2] Check if the keyEventQueue is empty in WebPageProxy::getEditorCommandsForKeyEvent
+        https://bugs.webkit.org/show_bug.cgi?id=118530
+
+        Reviewed by Carlos Garcia Campos.
+
+        When a key event is started in the WebProcess (e.g. in the inspector)
+        it doesn't have an associated GdkEvent queued. Adding a check in 
+        WebPageProxy::getEditorCommandsForKeyEvent ensures there's always a queued
+        key event to process.
+
+        In GTK-WK2, inspector-protocol/input/dispatchKeyEvent.html no longer crashes once
+        this fix is in place. 
+
+        * UIProcess/gtk/WebPageProxyGtk.cpp:
+        (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): Ensure m_keyEventQueue is
+        not empty.
+
 2013-07-15  Alberto Garcia  <be...@igalia.com>
 
         [WK2][GTK] SIGSEV in webkitWebViewBaseSizeAllocate

Modified: trunk/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp (152626 => 152627)


--- trunk/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp	2013-07-15 08:14:18 UTC (rev 152626)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp	2013-07-15 08:49:48 UTC (rev 152627)
@@ -50,7 +50,10 @@
 
 void WebPageProxy::getEditorCommandsForKeyEvent(const AtomicString& eventType, Vector<WTF::String>& commandsList)
 {
-    m_pageClient->getEditorCommandsForKeyEvent(m_keyEventQueue.first(), eventType, commandsList);
+    // When the keyboard event is started in the WebProcess side (e.g. from the Inspector)
+    // it will arrive without a GdkEvent associated, so the keyEventQueue will be empty.
+    if (!m_keyEventQueue.isEmpty())
+        m_pageClient->getEditorCommandsForKeyEvent(m_keyEventQueue.first(), eventType, commandsList);
 }
 
 void WebPageProxy::bindAccessibilityTree(const String& plugID)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to