<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[244932] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/244932">244932</a></dd>
<dt>Author</dt> <dd>dbates@webkit.org</dd>
<dt>Date</dt> <dd>2019-05-03 16:04:09 -0700 (Fri, 03 May 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Pass KeyboardEvent by reference in more places
https://bugs.webkit.org/show_bug.cgi?id=197480

Reviewed by Wenson Hsieh.

Source/WebCore:

* editing/Editor.cpp:
(WebCore::Editor::handleKeyboardEvent):
(WebCore::Editor::handleInputMethodKeydown):
* loader/EmptyClients.cpp:
* page/EditorClient.h:

Source/WebKit:

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::handleKeyboardEvent):
(WebKit::WebEditorClient::handleInputMethodKeydown):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::handleKeyboardEvent):
(WebKit::WebEditorClient::handleInputMethodKeydown):
* WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
(WebKit::WebEditorClient::handleKeyboardEvent):
(WebKit::WebEditorClient::handleInputMethodKeydown):
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::handleKeyboardEvent):
(WebKit::WebEditorClient::handleInputMethodKeydown):
* WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
(WebKit::WebEditorClient::handleKeyboardEvent):
(WebKit::WebEditorClient::handleInputMethodKeydown):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleEditingKeyboardEvent):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::handleEditingKeyboardEvent):
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::handleEditingKeyboardEvent):

Source/WebKitLegacy/mac:

* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::handleKeyboardEvent):
(WebEditorClient::handleInputMethodKeydown):

Source/WebKitLegacy/win:

* WebCoreSupport/WebEditorClient.cpp:
(WebEditorClient::handleKeyboardEvent):
(WebEditorClient::handleInputMethodKeydown):
* WebCoreSupport/WebEditorClient.h:
* WebView.cpp:
(WebView::handleEditingKeyboardEvent):
* WebView.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientscpp">trunk/Source/WebCore/loader/EmptyClients.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEditorClienth">trunk/Source/WebCore/page/EditorClient.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportWebEditorClientcpp">trunk/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportWebEditorClienth">trunk/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportgtkWebEditorClientGtkcpp">trunk/Source/WebKit/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportiosWebEditorClientIOSmm">trunk/Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportmacWebEditorClientMacmm">trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportwpeWebEditorClientWPEcpp">trunk/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageWebPageh">trunk/Source/WebKit/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPagemacWebPageMacmm">trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPagewinWebPageWincpp">trunk/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp</a></li>
<li><a href="#trunkSourceWebKitLegacymacChangeLog">trunk/Source/WebKitLegacy/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebCoreSupportWebEditorClienth">trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.h</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebCoreSupportWebEditorClientmm">trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm</a></li>
<li><a href="#trunkSourceWebKitLegacywinChangeLog">trunk/Source/WebKitLegacy/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitLegacywinWebCoreSupportWebEditorClientcpp">trunk/Source/WebKitLegacy/win/WebCoreSupport/WebEditorClient.cpp</a></li>
<li><a href="#trunkSourceWebKitLegacywinWebCoreSupportWebEditorClienth">trunk/Source/WebKitLegacy/win/WebCoreSupport/WebEditorClient.h</a></li>
<li><a href="#trunkSourceWebKitLegacywinWebViewcpp">trunk/Source/WebKitLegacy/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKitLegacywinWebViewh">trunk/Source/WebKitLegacy/win/WebView.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebCore/ChangeLog      2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2019-05-03  Daniel Bates  <dabates@apple.com>
+
+        Pass KeyboardEvent by reference in more places
+        https://bugs.webkit.org/show_bug.cgi?id=197480
+
+        Reviewed by Wenson Hsieh.
+
+        * editing/Editor.cpp:
+        (WebCore::Editor::handleKeyboardEvent):
+        (WebCore::Editor::handleInputMethodKeydown):
+        * loader/EmptyClients.cpp:
+        * page/EditorClient.h:
+
</ins><span class="cx"> 2019-05-03  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [iOS Sim Debug] ASSERTION FAILED The atomic string comes from an other thread! Layout Test imported/w3c/web-platform-tests/workers/WorkerNavigator_appName.htm is a flaky crash
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp  2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebCore/editing/Editor.cpp     2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -291,14 +291,14 @@
</span><span class="cx"> 
</span><span class="cx"> void Editor::handleKeyboardEvent(KeyboardEvent& event)
</span><span class="cx"> {
</span><del>-    if (EditorClient* c = client())
-        c->handleKeyboardEvent(&event);
</del><ins>+    if (auto* client = this->client())
+        client->handleKeyboardEvent(event);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Editor::handleInputMethodKeydown(KeyboardEvent& event)
</span><span class="cx"> {
</span><del>-    if (EditorClient* c = client())
-        c->handleInputMethodKeydown(&event);
</del><ins>+    if (auto* client = this->client())
+        client->handleInputMethodKeydown(event);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool Editor::handleTextEvent(TextEvent& event)
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.cpp     2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp        2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -201,8 +201,8 @@
</span><span class="cx">     void undo() final { }
</span><span class="cx">     void redo() final { }
</span><span class="cx"> 
</span><del>-    void handleKeyboardEvent(KeyboardEvent*) final { }
-    void handleInputMethodKeydown(KeyboardEvent*) final { }
</del><ins>+    void handleKeyboardEvent(KeyboardEvent&) final { }
+    void handleInputMethodKeydown(KeyboardEvent&) final { }
</ins><span class="cx"> 
</span><span class="cx">     void textFieldDidBeginEditing(Element*) final { }
</span><span class="cx">     void textFieldDidEndEditing(Element*) final { }
</span></span></pre></div>
<a id="trunkSourceWebCorepageEditorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EditorClient.h (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EditorClient.h 2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebCore/page/EditorClient.h    2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -119,8 +119,8 @@
</span><span class="cx">     virtual void undo() = 0;
</span><span class="cx">     virtual void redo() = 0;
</span><span class="cx"> 
</span><del>-    virtual void handleKeyboardEvent(KeyboardEvent*) = 0;
-    virtual void handleInputMethodKeydown(KeyboardEvent*) = 0;
</del><ins>+    virtual void handleKeyboardEvent(KeyboardEvent&) = 0;
+    virtual void handleInputMethodKeydown(KeyboardEvent&) = 0;
</ins><span class="cx">     
</span><span class="cx">     virtual void textFieldDidBeginEditing(Element*) = 0;
</span><span class="cx">     virtual void textFieldDidEndEditing(Element*) = 0;
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKit/ChangeLog       2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2019-05-03  Daniel Bates  <dabates@apple.com>
+
+        Pass KeyboardEvent by reference in more places
+        https://bugs.webkit.org/show_bug.cgi?id=197480
+
+        Reviewed by Wenson Hsieh.
+
+        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
+        (WebKit::WebEditorClient::handleKeyboardEvent):
+        (WebKit::WebEditorClient::handleInputMethodKeydown):
+        * WebProcess/WebCoreSupport/WebEditorClient.h:
+        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
+        (WebKit::WebEditorClient::handleKeyboardEvent):
+        (WebKit::WebEditorClient::handleInputMethodKeydown):
+        * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
+        (WebKit::WebEditorClient::handleKeyboardEvent):
+        (WebKit::WebEditorClient::handleInputMethodKeydown):
+        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
+        (WebKit::WebEditorClient::handleKeyboardEvent):
+        (WebKit::WebEditorClient::handleInputMethodKeydown):
+        * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
+        (WebKit::WebEditorClient::handleKeyboardEvent):
+        (WebKit::WebEditorClient::handleInputMethodKeydown):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::handleEditingKeyboardEvent):
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::handleEditingKeyboardEvent):
+        * WebProcess/WebPage/win/WebPageWin.cpp:
+        (WebKit::WebPage::handleEditingKeyboardEvent):
+
</ins><span class="cx"> 2019-05-03  Youenn Fablet  <youenn@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Enable Fetch Keep Alive by default
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportWebEditorClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp        2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp   2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -361,13 +361,13 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(WIN)
</span><del>-void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event)
</del><ins>+void WebEditorClient::handleKeyboardEvent(KeyboardEvent& event)
</ins><span class="cx"> {
</span><span class="cx">     if (m_page->handleEditingKeyboardEvent(event))
</span><del>-        event->setDefaultHandled();
</del><ins>+        event.setDefaultHandled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebEditorClient::handleInputMethodKeydown(KeyboardEvent*)
</del><ins>+void WebEditorClient::handleInputMethodKeydown(KeyboardEvent&)
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportWebEditorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.h (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.h  2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.h     2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -102,8 +102,8 @@
</span><span class="cx">     void undo() final;
</span><span class="cx">     void redo() final;
</span><span class="cx"> 
</span><del>-    void handleKeyboardEvent(WebCore::KeyboardEvent*) final;
-    void handleInputMethodKeydown(WebCore::KeyboardEvent*) final;
</del><ins>+    void handleKeyboardEvent(WebCore::KeyboardEvent&) final;
+    void handleInputMethodKeydown(WebCore::KeyboardEvent&) final;
</ins><span class="cx">     
</span><span class="cx">     void textFieldDidBeginEditing(WebCore::Element*) final;
</span><span class="cx">     void textFieldDidEndEditing(WebCore::Element*) final;
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportgtkWebEditorClientGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp 2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp    2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -52,9 +52,9 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event)
</del><ins>+void WebEditorClient::handleKeyboardEvent(KeyboardEvent& event)
</ins><span class="cx"> {
</span><del>-    auto* platformEvent = event->underlyingPlatformEvent();
</del><ins>+    auto* platformEvent = event.underlyingPlatformEvent();
</ins><span class="cx">     if (!platformEvent)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -62,8 +62,8 @@
</span><span class="cx">     if (platformEvent->handledByInputMethod())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    ASSERT(event->target());
-    auto* frame = downcast<Node>(event->target())->document().frame();
</del><ins>+    ASSERT(event.target());
+    auto* frame = downcast<Node>(event.target())->document().frame();
</ins><span class="cx">     ASSERT(frame);
</span><span class="cx"> 
</span><span class="cx">     const Vector<String> pendingEditorCommands = platformEvent->commands();
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">         // through the DOM first.
</span><span class="cx">         if (platformEvent->type() == PlatformEvent::RawKeyDown) {
</span><span class="cx">             if (executePendingEditorCommands(frame, pendingEditorCommands, false))
</span><del>-                event->setDefaultHandled();
</del><ins>+                event.setDefaultHandled();
</ins><span class="cx"> 
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Only allow text insertion commands if the current node is editable.
</span><span class="cx">         if (executePendingEditorCommands(frame, pendingEditorCommands, frame->editor().canEdit())) {
</span><del>-            event->setDefaultHandled();
</del><ins>+            event.setDefaultHandled();
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -93,11 +93,11 @@
</span><span class="cx">     // This is just a normal text insertion, so wait to execute the insertion
</span><span class="cx">     // until a keypress event happens. This will ensure that the insertion will not
</span><span class="cx">     // be reflected in the contents of the field until the keyup DOM event.
</span><del>-    if (event->type() != eventNames().keypressEvent)
</del><ins>+    if (event.type() != eventNames().keypressEvent)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Don't insert null or control characters as they can result in unexpected behaviour
</span><del>-    if (event->charCode() < ' ')
</del><ins>+    if (event.charCode() < ' ')
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Don't insert anything if a modifier is pressed
</span><span class="lines">@@ -104,15 +104,15 @@
</span><span class="cx">     if (platformEvent->controlKey() || platformEvent->altKey())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (frame->editor().insertText(platformEvent->text(), event))
-        event->setDefaultHandled();
</del><ins>+    if (frame->editor().insertText(platformEvent->text(), &event))
+        event.setDefaultHandled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebEditorClient::handleInputMethodKeydown(KeyboardEvent* event)
</del><ins>+void WebEditorClient::handleInputMethodKeydown(KeyboardEvent& event)
</ins><span class="cx"> {
</span><del>-    auto* platformEvent = event->underlyingPlatformEvent();
</del><ins>+    auto* platformEvent = event.underlyingPlatformEvent();
</ins><span class="cx">     if (platformEvent && platformEvent->handledByInputMethod())
</span><del>-        event->setDefaultHandled();
</del><ins>+        event.setDefaultHandled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::updateGlobalSelection(Frame* frame)
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportiosWebEditorClientIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm  2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm     2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -36,13 +36,13 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">     
</span><del>-void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event)
</del><ins>+void WebEditorClient::handleKeyboardEvent(KeyboardEvent& event)
</ins><span class="cx"> {
</span><span class="cx">     if (m_page->handleEditingKeyboardEvent(event))
</span><del>-        event->setDefaultHandled();
</del><ins>+        event.setDefaultHandled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebEditorClient::handleInputMethodKeydown(KeyboardEvent* event)
</del><ins>+void WebEditorClient::handleInputMethodKeydown(KeyboardEvent&)
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportmacWebEditorClientMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm  2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm     2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -45,16 +45,16 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">     
</span><del>-void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event)
</del><ins>+void WebEditorClient::handleKeyboardEvent(KeyboardEvent& event)
</ins><span class="cx"> {
</span><span class="cx">     if (m_page->handleEditingKeyboardEvent(event))
</span><del>-        event->setDefaultHandled();
</del><ins>+        event.setDefaultHandled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebEditorClient::handleInputMethodKeydown(KeyboardEvent* event)
</del><ins>+void WebEditorClient::handleInputMethodKeydown(KeyboardEvent& event)
</ins><span class="cx"> {
</span><del>-    if (event->handledByInputMethod())
-        event->setDefaultHandled();
</del><ins>+    if (event.handledByInputMethod())
+        event.setDefaultHandled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::setInsertionPasteboard(const String&)
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportwpeWebEditorClientWPEcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp 2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp    2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -205,15 +205,15 @@
</span><span class="cx">     event.setDefaultHandled();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebEditorClient::handleKeyboardEvent(WebCore::KeyboardEvent* event)
</del><ins>+void WebEditorClient::handleKeyboardEvent(WebCore::KeyboardEvent& event)
</ins><span class="cx"> {
</span><del>-    ASSERT(event->target());
-    auto* frame = downcast<Node>(event->target())->document().frame();
</del><ins>+    ASSERT(event.target());
+    auto* frame = downcast<Node>(event.target())->document().frame();
</ins><span class="cx">     ASSERT(frame);
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Reorder the checks in a more sensible way.
</span><span class="cx"> 
</span><del>-    auto* platformEvent = event->underlyingPlatformEvent();
</del><ins>+    auto* platformEvent = event.underlyingPlatformEvent();
</ins><span class="cx">     if (!platformEvent)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -228,17 +228,17 @@
</span><span class="cx">     // This is just a normal text insertion, so wait to execute the insertion
</span><span class="cx">     // until a keypress event happens. This will ensure that the insertion will not
</span><span class="cx">     // be reflected in the contents of the field until the keyup DOM event.
</span><del>-    if (event->type() == eventNames().keypressEvent)
-        return handleKeyPress(*frame, *event, *platformEvent);
-    if (event->type() == eventNames().keydownEvent)
-        return handleKeyDown(*frame, *event, *platformEvent);
</del><ins>+    if (event.type() == eventNames().keypressEvent)
+        return handleKeyPress(*frame, event, *platformEvent);
+    if (event.type() == eventNames().keydownEvent)
+        return handleKeyDown(*frame, event, *platformEvent);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebEditorClient::handleInputMethodKeydown(WebCore::KeyboardEvent* event)
</del><ins>+void WebEditorClient::handleInputMethodKeydown(WebCore::KeyboardEvent& event)
</ins><span class="cx"> {
</span><del>-    auto* platformEvent = event->underlyingPlatformEvent();
</del><ins>+    auto* platformEvent = event.underlyingPlatformEvent();
</ins><span class="cx">     if (platformEvent && platformEvent->windowsVirtualKeyCode() == VK_PROCESSKEY)
</span><del>-        event->preventDefault();
</del><ins>+        event.preventDefault();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h    2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -344,7 +344,7 @@
</span><span class="cx">     void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&);
</span><span class="cx"> 
</span><span class="cx">     // -- Called from WebCore clients.
</span><del>-    bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
</del><ins>+    bool handleEditingKeyboardEvent(WebCore::KeyboardEvent&);
</ins><span class="cx"> 
</span><span class="cx">     void didStartPageTransition();
</span><span class="cx">     void didCompletePageTransition();
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm    2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -414,9 +414,9 @@
</span><span class="cx">     return m_viewportConfiguration.allowsUserScaling();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* event)
</del><ins>+bool WebPage::handleEditingKeyboardEvent(KeyboardEvent& event)
</ins><span class="cx"> {
</span><del>-    auto* platformEvent = event->underlyingPlatformEvent();
</del><ins>+    auto* platformEvent = event.underlyingPlatformEvent();
</ins><span class="cx">     if (!platformEvent)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm 2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm    2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -275,14 +275,14 @@
</span><span class="cx">     return eventWasHandled;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* event)
</del><ins>+bool WebPage::handleEditingKeyboardEvent(KeyboardEvent& event)
</ins><span class="cx"> {
</span><del>-    Frame* frame = frameForEvent(event);
</del><ins>+    auto* frame = frameForEvent(&event);
</ins><span class="cx">     
</span><del>-    auto* platformEvent = event->underlyingPlatformEvent();
</del><ins>+    auto* platformEvent = event.underlyingPlatformEvent();
</ins><span class="cx">     if (!platformEvent)
</span><span class="cx">         return false;
</span><del>-    auto& commands = event->keypressCommands();
</del><ins>+    auto& commands = event.keypressCommands();
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(!platformEvent->macEvent()); // Cannot have a native event in WebProcess.
</span><span class="cx"> 
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx">     // If there are no text insertion commands, default keydown handler is the right time to execute the commands.
</span><span class="cx">     // Keypress (Char event) handler is the latest opportunity to execute.
</span><span class="cx">     if (!haveTextInsertionCommands || platformEvent->type() == PlatformEvent::Char) {
</span><del>-        eventWasHandled = executeKeypressCommandsInternal(commands, event);
</del><ins>+        eventWasHandled = executeKeypressCommandsInternal(commands, &event);
</ins><span class="cx">         commands.clear();
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPagewinWebPageWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp        2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp   2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -238,16 +238,16 @@
</span><span class="cx">     return mapKey ? keyPressCommandsMap->get(mapKey) : 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebPage::handleEditingKeyboardEvent(WebCore::KeyboardEvent* event)
</del><ins>+bool WebPage::handleEditingKeyboardEvent(WebCore::KeyboardEvent& event)
</ins><span class="cx"> {
</span><del>-    auto* frame = downcast<Node>(event->target())->document().frame();
</del><ins>+    auto* frame = downcast<Node>(event.target())->document().frame();
</ins><span class="cx">     ASSERT(frame);
</span><span class="cx"> 
</span><del>-    auto* keyEvent = event->underlyingPlatformEvent();
</del><ins>+    auto* keyEvent = event.underlyingPlatformEvent();
</ins><span class="cx">     if (!keyEvent || keyEvent->isSystemKey()) // Do not treat this as text input if it's a system key event.
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto command = frame->editor().command(interpretKeyEvent(event));
</del><ins>+    auto command = frame->editor().command(interpretKeyEvent(&event));
</ins><span class="cx"> 
</span><span class="cx">     if (keyEvent->type() == PlatformEvent::RawKeyDown) {
</span><span class="cx">         // WebKit doesn't have enough information about mode to decide
</span><span class="lines">@@ -256,17 +256,17 @@
</span><span class="cx">         // handle them immediately (e.g. Tab that changes focus) or
</span><span class="cx">         // let a keypress event be generated (e.g. Tab that inserts a
</span><span class="cx">         // Tab character, or Enter).
</span><del>-        return !command.isTextInsertion() && command.execute(event);
</del><ins>+        return !command.isTextInsertion() && command.execute(&event);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (command.execute(event))
</del><ins>+    if (command.execute(&event))
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     // Don't insert null or control characters as they can result in unexpected behaviour.
</span><del>-    if (event->charCode() < ' ')
</del><ins>+    if (event.charCode() < ' ')
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return frame->editor().insertText(keyEvent->text(), event);
</del><ins>+    return frame->editor().insertText(keyEvent->text(), &event);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/ChangeLog  2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog     2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2019-05-03  Daniel Bates  <dabates@apple.com>
+
+        Pass KeyboardEvent by reference in more places
+        https://bugs.webkit.org/show_bug.cgi?id=197480
+
+        Reviewed by Wenson Hsieh.
+
+        * WebCoreSupport/WebEditorClient.h:
+        * WebCoreSupport/WebEditorClient.mm:
+        (WebEditorClient::handleKeyboardEvent):
+        (WebEditorClient::handleInputMethodKeydown):
+
</ins><span class="cx"> 2019-05-02  Frederic Wang  <fwang@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [GTK][WPE] Disable "thin", "thick", "medium" values of mfrac@linethickness at runtime
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebCoreSupportWebEditorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.h (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.h   2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.h      2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -127,8 +127,8 @@
</span><span class="cx">     void undo() final;
</span><span class="cx">     void redo() final;
</span><span class="cx">     
</span><del>-    void handleKeyboardEvent(WebCore::KeyboardEvent*) final;
-    void handleInputMethodKeydown(WebCore::KeyboardEvent*) final;
</del><ins>+    void handleKeyboardEvent(WebCore::KeyboardEvent&) final;
+    void handleInputMethodKeydown(WebCore::KeyboardEvent&) final;
</ins><span class="cx"> 
</span><span class="cx">     void textFieldDidBeginEditing(WebCore::Element*) final;
</span><span class="cx">     void textFieldDidEndEditing(WebCore::Element*) final;
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebCoreSupportWebEditorClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm  2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm     2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -684,28 +684,28 @@
</span><span class="cx">         [[m_webView undoManager] redo];    
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event)
</del><ins>+void WebEditorClient::handleKeyboardEvent(KeyboardEvent& event)
</ins><span class="cx"> {
</span><del>-    auto* frame = downcast<Node>(event->target())->document().frame();
</del><ins>+    auto* frame = downcast<Node>(event.target())->document().frame();
</ins><span class="cx"> #if !PLATFORM(IOS_FAMILY)
</span><span class="cx">     WebHTMLView *webHTMLView = (WebHTMLView *)[[kit(frame) frameView] documentView];
</span><del>-    if ([webHTMLView _interpretKeyEvent:event savingCommands:NO])
-        event->setDefaultHandled();
</del><ins>+    if ([webHTMLView _interpretKeyEvent:&event savingCommands:NO])
+        event.setDefaultHandled();
</ins><span class="cx"> #else
</span><span class="cx">     WebHTMLView *webHTMLView = (WebHTMLView *)[[kit(frame) frameView] documentView];
</span><del>-    if ([webHTMLView _handleEditingKeyEvent:event])
-        event->setDefaultHandled();
</del><ins>+    if ([webHTMLView _handleEditingKeyEvent:&event])
+        event.setDefaultHandled();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebEditorClient::handleInputMethodKeydown(KeyboardEvent* event)
</del><ins>+void WebEditorClient::handleInputMethodKeydown(KeyboardEvent& event)
</ins><span class="cx"> {
</span><span class="cx"> #if !PLATFORM(IOS_FAMILY)
</span><span class="cx">     // FIXME: Switch to WebKit2 model, interpreting the event before it's sent down to WebCore.
</span><del>-    auto* frame = downcast<Node>(event->target())->document().frame();
</del><ins>+    auto* frame = downcast<Node>(event.target())->document().frame();
</ins><span class="cx">     WebHTMLView *webHTMLView = (WebHTMLView *)[[kit(frame) frameView] documentView];
</span><del>-    if ([webHTMLView _interpretKeyEvent:event savingCommands:YES])
-        event->setDefaultHandled();
</del><ins>+    if ([webHTMLView _interpretKeyEvent:&event savingCommands:YES])
+        event.setDefaultHandled();
</ins><span class="cx"> #else
</span><span class="cx">     // iOS does not use input manager this way
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitLegacywinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/win/ChangeLog (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/win/ChangeLog  2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKitLegacy/win/ChangeLog     2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2019-05-03  Daniel Bates  <dabates@apple.com>
+
+        Pass KeyboardEvent by reference in more places
+        https://bugs.webkit.org/show_bug.cgi?id=197480
+
+        Reviewed by Wenson Hsieh.
+
+        * WebCoreSupport/WebEditorClient.cpp:
+        (WebEditorClient::handleKeyboardEvent):
+        (WebEditorClient::handleInputMethodKeydown):
+        * WebCoreSupport/WebEditorClient.h:
+        * WebView.cpp:
+        (WebView::handleEditingKeyboardEvent):
+        * WebView.h:
+
</ins><span class="cx"> 2019-05-02  Frederic Wang  <fwang@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [GTK][WPE] Disable "thin", "thick", "medium" values of mfrac@linethickness at runtime
</span></span></pre></div>
<a id="trunkSourceWebKitLegacywinWebCoreSupportWebEditorClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebEditorClient.cpp (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebEditorClient.cpp 2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebEditorClient.cpp    2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -715,13 +715,13 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebEditorClient::handleKeyboardEvent(KeyboardEvent* evt)
</del><ins>+void WebEditorClient::handleKeyboardEvent(KeyboardEvent& event)
</ins><span class="cx"> {
</span><del>-    if (m_webView->handleEditingKeyboardEvent(evt))
-        evt->setDefaultHandled();
</del><ins>+    if (m_webView->handleEditingKeyboardEvent(event))
+        event.setDefaultHandled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebEditorClient::handleInputMethodKeydown(KeyboardEvent* )
</del><ins>+void WebEditorClient::handleInputMethodKeydown(KeyboardEvent&)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitLegacywinWebCoreSupportWebEditorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebEditorClient.h (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebEditorClient.h   2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebEditorClient.h      2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -95,8 +95,8 @@
</span><span class="cx">     void textDidChangeInTextArea(WebCore::Element*) final;
</span><span class="cx">     void overflowScrollPositionChanged() final { }
</span><span class="cx"> 
</span><del>-    void handleKeyboardEvent(WebCore::KeyboardEvent*) final;
-    void handleInputMethodKeydown(WebCore::KeyboardEvent*) final;
</del><ins>+    void handleKeyboardEvent(WebCore::KeyboardEvent&) final;
+    void handleInputMethodKeydown(WebCore::KeyboardEvent&) final;
</ins><span class="cx"> 
</span><span class="cx">     bool shouldEraseMarkersAfterChangeSelection(WebCore::TextCheckingType) const final;
</span><span class="cx">     void ignoreWordInSpellDocument(const WTF::String&) final;
</span></span></pre></div>
<a id="trunkSourceWebKitLegacywinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/win/WebView.cpp        2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp   2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -2356,32 +2356,32 @@
</span><span class="cx">     return mapKey ? keyPressCommandsMap->get(mapKey) : 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebView::handleEditingKeyboardEvent(KeyboardEvent* evt)
</del><ins>+bool WebView::handleEditingKeyboardEvent(KeyboardEvent& event)
</ins><span class="cx"> {
</span><del>-    auto* frame = downcast<Node>(evt->target())->document().frame();
</del><ins>+    auto* frame = downcast<Node>(event.target())->document().frame();
</ins><span class="cx">     ASSERT(frame);
</span><span class="cx"> 
</span><del>-    auto* keyEvent = evt->underlyingPlatformEvent();
</del><ins>+    auto* keyEvent = event.underlyingPlatformEvent();
</ins><span class="cx">     if (!keyEvent || keyEvent->isSystemKey())  // do not treat this as text input if it's a system key event
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto command = frame->editor().command(interpretKeyEvent(evt));
</del><ins>+    auto command = frame->editor().command(interpretKeyEvent(&event));
</ins><span class="cx"> 
</span><span class="cx">     if (keyEvent->type() == PlatformEvent::RawKeyDown) {
</span><span class="cx">         // WebKit doesn't have enough information about mode to decide how commands that just insert text if executed via Editor should be treated,
</span><span class="cx">         // so we leave it upon WebCore to either handle them immediately (e.g. Tab that changes focus) or let a keypress event be generated
</span><span class="cx">         // (e.g. Tab that inserts a Tab character, or Enter).
</span><del>-        return !command.isTextInsertion() && command.execute(evt);
</del><ins>+        return !command.isTextInsertion() && command.execute(&event);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (command.execute(evt))
</del><ins>+    if (command.execute(&event))
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     // Don't insert null or control characters as they can result in unexpected behaviour
</span><del>-    if (evt->charCode() < ' ')
</del><ins>+    if (event.charCode() < ' ')
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return frame->editor().insertText(keyEvent->text(), evt);
</del><ins>+    return frame->editor().insertText(keyEvent->text(), &event);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebView::keyDown(WPARAM virtualKeyCode, LPARAM keyData, bool systemKeyDown)
</span></span></pre></div>
<a id="trunkSourceWebKitLegacywinWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/win/WebView.h (244931 => 244932)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/win/WebView.h  2019-05-03 22:43:03 UTC (rev 244931)
+++ trunk/Source/WebKitLegacy/win/WebView.h     2019-05-03 23:04:09 UTC (rev 244932)
</span><span class="lines">@@ -473,7 +473,7 @@
</span><span class="cx">     bool isBeingDestroyed() const { return m_isBeingDestroyed; }
</span><span class="cx"> 
</span><span class="cx">     const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
</span><del>-    bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
</del><ins>+    bool handleEditingKeyboardEvent(WebCore::KeyboardEvent&);
</ins><span class="cx"> 
</span><span class="cx">     bool isPainting() const { return m_paintCount > 0; }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>