Remove invalidated WebPage::handleEditingKeyboardEvent default implementation after...
authorross.kirsling@sony.com <ross.kirsling@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Feb 2018 04:44:39 +0000 (04:44 +0000)
committerross.kirsling@sony.com <ross.kirsling@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Feb 2018 04:44:39 +0000 (04:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182663

Reviewed by Chris Dumez.

This would need to be updated to turn `keyEvent` into `underlyingPlatformEvent`;
instead, we can remove it, as it's only for Windows, which doesn't yet support WK2.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::handleEditingKeyboardEvent): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228351 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/WebPage.cpp

index fa9d010..d624e9c 100644 (file)
@@ -1,3 +1,16 @@
+2018-02-09  Ross Kirsling  <ross.kirsling@sony.com>
+
+        Remove invalidated WebPage::handleEditingKeyboardEvent default implementation after r228260.
+        https://bugs.webkit.org/show_bug.cgi?id=182663
+
+        Reviewed by Chris Dumez.
+
+        This would need to be updated to turn `keyEvent` into `underlyingPlatformEvent`;
+        instead, we can remove it, as it's only for Windows, which doesn't yet support WK2.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::handleEditingKeyboardEvent): Deleted.
+
 2018-02-09  Nan Wang  <n_wang@apple.com>
 
         AX: Accessibility is not notified when a web process cancels the suspension
index e35006b..ce07ab5 100644 (file)
@@ -3297,42 +3297,6 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
     return m_notificationPermissionRequestManager.get();
 }
 
-#if !PLATFORM(GTK) && !PLATFORM(COCOA) && !PLATFORM(WPE)
-
-bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* evt)
-{
-    Frame* frame = downcast<Node>(*evt->target()).document().frame();
-    ASSERT(frame);
-
-    const PlatformKeyboardEvent* keyEvent = evt->keyEvent();
-    if (!keyEvent)
-        return false;
-
-    Editor::Command command = frame->editor().command(interpretKeyEvent(evt));
-
-    if (keyEvent->type() == PlatformEvent::RawKeyDown) {
-        // WebKit doesn't have enough information about mode to decide how commands that just insert text if executed via Editor should be treated,
-        // so we leave it upon WebCore to either handle them immediately (e.g. Tab that changes focus) or let a keypress event be generated
-        // (e.g. Tab that inserts a Tab character, or Enter).
-        return !command.isTextInsertion() && command.execute(evt);
-    }
-
-    if (command.execute(evt))
-        return true;
-
-    // Don't allow text insertion for nodes that cannot edit.
-    if (!frame->editor().canEdit())
-        return false;
-
-    // Don't insert null or control characters as they can result in unexpected behaviour
-    if (evt->charCode() < ' ')
-        return false;
-
-    return frame->editor().insertText(evt->keyEvent()->text(), evt);
-}
-
-#endif
-
 #if ENABLE(DRAG_SUPPORT)
 
 #if PLATFORM(GTK)