Changeset 228351 in webkit


Ignore:
Timestamp:
Feb 9, 2018 8:44:39 PM (6 years ago)
Author:
Ross Kirsling
Message:

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.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r228350 r228351  
     12018-02-09  Ross Kirsling  <ross.kirsling@sony.com>
     2
     3        Remove invalidated WebPage::handleEditingKeyboardEvent default implementation after r228260.
     4        https://bugs.webkit.org/show_bug.cgi?id=182663
     5
     6        Reviewed by Chris Dumez.
     7
     8        This would need to be updated to turn `keyEvent` into `underlyingPlatformEvent`;
     9        instead, we can remove it, as it's only for Windows, which doesn't yet support WK2.
     10
     11        * WebProcess/WebPage/WebPage.cpp:
     12        (WebKit::WebPage::handleEditingKeyboardEvent): Deleted.
     13
    1142018-02-09  Nan Wang  <n_wang@apple.com>
    215
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r228260 r228351  
    32983298}
    32993299
    3300 #if !PLATFORM(GTK) && !PLATFORM(COCOA) && !PLATFORM(WPE)
    3301 
    3302 bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* evt)
    3303 {
    3304     Frame* frame = downcast<Node>(*evt->target()).document().frame();
    3305     ASSERT(frame);
    3306 
    3307     const PlatformKeyboardEvent* keyEvent = evt->keyEvent();
    3308     if (!keyEvent)
    3309         return false;
    3310 
    3311     Editor::Command command = frame->editor().command(interpretKeyEvent(evt));
    3312 
    3313     if (keyEvent->type() == PlatformEvent::RawKeyDown) {
    3314         // WebKit doesn't have enough information about mode to decide how commands that just insert text if executed via Editor should be treated,
    3315         // so we leave it upon WebCore to either handle them immediately (e.g. Tab that changes focus) or let a keypress event be generated
    3316         // (e.g. Tab that inserts a Tab character, or Enter).
    3317         return !command.isTextInsertion() && command.execute(evt);
    3318     }
    3319 
    3320     if (command.execute(evt))
    3321         return true;
    3322 
    3323     // Don't allow text insertion for nodes that cannot edit.
    3324     if (!frame->editor().canEdit())
    3325         return false;
    3326 
    3327     // Don't insert null or control characters as they can result in unexpected behaviour
    3328     if (evt->charCode() < ' ')
    3329         return false;
    3330 
    3331     return frame->editor().insertText(evt->keyEvent()->text(), evt);
    3332 }
    3333 
    3334 #endif
    3335 
    33363300#if ENABLE(DRAG_SUPPORT)
    33373301
Note: See TracChangeset for help on using the changeset viewer.