Changeset 74037 in webkit


Ignore:
Timestamp:
Dec 14, 2010 9:54:39 AM (13 years ago)
Author:
andersca@apple.com
Message:

Pass the complex text input status to the WKView
https://bugs.webkit.org/show_bug.cgi?id=50993

Reviewed by Kevin Decker.

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

(WebKit::PageClientImpl::setComplexTextInputEnabled):

  • UIProcess/API/mac/WKView.mm:

(-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):

  • UIProcess/API/mac/WKViewInternal.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setComplexTextInputEnabled):

Location:
trunk/WebKit2
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r74015 r74037  
     12010-12-13  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Kevin Decker.
     4
     5        Pass the complex text input status to the WKView
     6        https://bugs.webkit.org/show_bug.cgi?id=50993
     7
     8        * UIProcess/API/mac/PageClientImpl.h:
     9        * UIProcess/API/mac/PageClientImpl.mm:
     10        (WebKit::PageClientImpl::setComplexTextInputEnabled):
     11        * UIProcess/API/mac/WKView.mm:
     12        (-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):
     13        * UIProcess/API/mac/WKViewInternal.h:
     14        * UIProcess/PageClient.h:
     15        * UIProcess/WebPageProxy.cpp:
     16        (WebKit::WebPageProxy::setComplexTextInputEnabled):
     17
    1182010-12-14  Benjamin Poulain  <benjamin.poulain@nokia.com>
    219
  • trunk/WebKit2/UIProcess/API/mac/PageClientImpl.h

    r73796 r74037  
    7777#endif
    7878
     79    virtual void setComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled);
     80
    7981    virtual void didCommitLoadForMainFrame(bool useCustomRepresentation);
    8082    virtual void didFinishLoadingDataForCustomRepresentation(const CoreIPC::DataReference&);
  • trunk/WebKit2/UIProcess/API/mac/PageClientImpl.mm

    r73796 r74037  
    275275#endif // USE(ACCELERATED_COMPOSITING)
    276276
     277void PageClientImpl::setComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled)
     278{
     279    [m_wkView _setComplexTextInputEnabled:complexTextInputEnabled pluginComplexTextInputIdentifier:pluginComplexTextInputIdentifier];
     280}
     281
    277282void PageClientImpl::didCommitLoadForMainFrame(bool useCustomRepresentation)
    278283{
  • trunk/WebKit2/UIProcess/API/mac/WKView.mm

    r73986 r74037  
    108108    Vector<KeypressCommand> _commandsList;
    109109
     110    // The identifier of the plug-in we want to send complex text input to, or 0 if there is none.
     111    uint64_t _pluginComplexTextInputIdentifier;
     112
    110113    BOOL _isSelectionNone;
    111114    BOOL _isSelectionEditable;
     
    11501153#endif // USE(ACCELERATED_COMPOSITING)
    11511154
     1155- (void)_setComplexTextInputEnabled:(BOOL)complexTextInputEnabled pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier
     1156{
     1157    BOOL inputSourceChanged = _data->_pluginComplexTextInputIdentifier;
     1158
     1159    if (complexTextInputEnabled) {
     1160        // Check if we're already allowing text input for this plug-in.
     1161        if (pluginComplexTextInputIdentifier == _data->_pluginComplexTextInputIdentifier)
     1162            return;
     1163
     1164        _data->_pluginComplexTextInputIdentifier = pluginComplexTextInputIdentifier;
     1165
     1166    } else {
     1167        // Check if we got a request to disable complex text input for a plug-in that is not the current plug-in.
     1168        if (pluginComplexTextInputIdentifier != _data->_pluginComplexTextInputIdentifier)
     1169            return;
     1170
     1171        _data->_pluginComplexTextInputIdentifier = 0;
     1172    }
     1173
     1174    if (inputSourceChanged) {
     1175        // Inform the out of line window that the input source changed.
     1176    }
     1177}
     1178
    11521179- (void)_setPageHasCustomRepresentation:(BOOL)pageHasCustomRepresentation
    11531180{
  • trunk/WebKit2/UIProcess/API/mac/WKViewInternal.h

    r73796 r74037  
    5555#endif
    5656
     57- (void)_setComplexTextInputEnabled:(BOOL)complexTextInputEnabled pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier;
     58
    5759- (void)_setPageHasCustomRepresentation:(BOOL)pageHasCustomRepresentation;
    5860- (void)_didFinishLoadingDataForCustomRepresentation:(const CoreIPC::DataReference&)dataReference;
  • trunk/WebKit2/UIProcess/PageClient.h

    r73796 r74037  
    9494#endif
    9595
     96#if PLATFORM(MAC)
     97    virtual void setComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled) = 0;
     98#endif
     99
    96100    // Custom representations.
    97101    virtual void didCommitLoadForMainFrame(bool useCustomRepresentation) = 0;
  • trunk/WebKit2/UIProcess/WebPageProxy.cpp

    r74000 r74037  
    16981698void WebPageProxy::setComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled)
    16991699{
    1700     // FIXME: Call the page client.
     1700    m_pageClient->setComplexTextInputEnabled(pluginComplexTextInputIdentifier, complexTextInputEnabled);
    17011701}
    17021702#endif
Note: See TracChangeset for help on using the changeset viewer.