Title: [121638] branches/safari-536-branch/Source/WebKit2

Diff

Modified: branches/safari-536-branch/Source/WebKit2/ChangeLog (121637 => 121638)


--- branches/safari-536-branch/Source/WebKit2/ChangeLog	2012-07-01 22:34:57 UTC (rev 121637)
+++ branches/safari-536-branch/Source/WebKit2/ChangeLog	2012-07-01 22:37:19 UTC (rev 121638)
@@ -1,5 +1,10 @@
 2012-06-25  Lucas Forschler  <[email protected]>
 
+    Rollout 121167 from branch.
+    This is 121113 on trunk.
+
+2012-06-25  Lucas Forschler  <[email protected]>
+
     Rollout 121168 from branch.  
     This is 121138 from trunk.
 

Modified: branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp (121637 => 121638)


--- branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-07-01 22:34:57 UTC (rev 121637)
+++ branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-07-01 22:37:19 UTC (rev 121638)
@@ -3063,42 +3063,6 @@
     m_pageClient->setCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves);
 }
 
-void WebPageProxy::didReceiveKeyEvent(uint32_t opaqueType, bool handled)
-{
-    process()->responsivenessTimer()->stop();
-
-    WebEvent::Type type = static_cast<WebEvent::Type>(opaqueType);
-
-    switch (type) {
-    case WebEvent::KeyDown:
-    case WebEvent::KeyUp:
-    case WebEvent::RawKeyDown:
-    case WebEvent::Char: {
-        LOG(KeyHandling, "WebPageProxy::didReceiveEvent: %s", webKeyboardEventTypeString(type));
-
-        NativeWebKeyboardEvent event = m_keyEventQueue.first();
-        MESSAGE_CHECK(type == event.type());
-
-        m_keyEventQueue.removeFirst();
-
-        m_pageClient->doneWithKeyEvent(event, handled);
-
-        if (handled)
-            break;
-
-        if (m_uiClient.implementsDidNotHandleKeyEvent())
-            m_uiClient.didNotHandleKeyEvent(this, event);
-#if PLATFORM(WIN)
-        else
-            ::TranslateMessage(event.nativeEvent());
-#endif
-        break;
-    }
-    default:
-        ASSERT_NOT_REACHED();
-    }
-}
-
 void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
 {
     WebEvent::Type type = static_cast<WebEvent::Type>(opaqueType);
@@ -3111,6 +3075,10 @@
     case WebEvent::MouseDown:
     case WebEvent::MouseUp:
     case WebEvent::Wheel:
+    case WebEvent::KeyDown:
+    case WebEvent::KeyUp:
+    case WebEvent::RawKeyDown:
+    case WebEvent::Char:
 #if ENABLE(GESTURE_EVENTS)
     case WebEvent::GestureScrollBegin:
     case WebEvent::GestureScrollEnd:
@@ -3124,8 +3092,6 @@
 #endif
         process()->responsivenessTimer()->stop();
         break;
-    default:
-        ASSERT_NOT_REACHED();
     }
 
     switch (type) {
@@ -3170,6 +3136,30 @@
         break;
     }
 
+    case WebEvent::KeyDown:
+    case WebEvent::KeyUp:
+    case WebEvent::RawKeyDown:
+    case WebEvent::Char: {
+        LOG(KeyHandling, "WebPageProxy::didReceiveEvent: %s", webKeyboardEventTypeString(type));
+
+        NativeWebKeyboardEvent event = m_keyEventQueue.first();
+        MESSAGE_CHECK(type == event.type());
+
+        m_keyEventQueue.removeFirst();
+
+        m_pageClient->doneWithKeyEvent(event, handled);
+
+        if (handled)
+            break;
+
+        if (m_uiClient.implementsDidNotHandleKeyEvent())
+            m_uiClient.didNotHandleKeyEvent(this, event);
+#if PLATFORM(WIN)
+        else
+            ::TranslateMessage(event.nativeEvent());
+#endif
+        break;
+    }
 #if ENABLE(TOUCH_EVENTS)
     case WebEvent::TouchStart:
     case WebEvent::TouchMove:
@@ -3187,8 +3177,6 @@
         break;
     }
 #endif
-    default:
-        ASSERT_NOT_REACHED();
     }
 }
 

Modified: branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.h (121637 => 121638)


--- branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.h	2012-07-01 22:34:57 UTC (rev 121637)
+++ branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.h	2012-07-01 22:37:19 UTC (rev 121638)
@@ -853,7 +853,6 @@
     void setCursorHiddenUntilMouseMoves(bool);
 
     void didReceiveEvent(uint32_t opaqueType, bool handled);
-    void didReceiveKeyEvent(uint32_t opaqueType, bool handled);
     void stopResponsivenessTimer();
 
     void voidCallback(uint64_t);

Modified: branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (121637 => 121638)


--- branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2012-07-01 22:34:57 UTC (rev 121637)
+++ branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2012-07-01 22:37:19 UTC (rev 121638)
@@ -33,7 +33,6 @@
     UnavailablePluginButtonClicked(uint32_t pluginUnavailabilityReason, WTF::String mimeType, WTF::String url, WTF::String pluginsPageURL)
     DidChangeViewportProperties(WebCore::ViewportAttributes attributes)
     DidReceiveEvent(uint32_t type, bool handled)
-    DidReceiveKeyEvent(uint32_t type, bool handled) -> ()
     StopResponsivenessTimer()
     SetCursor(WebCore::Cursor cursor)
     SetCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)

Modified: branches/safari-536-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (121637 => 121638)


--- branches/safari-536-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-07-01 22:34:57 UTC (rev 121637)
+++ branches/safari-536-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-07-01 22:37:19 UTC (rev 121638)
@@ -1411,7 +1411,9 @@
     if (!handled)
         handled = performDefaultBehaviorForKeyEvent(keyboardEvent);
 
-    sendSync(Messages::WebPageProxy::DidReceiveKeyEvent(static_cast<uint32_t>(keyboardEvent.type()), handled), Messages::WebPageProxy::DidReceiveKeyEvent::Reply());
+    // 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
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to