Title: [230173] trunk/Source/WebCore
- Revision
- 230173
- Author
- rn...@webkit.org
- Date
- 2018-04-02 12:59:42 -0700 (Mon, 02 Apr 2018)
Log Message
REGRESSION(r228260):WebHTMLView beeps at every keydown for Chinese/Japanese/Korean Input Method
https://bugs.webkit.org/show_bug.cgi?id=184231
Reviewed by Alexey Proskuryakov.
The bug was caused by EventHandler::internalKeyEvent calling setDefaultHandled and expecting it to stay true
after dispatching the event even though m_defaultHandled is always cleared after r228260. This results in
EventHandler::internalKeyEvent returning false, and resulting in a beep.
Unfortunately, no new tests since there is no facility to detect this case in layout tests, and we can't
easily emulate or trigger a real input method in API tests.
* page/EventHandler.cpp:
(WebCore::EventHandler::internalKeyEvent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (230172 => 230173)
--- trunk/Source/WebCore/ChangeLog 2018-04-02 19:42:18 UTC (rev 230172)
+++ trunk/Source/WebCore/ChangeLog 2018-04-02 19:59:42 UTC (rev 230173)
@@ -1,3 +1,20 @@
+2018-04-02 Ryosuke Niwa <rn...@webkit.org>
+
+ REGRESSION(r228260):WebHTMLView beeps at every keydown for Chinese/Japanese/Korean Input Method
+ https://bugs.webkit.org/show_bug.cgi?id=184231
+
+ Reviewed by Alexey Proskuryakov.
+
+ The bug was caused by EventHandler::internalKeyEvent calling setDefaultHandled and expecting it to stay true
+ after dispatching the event even though m_defaultHandled is always cleared after r228260. This results in
+ EventHandler::internalKeyEvent returning false, and resulting in a beep.
+
+ Unfortunately, no new tests since there is no facility to detect this case in layout tests, and we can't
+ easily emulate or trigger a real input method in API tests.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::internalKeyEvent):
+
2018-04-02 Jer Noble <jer.no...@apple.com>
AudioBufferSourceNode start method causes OfflineAudioContext to start running
Modified: trunk/Source/WebCore/page/EventHandler.cpp (230172 => 230173)
--- trunk/Source/WebCore/page/EventHandler.cpp 2018-04-02 19:42:18 UTC (rev 230172)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2018-04-02 19:59:42 UTC (rev 230173)
@@ -3272,13 +3272,15 @@
keydown->stopPropagation();
element->dispatchEvent(keydown);
+ if (handledByInputMethod)
+ return true;
// If frame changed as a result of keydown dispatch, then return early to avoid sending a subsequent keypress message to the new frame.
bool changedFocusedFrame = m_frame.page() && &m_frame != &m_frame.page()->focusController().focusedOrMainFrame();
bool keydownResult = keydown->defaultHandled() || keydown->defaultPrevented() || changedFocusedFrame;
- if (handledByInputMethod || (keydownResult && !backwardCompatibilityMode))
+ if (keydownResult && !backwardCompatibilityMode)
return keydownResult;
-
+
// Focus may have changed during keydown handling, so refetch element.
// But if we are dispatching a fake backward compatibility keypress, then we pretend that the keypress happened on the original element.
if (!keydownResult) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes