Changeset 177040 in webkit


Ignore:
Timestamp:
Dec 9, 2014 2:39:35 PM (9 years ago)
Author:
ap@apple.com
Message:

Kotoeri sometimes doesn't correctly process the first chanaracter in a text field in Safari 7.1 or 6.2
https://bugs.webkit.org/show_bug.cgi?id=139459
rdar://problem/19017432
rdar://problem/19036869

Reviewed by Enrica Casucci.

When inputContext changes, notify the application. We already did this when the context
changed due to plug-ins, and this used to sort of make it work on on yahoo.co.jp,
which has plug-ins. But that was quite unreliable, as evidenced by the reproducible
cases where we didn't use an input method for the first keypress.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::editorStateChanged):

  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::notifyApplicationAboutInputContextChange):

Location:
trunk/Source/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r177039 r177040  
     12014-12-09  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Kotoeri sometimes doesn't correctly process the first chanaracter in a text field in Safari 7.1 or 6.2
     4        https://bugs.webkit.org/show_bug.cgi?id=139459
     5        rdar://problem/19017432
     6        rdar://problem/19036869
     7
     8        Reviewed by Enrica Casucci.
     9
     10        When inputContext changes, notify the application. We already did this when the context
     11        changed due to plug-ins, and this used to sort of make it work on on yahoo.co.jp,
     12        which has plug-ins. But that was quite unreliable, as evidenced by the reproducible
     13        cases where we didn't use an input method for the first keypress.
     14
     15        * UIProcess/PageClient.h:
     16        * UIProcess/WebPageProxy.cpp:
     17        (WebKit::WebPageProxy::editorStateChanged):
     18        * UIProcess/mac/PageClientImpl.h:
     19        * UIProcess/mac/PageClientImpl.mm:
     20        (WebKit::PageClientImpl::notifyApplicationAboutInputContextChange):
     21
    1222014-12-09  Jeremy Jones  <jeremyj@apple.com>
    223
  • trunk/Source/WebKit2/UIProcess/PageClient.h

    r176462 r177040  
    186186#endif
    187187
     188#if PLATFORM(MAC) && !USE(ASYNC_NSTEXTINPUTCLIENT)
     189    virtual void notifyApplicationAboutInputContextChange() = 0;
     190#endif
     191
    188192#if USE(APPKIT)
    189193    virtual void setPromisedData(const String& pasteboardName, PassRefPtr<WebCore::SharedBuffer> imageBuffer, const String& filename, const String& extension, const String& title,
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r177020 r177040  
    35853585    bool closedComposition = !editorState.shouldIgnoreCompositionSelectionChange && !editorState.hasComposition && (m_editorState.hasComposition || m_temporarilyClosedComposition);
    35863586    m_temporarilyClosedComposition = editorState.shouldIgnoreCompositionSelectionChange && (m_temporarilyClosedComposition || m_editorState.hasComposition) && !editorState.hasComposition;
     3587    bool editabilityChanged = m_editorState.isContentEditable != editorState.isContentEditable;
    35873588#endif
    35883589
     
    36013602    if (closedComposition)
    36023603        m_pageClient.notifyInputContextAboutDiscardedComposition();
     3604    if (editabilityChanged) {
     3605        // This is only needed in sync code path, because AppKit automatically refreshes input context for async clients (<rdar://problem/18604360>).
     3606        m_pageClient.notifyApplicationAboutInputContextChange();
     3607    }
    36033608    if (editorState.hasComposition) {
    36043609        // Abandon the current inline input session if selection changed for any other reason but an input method changing the composition.
  • trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h

    r176462 r177040  
    9999    virtual void resetSecureInputState() override;
    100100    virtual void notifyInputContextAboutDiscardedComposition() override;
     101#if PLATFORM(MAC) && !USE(ASYNC_NSTEXTINPUTCLIENT)
     102    virtual void notifyApplicationAboutInputContextChange() override;
     103#endif
    101104
    102105    virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&);
  • trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm

    r176462 r177040  
    419419}
    420420
     421#if PLATFORM(MAC) && !USE(ASYNC_NSTEXTINPUTCLIENT)
     422void PageClientImpl::notifyApplicationAboutInputContextChange()
     423{
     424    [NSApp updateWindows];
     425}
     426#endif
     427
    421428FloatRect PageClientImpl::convertToDeviceSpace(const FloatRect& rect)
    422429{
Note: See TracChangeset for help on using the changeset viewer.