Changeset 256833 in webkit


Ignore:
Timestamp:
Feb 18, 2020 9:11:21 AM (4 years ago)
Author:
dbates@webkit.org
Message:

Rename dispatchDidReceiveEditorStateAfterFocus() to dispatchDidUpdateEditorState() to better describe its purpose
https://bugs.webkit.org/show_bug.cgi?id=207865

Reviewed by Wenson Hsieh.

Although the iOS implementation bails out unless it was called after WebPageProxy::elementDidFocus()
this platform-independent function is actually invoked whenever the UI process receives either
an editor state update or a layer tree commit. Renaming this function to better describe its multi-
function purpose, which is to allow the UI process a chance to run post-editor update logic.

  • UIProcess/PageClient.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didUpdateEditorState):
(WebKit::PageClientImpl::didReceiveEditorStateUpdateAfterFocus): Deleted.

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

(-[WKContentView _didUpdateEditorState]):
(-[WKContentView _didReceiveEditorStateUpdateAfterFocus]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::dispatchDidUpdateEditorState):
(WebKit::WebPageProxy::dispatchDidReceiveEditorStateAfterFocus): Deleted.

Location:
trunk/Source/WebKit
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r256821 r256833  
     12020-02-18  Daniel Bates  <dabates@apple.com>
     2
     3        Rename dispatchDidReceiveEditorStateAfterFocus() to dispatchDidUpdateEditorState() to better describe its purpose
     4        https://bugs.webkit.org/show_bug.cgi?id=207865
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        Although the iOS implementation bails out unless it was called after WebPageProxy::elementDidFocus()
     9        this platform-independent function is actually invoked whenever the UI process receives either
     10        an editor state update or a layer tree commit. Renaming this function to better describe its multi-
     11        function purpose, which is to allow the UI process a chance to run post-editor update logic.
     12
     13        * UIProcess/PageClient.h:
     14        * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
     15        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
     16        * UIProcess/WebPageProxy.cpp:
     17        * UIProcess/WebPageProxy.h:
     18        * UIProcess/ios/PageClientImplIOS.h:
     19        * UIProcess/ios/PageClientImplIOS.mm:
     20        (WebKit::PageClientImpl::didUpdateEditorState):
     21        (WebKit::PageClientImpl::didReceiveEditorStateUpdateAfterFocus): Deleted.
     22        * UIProcess/ios/WKContentViewInteraction.h:
     23        * UIProcess/ios/WKContentViewInteraction.mm:
     24        (-[WKContentView _didUpdateEditorState]):
     25        (-[WKContentView _didReceiveEditorStateUpdateAfterFocus]): Deleted.
     26        * UIProcess/ios/WebPageProxyIOS.mm:
     27        (WebKit::WebPageProxy::dispatchDidUpdateEditorState):
     28        (WebKit::WebPageProxy::dispatchDidReceiveEditorStateAfterFocus): Deleted.
     29
    1302020-02-17  Wenson Hsieh  <wenson_hsieh@apple.com>
    231
  • trunk/Source/WebKit/UIProcess/PageClient.h

    r255992 r256833  
    401401    virtual void elementDidBlur() = 0;
    402402    virtual void focusedElementDidChangeInputMode(WebCore::InputMode) = 0;
    403     virtual void didReceiveEditorStateUpdateAfterFocus() = 0;
     403    virtual void didUpdateEditorState() = 0;
    404404    virtual bool isFocusingElement() = 0;
    405405    virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&, bool isCharEvent) = 0;
  • trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm

    r256512 r256833  
    252252
    253253    if (layerTreeTransaction.hasEditorState())
    254         m_webPageProxy.dispatchDidReceiveEditorStateAfterFocus();
     254        m_webPageProxy.dispatchDidUpdateEditorState();
    255255
    256256    if (auto milestones = layerTreeTransaction.newlyReachedPaintingMilestones())
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r256745 r256833  
    69786978{
    69796979    updateEditorState(editorState);
    6980     dispatchDidReceiveEditorStateAfterFocus();
     6980    dispatchDidUpdateEditorState();
    69816981}
    69826982
    69836983#if !PLATFORM(IOS_FAMILY)
    69846984
    6985 void WebPageProxy::dispatchDidReceiveEditorStateAfterFocus()
     6985void WebPageProxy::dispatchDidUpdateEditorState()
    69866986{
    69876987}
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r256583 r256833  
    15351535    void updateEditorState(const EditorState&);
    15361536    void scheduleFullEditorStateUpdate();
    1537     void dispatchDidReceiveEditorStateAfterFocus();
     1537    void dispatchDidUpdateEditorState();
    15381538
    15391539#if HAVE(TOUCH_BAR)
     
    20852085    void focusedElementDidChangeInputMode(WebCore::InputMode);
    20862086    void didReleaseAllTouchPoints();
    2087     void didReceiveEditorStateUpdateAfterFocus();
     2087    void didUpdateEditorState();
    20882088
    20892089    void showInspectorHighlight(const WebCore::Highlight&);
  • trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h

    r255992 r256833  
    158158    void elementDidBlur() override;
    159159    void focusedElementDidChangeInputMode(WebCore::InputMode) override;
    160     void didReceiveEditorStateUpdateAfterFocus() override;
     160    void didUpdateEditorState() override;
    161161    bool isFocusingElement() override;
    162162    void selectionDidChange() override;
  • trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm

    r255992 r256833  
    635635}
    636636
    637 void PageClientImpl::didReceiveEditorStateUpdateAfterFocus()
    638 {
    639     [m_contentView _didReceiveEditorStateUpdateAfterFocus];
     637void PageClientImpl::didUpdateEditorState()
     638{
     639    [m_contentView _didUpdateEditorState];
    640640}
    641641
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h

    r256806 r256833  
    484484- (void)_hideContextMenuHintContainer;
    485485- (void)_didUpdateInputMode:(WebCore::InputMode)mode;
    486 - (void)_didReceiveEditorStateUpdateAfterFocus;
     486- (void)_didUpdateEditorState;
    487487- (void)_hardwareKeyboardAvailabilityChanged;
    488488- (void)_selectionChanged;
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r256806 r256833  
    59665966}
    59675967
    5968 - (void)_didReceiveEditorStateUpdateAfterFocus
     5968- (void)_didUpdateEditorState
    59695969{
    59705970    [self _updateInitialWritingDirectionIfNecessary];
  • trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

    r256520 r256833  
    11591159}
    11601160
    1161 void WebPageProxy::dispatchDidReceiveEditorStateAfterFocus()
     1161void WebPageProxy::dispatchDidUpdateEditorState()
    11621162{
    11631163    if (!m_waitingForPostLayoutEditorStateUpdateAfterFocusingElement || m_editorState.isMissingPostLayoutData)
    11641164        return;
    11651165
    1166     pageClient().didReceiveEditorStateUpdateAfterFocus();
     1166    pageClient().didUpdateEditorState();
    11671167    m_waitingForPostLayoutEditorStateUpdateAfterFocusingElement = false;
    11681168}
Note: See TracChangeset for help on using the changeset viewer.