From 980c55b262f11460601420cd29244bb4a8e2b0a9 Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Mon, 2 Jul 2012 09:31:11 +0000 Subject: [PATCH] Unreviewed, rolling out r120329, r121113, and r121138. http://trac.webkit.org/changeset/120329 http://trac.webkit.org/changeset/121113 http://trac.webkit.org/changeset/121138 https://bugs.webkit.org/show_bug.cgi?id=90368 Introduced noticeable keyboard-related spins due to synchronous IPC. (Requested by kling on #webkit). Patch by Sheriff Bot on 2012-07-02 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleKeyboardEvent): (WebKit::WebPageProxy::didReceiveEvent): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyEvent): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121665 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebKit2/ChangeLog | 20 +++++++ Source/WebKit2/UIProcess/WebPageProxy.cpp | 70 ++++++++++------------- Source/WebKit2/UIProcess/WebPageProxy.h | 1 - Source/WebKit2/UIProcess/WebPageProxy.messages.in | 1 - Source/WebKit2/WebProcess/WebPage/WebPage.cpp | 2 +- 5 files changed, 50 insertions(+), 44 deletions(-) diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 9515a2d..03a464c 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,23 @@ +2012-07-02 Sheriff Bot + + Unreviewed, rolling out r120329, r121113, and r121138. + http://trac.webkit.org/changeset/120329 + http://trac.webkit.org/changeset/121113 + http://trac.webkit.org/changeset/121138 + https://bugs.webkit.org/show_bug.cgi?id=90368 + + Introduced noticeable keyboard-related spins due to + synchronous IPC. (Requested by kling on #webkit). + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::handleKeyboardEvent): + (WebKit::WebPageProxy::didReceiveEvent): + * UIProcess/WebPageProxy.h: + (WebPageProxy): + * UIProcess/WebPageProxy.messages.in: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::keyEvent): + 2012-07-01 Christophe Dumez [EFL][WK2] Add API to inspect a Web Intent diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp index d6039d7..85709ef 100644 --- a/Source/WebKit2/UIProcess/WebPageProxy.cpp +++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp @@ -1135,7 +1135,7 @@ void WebPageProxy::handleKeyboardEvent(const NativeWebKeyboardEvent& event) if (m_shouldSendEventsSynchronously) { bool handled = false; process()->sendSync(Messages::WebPage::KeyEventSyncForTesting(event), Messages::WebPage::KeyEventSyncForTesting::Reply(handled), m_pageID); - didReceiveKeyEvent(event.type(), handled); + didReceiveEvent(event.type(), handled); } else process()->send(Messages::WebPage::KeyEvent(event), m_pageID); } @@ -3159,42 +3159,6 @@ void WebPageProxy::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves) m_pageClient->setCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves); } -void WebPageProxy::didReceiveKeyEvent(uint32_t opaqueType, bool handled) -{ - process()->responsivenessTimer()->stop(); - - WebEvent::Type type = static_cast(opaqueType); - - switch (type) { - case WebEvent::KeyDown: - case WebEvent::KeyUp: - case WebEvent::RawKeyDown: - case WebEvent::Char: { - LOG(KeyHandling, "WebPageProxy::didReceiveKeyEvent: %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(opaqueType); @@ -3207,6 +3171,10 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled) 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: @@ -3220,8 +3188,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled) #endif process()->responsivenessTimer()->stop(); break; - default: - ASSERT_NOT_REACHED(); } switch (type) { @@ -3266,6 +3232,30 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled) 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: @@ -3283,8 +3273,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled) break; } #endif - default: - ASSERT_NOT_REACHED(); } } diff --git a/Source/WebKit2/UIProcess/WebPageProxy.h b/Source/WebKit2/UIProcess/WebPageProxy.h index 3c1b412..57ab86c 100644 --- a/Source/WebKit2/UIProcess/WebPageProxy.h +++ b/Source/WebKit2/UIProcess/WebPageProxy.h @@ -917,7 +917,6 @@ private: void setCursorHiddenUntilMouseMoves(bool); void didReceiveEvent(uint32_t opaqueType, bool handled); - void didReceiveKeyEvent(uint32_t opaqueType, bool handled); void stopResponsivenessTimer(); void voidCallback(uint64_t); diff --git a/Source/WebKit2/UIProcess/WebPageProxy.messages.in b/Source/WebKit2/UIProcess/WebPageProxy.messages.in index a098ea6..0341276 100644 --- a/Source/WebKit2/UIProcess/WebPageProxy.messages.in +++ b/Source/WebKit2/UIProcess/WebPageProxy.messages.in @@ -33,7 +33,6 @@ messages -> WebPageProxy { 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) diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp index 40f6ee4..328422e 100644 --- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp +++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp @@ -1439,7 +1439,7 @@ void WebPage::keyEvent(const WebKeyboardEvent& keyboardEvent) if (!handled) handled = performDefaultBehaviorForKeyEvent(keyboardEvent); - sendSync(Messages::WebPageProxy::DidReceiveKeyEvent(static_cast(keyboardEvent.type()), handled), Messages::WebPageProxy::DidReceiveKeyEvent::Reply()); + send(Messages::WebPageProxy::DidReceiveEvent(static_cast(keyboardEvent.type()), handled)); } void WebPage::keyEventSyncForTesting(const WebKeyboardEvent& keyboardEvent, bool& handled) -- 2.7.4