Title: [120329] trunk/Source/WebKit2
- Revision
- 120329
- Author
- kl...@webkit.org
- Date
- 2012-06-14 08:52:28 -0700 (Thu, 14 Jun 2012)
Log Message
Chinese IM receives incorrect/duplicated key events in text fields in webpages in Safari.
<http://webkit.org/b/89048>
<rdar://problem/11449702>
Reviewed by Darin Adler.
Send the DidReceiveEvent message with the DispatchMessageEvenWhenWaitingForSyncReply flag
for keyboard events. This ensures that it always arrives before the corresponding synchronous
InterpretQueuedKeyEvent message.
The problem was that we relied on DidReceiveEvent / InterpretQueuedKeyEvent always arriving in
the same order they were sent. This was not always true, since DidReceiveEvent (async) would
get deferred during an unrelated waitForSyncReply() whereas InterpretQueuedKeyEvent (sync)
gets dispatched right away.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::keyEvent):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (120328 => 120329)
--- trunk/Source/WebKit2/ChangeLog 2012-06-14 15:39:34 UTC (rev 120328)
+++ trunk/Source/WebKit2/ChangeLog 2012-06-14 15:52:28 UTC (rev 120329)
@@ -1,3 +1,23 @@
+2012-06-13 Andreas Kling <kl...@webkit.org>
+
+ Chinese IM receives incorrect/duplicated key events in text fields in webpages in Safari.
+ <http://webkit.org/b/89048>
+ <rdar://problem/11449702>
+
+ Reviewed by Darin Adler.
+
+ Send the DidReceiveEvent message with the DispatchMessageEvenWhenWaitingForSyncReply flag
+ for keyboard events. This ensures that it always arrives before the corresponding synchronous
+ InterpretQueuedKeyEvent message.
+
+ The problem was that we relied on DidReceiveEvent / InterpretQueuedKeyEvent always arriving in
+ the same order they were sent. This was not always true, since DidReceiveEvent (async) would
+ get deferred during an unrelated waitForSyncReply() whereas InterpretQueuedKeyEvent (sync)
+ gets dispatched right away.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::keyEvent):
+
2012-06-14 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] Add input methods submenu item to the default context menu for editable content
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (120328 => 120329)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-06-14 15:39:34 UTC (rev 120328)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-06-14 15:52:28 UTC (rev 120329)
@@ -1423,7 +1423,9 @@
if (!handled)
handled = performDefaultBehaviorForKeyEvent(keyboardEvent);
- send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(keyboardEvent.type()), handled));
+ // The receiving end relies on DidReceiveEvent and InterpretQueuedKeyEvent arriving in the same order they are sent
+ // (for keyboard events.) We set the DispatchMessageEvenWhenWaitingForSyncReply flag to ensure consistent ordering.
+ connection()->send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(keyboardEvent.type()), handled), m_pageID, CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply);
}
void WebPage::keyEventSyncForTesting(const WebKeyboardEvent& keyboardEvent, bool& handled)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes