Changeset 244975 in webkit


Ignore:
Timestamp:
May 6, 2019 1:41:02 PM (5 years ago)
Author:
dbates@webkit.org
Message:

Google Docs & Yahoo! Japan: Can’t compose characters with Chinese or Japanese keyboard
https://bugs.webkit.org/show_bug.cgi?id=197474
<rdar://problem/47219324>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Fix up some #if defs to compile more Mac code when building on iOS.

  • dom/KeyboardEvent.cpp:

(WebCore::KeyboardEvent::KeyboardEvent):

  • platform/PlatformKeyboardEvent.h:

(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

Source/WebKit:

Adopt UIKit SPI (added in <rdar://problem/50181162>) to ask the Input Manager to handle
the key event. If the Input Manager handled it then we pass along this information to
WebCore, just as we do for Mac, so that it can alter its event handling logic. Otherwise,
we handle the event as we do now.

A large part of this patch is fixing up #if defs to compile more Mac code when building
on iOS.

  • Platform/spi/ios/UIKitSPI.h: Expose more SPI.
  • Shared/NativeWebKeyboardEvent.h:
  • Shared/WebEvent.h:
  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):

  • Shared/WebKeyboardEvent.cpp:

(WebKit::WebKeyboardEvent::WebKeyboardEvent):
(WebKit::WebKeyboardEvent::encode const):
(WebKit::WebKeyboardEvent::decode):

  • Shared/ios/NativeWebKeyboardEventIOS.mm:

(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):

  • Shared/ios/WebIOSEventFactory.h:
  • Shared/ios/WebIOSEventFactory.mm:

(WebIOSEventFactory::createWebKeyboardEvent):
Compile more Mac code on iOS. Just like on Mac we maintain some bookkeeping on
whether an event was handled by the Input Manager.

  • UIProcess/Automation/ios/WebAutomationSessionIOS.mm:

(WebKit::WebAutomationSession::sendSynthesizedEventsToPage): Pass NativeWebKeyboardEvent::HandledByInputMethod::No
to keep the behavior we have now.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanupInteraction]):
(-[WKContentView shouldSuppressUpdateCandidateView]): Added. Used to tell UIKit whether to
suppress updating/showing the candidate view.
(-[WKContentView setMarkedText:selectedRange:]):
Bookkeeping to track whether we need to delay showing/updating the inline candidate view.
The concept in UIKit is deferment, but at the time of writing its simply a request to delay
the update for 0.4 seconds. We opt into this delay only for the first key that begins
marked text (i.e. the transition from no marked text to marked text). We do this because we
may not have up-to-date editor state at the time UIKit is ready to show/update the inline
candidate view for us to answer -textFirstRect and -textLastRect, which UIKit calls as part
of computing the frame rect for the inline candidate view on screen. Once we receive up-to-date
editor state, in -selectionChanged, we tell UIKit to layout the keyboard, which ultimately
causes it to re-compute the frame rect for the inline candidate view and show it.

(-[WKContentView handleKeyWebEvent:]): Pass NativeWebKeyboardEvent::HandledByInputMethod::No
to keep the behavior we have now.
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]): Ask the keyboard to handle the
event using the Input Manager. If it was handled then there is no need to delay calling the
completion handler, call it, then tell the web process about the key event and that it was
already handled by the Input Manager.
(-[WKContentView _selectionChanged]): Tell the keyboard to update the candidate view, if needed.

  • WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:

(WebKit::WebEditorClient::handleInputMethodKeydown): Mark the event as default handled if
the UI process told us that the event was handled by the Input Manager just like we do on Mac.

Location:
trunk/Source
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r244971 r244975  
     12019-05-06  Daniel Bates  <dabates@apple.com>
     2
     3        Google Docs & Yahoo! Japan: Can’t compose characters with Chinese or Japanese keyboard
     4        https://bugs.webkit.org/show_bug.cgi?id=197474
     5        <rdar://problem/47219324>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        Fix up some #if defs to compile more Mac code when building on iOS.
     10
     11        * dom/KeyboardEvent.cpp:
     12        (WebCore::KeyboardEvent::KeyboardEvent):
     13        * platform/PlatformKeyboardEvent.h:
     14        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
     15
    1162019-05-06  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/WebCore/dom/KeyboardEvent.cpp

    r239427 r244975  
    108108    , m_repeat(key.isAutoRepeat())
    109109    , m_isComposing(view && is<DOMWindow>(view->window()) && downcast<DOMWindow>(*view->window()).frame() && downcast<DOMWindow>(*view->window()).frame()->editor().hasComposition())
     110#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS)
     111    , m_handledByInputMethod(key.handledByInputMethod())
     112#endif
    110113#if USE(APPKIT)
    111     , m_handledByInputMethod(key.handledByInputMethod())
    112114    , m_keypressCommands(key.commands())
    113115#endif
  • trunk/Source/WebCore/platform/PlatformKeyboardEvent.h

    r239427 r244975  
    5454            : PlatformEvent(PlatformEvent::KeyDown)
    5555            , m_windowsVirtualKeyCode(0)
    56 #if USE(APPKIT) || PLATFORM(GTK)
    57             , m_handledByInputMethod(false)
    58 #endif
    5956            , m_autoRepeat(false)
    6057            , m_isKeypad(false)
     
    8582            , m_keyIdentifier(keyIdentifier)
    8683            , m_windowsVirtualKeyCode(windowsVirtualKeyCode)
    87 #if USE(APPKIT) || PLATFORM(GTK)
    88             , m_handledByInputMethod(false)
    89 #endif
    9084            , m_autoRepeat(isAutoRepeat)
    9185            , m_isKeypad(isKeypad)
     
    123117        void setWindowsVirtualKeyCode(int code) { m_windowsVirtualKeyCode = code; }
    124118
    125 #if USE(APPKIT) || PLATFORM(GTK)
     119#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK)
    126120        bool handledByInputMethod() const { return m_handledByInputMethod; }
    127121#endif
     
    186180        String m_keyIdentifier;
    187181        int m_windowsVirtualKeyCode;
    188 #if USE(APPKIT) || PLATFORM(GTK)
    189         bool m_handledByInputMethod;
     182#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK)
     183        bool m_handledByInputMethod { false };
    190184#endif
    191185#if USE(APPKIT)
  • trunk/Source/WebKit/ChangeLog

    r244970 r244975  
     12019-05-06  Daniel Bates  <dabates@apple.com>
     2
     3        Google Docs & Yahoo! Japan: Can’t compose characters with Chinese or Japanese keyboard
     4        https://bugs.webkit.org/show_bug.cgi?id=197474
     5        <rdar://problem/47219324>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        Adopt UIKit SPI (added in <rdar://problem/50181162>) to ask the Input Manager to handle
     10        the key event. If the Input Manager handled it then we pass along this information to
     11        WebCore, just as we do for Mac, so that it can alter its event handling logic. Otherwise,
     12        we handle the event as we do now.
     13
     14        A large part of this patch is fixing up #if defs to compile more Mac code when building
     15        on iOS.
     16
     17        * Platform/spi/ios/UIKitSPI.h: Expose more SPI.
     18        * Shared/NativeWebKeyboardEvent.h:
     19        * Shared/WebEvent.h:
     20        * Shared/WebEventConversion.cpp:
     21        (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
     22        * Shared/WebKeyboardEvent.cpp:
     23        (WebKit::WebKeyboardEvent::WebKeyboardEvent):
     24        (WebKit::WebKeyboardEvent::encode const):
     25        (WebKit::WebKeyboardEvent::decode):
     26        * Shared/ios/NativeWebKeyboardEventIOS.mm:
     27        (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
     28        * Shared/ios/WebIOSEventFactory.h:
     29        * Shared/ios/WebIOSEventFactory.mm:
     30        (WebIOSEventFactory::createWebKeyboardEvent):
     31        Compile more Mac code on iOS. Just like on Mac we maintain some bookkeeping on
     32        whether an event was handled by the Input Manager.
     33
     34        * UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
     35        (WebKit::WebAutomationSession::sendSynthesizedEventsToPage): Pass NativeWebKeyboardEvent::HandledByInputMethod::No
     36        to keep the behavior we have now.
     37
     38        * UIProcess/ios/WKContentViewInteraction.h:
     39        * UIProcess/ios/WKContentViewInteraction.mm:
     40        (-[WKContentView cleanupInteraction]):
     41        (-[WKContentView shouldSuppressUpdateCandidateView]): Added. Used to tell UIKit whether to
     42        suppress updating/showing the candidate view.
     43        (-[WKContentView setMarkedText:selectedRange:]):
     44        Bookkeeping to track whether we need to delay showing/updating the inline candidate view.
     45        The concept in UIKit is deferment, but at the time of writing its simply a request to delay
     46        the update for 0.4 seconds. We opt into this delay only for the first key that begins
     47        marked text (i.e. the transition from no marked text to marked text). We do this because we
     48        may not have up-to-date editor state at the time UIKit is ready to show/update the inline
     49        candidate view for us to answer -textFirstRect and -textLastRect, which UIKit calls as part
     50        of computing the frame rect for the inline candidate view on screen. Once we receive up-to-date
     51        editor state, in -selectionChanged, we tell UIKit to layout the keyboard, which ultimately
     52        causes it to re-compute the frame rect for the inline candidate view and show it.
     53
     54        (-[WKContentView handleKeyWebEvent:]): Pass NativeWebKeyboardEvent::HandledByInputMethod::No
     55        to keep the behavior we have now.
     56        (-[WKContentView handleKeyWebEvent:withCompletionHandler:]): Ask the keyboard to handle the
     57        event using the Input Manager. If it was handled then there is no need to delay calling the
     58        completion handler, call it, then tell the web process about the key event and that it was
     59        already handled by the Input Manager.
     60        (-[WKContentView _selectionChanged]): Tell the keyboard to update the candidate view, if needed.
     61        * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
     62        (WebKit::WebEditorClient::handleInputMethodKeydown): Mark the event as default handled if
     63        the UI process told us that the event was handled by the Input Manager just like we do on Mac.
     64
    1652019-05-06  Alex Christensen  <achristensen@webkit.org>
    266
  • trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h

    r244955 r244975  
    387387@end
    388388
     389@protocol UITextInputDelegatePrivate
     390- (void)layoutHasChanged;
     391@end
     392
    389393@class UITextInputArrowKeyHistory;
    390394
     
    11221126- (BOOL)handleKeyTextCommandForCurrentEvent;
    11231127- (BOOL)handleKeyAppCommandForCurrentEvent;
     1128- (BOOL)handleKeyInputMethodCommandForCurrentEvent;
    11241129@property (nonatomic, readonly) UIKeyboardInputMode *currentInputModeInPreference;
    11251130@end
  • trunk/Source/WebKit/Shared/NativeWebKeyboardEvent.h

    r238384 r244975  
    6666public:
    6767#if USE(APPKIT)
     68    // FIXME: Share iOS's HandledByInputMethod enum here instead of passing a boolean.
    6869    NativeWebKeyboardEvent(NSEvent *, bool handledByInputMethod, bool replacesSoftSpace, const Vector<WebCore::KeypressCommand>&);
    6970#elif PLATFORM(GTK)
     
    7172    NativeWebKeyboardEvent(GdkEvent*, const WebCore::CompositionResults&, InputMethodFilter::EventFakedForComposition, Vector<String>&& commands);
    7273#elif PLATFORM(IOS_FAMILY)
    73     NativeWebKeyboardEvent(::WebEvent *);
     74    enum class HandledByInputMethod : bool { No, Yes };
     75    NativeWebKeyboardEvent(::WebEvent *, HandledByInputMethod);
    7476#elif USE(LIBWPE)
    7577    NativeWebKeyboardEvent(struct wpe_input_keyboard_event*);
  • trunk/Source/WebKit/Shared/WebEvent.h

    r243460 r244975  
    260260    WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, Vector<String>&& commands, bool isKeypad, OptionSet<Modifier>, WallTime timestamp);
    261261#elif PLATFORM(IOS_FAMILY)
    262     WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp);
     262    WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier>, WallTime timestamp);
    263263#elif USE(LIBWPE)
    264264    WebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isKeypad, OptionSet<Modifier>, WallTime timestamp);
     
    279279    int32_t nativeVirtualKeyCode() const { return m_nativeVirtualKeyCode; }
    280280    int32_t macCharCode() const { return m_macCharCode; }
    281 #if USE(APPKIT) || PLATFORM(GTK)
     281#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK)
    282282    bool handledByInputMethod() const { return m_handledByInputMethod; }
    283283#endif
     
    309309    int32_t m_nativeVirtualKeyCode;
    310310    int32_t m_macCharCode;
    311 #if USE(APPKIT) || PLATFORM(GTK)
     311#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK)
    312312    bool m_handledByInputMethod;
    313313#endif
  • trunk/Source/WebKit/Shared/WebEventConversion.cpp

    r241044 r244975  
    222222        m_keyIdentifier = webEvent.keyIdentifier();
    223223        m_windowsVirtualKeyCode = webEvent.windowsVirtualKeyCode();
     224#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK)
     225        m_handledByInputMethod = webEvent.handledByInputMethod();
     226#endif
    224227#if USE(APPKIT) || PLATFORM(GTK)
    225         m_handledByInputMethod = webEvent.handledByInputMethod();
    226228        m_commands = webEvent.commands();
    227229#endif
  • trunk/Source/WebKit/Shared/WebKeyboardEvent.cpp

    r241000 r244975  
    8484#elif PLATFORM(IOS_FAMILY)
    8585
    86 WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier> modifiers, WallTime timestamp)
     86WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier> modifiers, WallTime timestamp)
    8787    : WebEvent(type, modifiers, timestamp)
    8888    , m_text(text)
     
    9898    , m_nativeVirtualKeyCode(nativeVirtualKeyCode)
    9999    , m_macCharCode(macCharCode)
     100#if USE(UIKIT_KEYBOARD_ADDITIONS)
     101    , m_handledByInputMethod(handledByInputMethod)
     102#endif
    100103    , m_isAutoRepeat(isAutoRepeat)
    101104    , m_isKeypad(isKeypad)
     
    167170    encoder << m_nativeVirtualKeyCode;
    168171    encoder << m_macCharCode;
     172#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK)
     173    encoder << m_handledByInputMethod;
     174#endif
    169175#if USE(APPKIT) || PLATFORM(GTK)
    170     encoder << m_handledByInputMethod;
    171176    encoder << m_commands;
    172177#endif
     
    201206    if (!decoder.decode(result.m_macCharCode))
    202207        return false;
     208#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK)
     209    if (!decoder.decode(result.m_handledByInputMethod))
     210        return false;
     211#endif
    203212#if USE(APPKIT) || PLATFORM(GTK)
    204     if (!decoder.decode(result.m_handledByInputMethod))
    205         return false;
    206213    if (!decoder.decode(result.m_commands))
    207214        return false;
  • trunk/Source/WebKit/Shared/ios/NativeWebKeyboardEventIOS.mm

    r244955 r244975  
    3535namespace WebKit {
    3636
    37 NativeWebKeyboardEvent::NativeWebKeyboardEvent(::WebEvent *event)
    38     : WebKeyboardEvent(WebIOSEventFactory::createWebKeyboardEvent(event))
     37NativeWebKeyboardEvent::NativeWebKeyboardEvent(::WebEvent *event, HandledByInputMethod handledByInputMethod)
     38    : WebKeyboardEvent(WebIOSEventFactory::createWebKeyboardEvent(event, handledByInputMethod == HandledByInputMethod::Yes))
    3939    , m_nativeEvent(event)
    4040{
  • trunk/Source/WebKit/Shared/ios/WebIOSEventFactory.h

    r241282 r244975  
    3434class WebIOSEventFactory {
    3535public:
    36     static WebKit::WebKeyboardEvent createWebKeyboardEvent(::WebEvent *);
     36    static WebKit::WebKeyboardEvent createWebKeyboardEvent(::WebEvent *, bool handledByInputMethod);
    3737    static WebKit::WebMouseEvent createWebMouseEvent(::WebEvent *);
    3838
  • trunk/Source/WebKit/Shared/ios/WebIOSEventFactory.mm

    r241282 r244975  
    6565}
    6666
    67 WebKit::WebKeyboardEvent WebIOSEventFactory::createWebKeyboardEvent(::WebEvent *event)
     67WebKit::WebKeyboardEvent WebIOSEventFactory::createWebKeyboardEvent(::WebEvent *event, bool handledByInputMethod)
    6868{
    6969    WebKit::WebEvent::Type type = (event.type == WebEventKeyUp) ? WebKit::WebEvent::KeyUp : WebKit::WebEvent::KeyDown;
     
    110110    }
    111111
    112     return WebKit::WebKeyboardEvent(type, text, unmodifiedText, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, macCharCode, autoRepeat, isKeypad, isSystemKey, modifiers, WallTime::fromRawSeconds(timestamp));
     112    return WebKit::WebKeyboardEvent { type, text, unmodifiedText, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, macCharCode, handledByInputMethod, autoRepeat, isKeypad, isSystemKey, modifiers, WallTime::fromRawSeconds(timestamp) };
    113113}
    114114
  • trunk/Source/WebKit/UIProcess/Automation/ios/WebAutomationSessionIOS.mm

    r240554 r244975  
    5959        case WebEventKeyDown:
    6060        case WebEventKeyUp:
    61             page.handleKeyboardEvent(NativeWebKeyboardEvent(event));
     61            page.handleKeyboardEvent(NativeWebKeyboardEvent(event, NativeWebKeyboardEvent::HandledByInputMethod::No));
    6262            break;
    6363        }
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h

    r244955 r244975  
    324324
    325325    BOOL _keyboardDidRequestDismissal;
     326
     327#if USE(UIKIT_KEYBOARD_ADDITIONS)
     328    BOOL _candidateViewNeedsUpdate;
     329#endif
    326330
    327331    BOOL _becomingFirstResponder;
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r244955 r244975  
    840840    _focusRequiresStrongPasswordAssistance = NO;
    841841
     842#if USE(UIKIT_KEYBOARD_ADDITIONS)
     843    _candidateViewNeedsUpdate = NO;
     844#endif
     845
    842846    if (_interactionViewsContainerView) {
    843847        [self.layer removeObserver:self forKeyPath:@"transform"];
     
    40414045- (void)setMarkedText:(NSString *)markedText selectedRange:(NSRange)selectedRange
    40424046{
     4047#if USE(UIKIT_KEYBOARD_ADDITIONS)
     4048    _candidateViewNeedsUpdate = !self.hasMarkedText;
     4049#endif
    40434050    _markedText = markedText;
    40444051    _page->setCompositionAsync(markedText, Vector<WebCore::CompositionUnderline>(), selectedRange, WebKit::EditingRange());
     
    44244431
    44254432#if USE(UIKIT_KEYBOARD_ADDITIONS)
     4433
    44264434- (void)modifierFlagsDidChangeFrom:(UIKeyModifierFlags)oldFlags to:(UIKeyModifierFlags)newFlags
    44274435{
     
    44404448        dispatchSyntheticFlagsChangedEvents(addedFlags, true);
    44414449}
     4450
     4451- (BOOL)shouldSuppressUpdateCandidateView
     4452{
     4453    return _candidateViewNeedsUpdate;
     4454}
     4455
    44424456#endif
    44434457
     
    44844498- (void)handleKeyWebEvent:(::WebEvent *)theEvent
    44854499{
    4486     _page->handleKeyboardEvent(WebKit::NativeWebKeyboardEvent(theEvent));
     4500    _page->handleKeyboardEvent(WebKit::NativeWebKeyboardEvent(theEvent, WebKit::NativeWebKeyboardEvent::HandledByInputMethod::No));
    44874501}
    44884502
     
    44914505    [self _handleDOMPasteRequestWithResult:WebCore::DOMPasteAccessResponse::DeniedForGesture];
    44924506
     4507    using HandledByInputMethod = WebKit::NativeWebKeyboardEvent::HandledByInputMethod;
     4508#if USE(UIKIT_KEYBOARD_ADDITIONS)
     4509    auto* keyboard = [UIKeyboardImpl sharedInstance];
     4510    if ([keyboard respondsToSelector:@selector(handleKeyInputMethodCommandForCurrentEvent)] && [keyboard handleKeyInputMethodCommandForCurrentEvent]) {
     4511        completionHandler(theEvent, YES);
     4512        _page->handleKeyboardEvent(WebKit::NativeWebKeyboardEvent(theEvent, HandledByInputMethod::Yes));
     4513        return;
     4514    }
     4515#endif
    44934516    _keyWebEventHandler = makeBlockPtr(completionHandler);
    4494     _page->handleKeyboardEvent(WebKit::NativeWebKeyboardEvent(theEvent));
     4517    _page->handleKeyboardEvent(WebKit::NativeWebKeyboardEvent(theEvent, HandledByInputMethod::No));
    44954518}
    44964519
     
    56335656    if (_usingGestureForSelection)
    56345657        [self _updateChangedSelection];
     5658
     5659#if USE(UIKIT_KEYBOARD_ADDITIONS)
     5660    if (_candidateViewNeedsUpdate) {
     5661        _candidateViewNeedsUpdate = NO;
     5662        if ([self.inputDelegate respondsToSelector:@selector(layoutHasChanged)])
     5663            [(id <UITextInputDelegatePrivate>)self.inputDelegate layoutHasChanged];
     5664    }
     5665#endif
    56355666
    56365667    [_webView _didChangeEditorState];
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm

    r244932 r244975  
    4545void WebEditorClient::handleInputMethodKeydown(KeyboardEvent&)
    4646{
     47#if USE(UIKIT_KEYBOARD_ADDITIONS)
     48    if (event->handledByInputMethod())
     49        event->setDefaultHandled();
     50#else
    4751    notImplemented();
     52#endif
    4853}
    4954
Note: See TracChangeset for help on using the changeset viewer.