- Revision
- 256833
- Author
- dba...@webkit.org
- Date
- 2020-02-18 09:11:21 -0800 (Tue, 18 Feb 2020)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (256832 => 256833)
--- trunk/Source/WebKit/ChangeLog 2020-02-18 17:06:14 UTC (rev 256832)
+++ trunk/Source/WebKit/ChangeLog 2020-02-18 17:11:21 UTC (rev 256833)
@@ -1,3 +1,32 @@
+2020-02-18 Daniel Bates <daba...@apple.com>
+
+ 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.
+
2020-02-17 Wenson Hsieh <wenson_hs...@apple.com>
Selection cannot be modified via text interaction in some areas of the compose body field in Gmail
Modified: trunk/Source/WebKit/UIProcess/PageClient.h (256832 => 256833)
--- trunk/Source/WebKit/UIProcess/PageClient.h 2020-02-18 17:06:14 UTC (rev 256832)
+++ trunk/Source/WebKit/UIProcess/PageClient.h 2020-02-18 17:11:21 UTC (rev 256833)
@@ -400,7 +400,7 @@
virtual void updateInputContextAfterBlurringAndRefocusingElement() = 0;
virtual void elementDidBlur() = 0;
virtual void focusedElementDidChangeInputMode(WebCore::InputMode) = 0;
- virtual void didReceiveEditorStateUpdateAfterFocus() = 0;
+ virtual void didUpdateEditorState() = 0;
virtual bool isFocusingElement() = 0;
virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&, bool isCharEvent) = 0;
virtual void positionInformationDidChange(const InteractionInformationAtPosition&) = 0;
Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm (256832 => 256833)
--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm 2020-02-18 17:06:14 UTC (rev 256832)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm 2020-02-18 17:11:21 UTC (rev 256833)
@@ -251,7 +251,7 @@
#endif
if (layerTreeTransaction.hasEditorState())
- m_webPageProxy.dispatchDidReceiveEditorStateAfterFocus();
+ m_webPageProxy.dispatchDidUpdateEditorState();
if (auto milestones = layerTreeTransaction.newlyReachedPaintingMilestones())
m_webPageProxy.didReachLayoutMilestone(milestones);
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (256832 => 256833)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-02-18 17:06:14 UTC (rev 256832)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-02-18 17:11:21 UTC (rev 256833)
@@ -6977,12 +6977,12 @@
void WebPageProxy::editorStateChanged(const EditorState& editorState)
{
updateEditorState(editorState);
- dispatchDidReceiveEditorStateAfterFocus();
+ dispatchDidUpdateEditorState();
}
#if !PLATFORM(IOS_FAMILY)
-void WebPageProxy::dispatchDidReceiveEditorStateAfterFocus()
+void WebPageProxy::dispatchDidUpdateEditorState()
{
}
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (256832 => 256833)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-02-18 17:06:14 UTC (rev 256832)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-02-18 17:11:21 UTC (rev 256833)
@@ -1534,7 +1534,7 @@
void editorStateChanged(const EditorState&);
void updateEditorState(const EditorState&);
void scheduleFullEditorStateUpdate();
- void dispatchDidReceiveEditorStateAfterFocus();
+ void dispatchDidUpdateEditorState();
#if HAVE(TOUCH_BAR)
void touchBarMenuDataRemoved();
@@ -2084,7 +2084,7 @@
void updateInputContextAfterBlurringAndRefocusingElement();
void focusedElementDidChangeInputMode(WebCore::InputMode);
void didReleaseAllTouchPoints();
- void didReceiveEditorStateUpdateAfterFocus();
+ void didUpdateEditorState();
void showInspectorHighlight(const WebCore::Highlight&);
void hideInspectorHighlight();
Modified: trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h (256832 => 256833)
--- trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h 2020-02-18 17:06:14 UTC (rev 256832)
+++ trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h 2020-02-18 17:11:21 UTC (rev 256833)
@@ -157,7 +157,7 @@
void updateInputContextAfterBlurringAndRefocusingElement() final;
void elementDidBlur() override;
void focusedElementDidChangeInputMode(WebCore::InputMode) override;
- void didReceiveEditorStateUpdateAfterFocus() override;
+ void didUpdateEditorState() override;
bool isFocusingElement() override;
void selectionDidChange() override;
bool interpretKeyEvent(const NativeWebKeyboardEvent&, bool isCharEvent) override;
Modified: trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (256832 => 256833)
--- trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2020-02-18 17:06:14 UTC (rev 256832)
+++ trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2020-02-18 17:11:21 UTC (rev 256833)
@@ -634,9 +634,9 @@
[m_contentView _didUpdateInputMode:mode];
}
-void PageClientImpl::didReceiveEditorStateUpdateAfterFocus()
+void PageClientImpl::didUpdateEditorState()
{
- [m_contentView _didReceiveEditorStateUpdateAfterFocus];
+ [m_contentView _didUpdateEditorState];
}
void PageClientImpl::showPlaybackTargetPicker(bool hasVideo, const IntRect& elementRect, WebCore::RouteSharingPolicy policy, const String& contextUID)
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (256832 => 256833)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2020-02-18 17:06:14 UTC (rev 256832)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2020-02-18 17:11:21 UTC (rev 256833)
@@ -483,7 +483,7 @@
- (void)_elementDidBlur;
- (void)_hideContextMenuHintContainer;
- (void)_didUpdateInputMode:(WebCore::InputMode)mode;
-- (void)_didReceiveEditorStateUpdateAfterFocus;
+- (void)_didUpdateEditorState;
- (void)_hardwareKeyboardAvailabilityChanged;
- (void)_selectionChanged;
- (void)_updateChangedSelection;
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (256832 => 256833)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-02-18 17:06:14 UTC (rev 256832)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-02-18 17:11:21 UTC (rev 256833)
@@ -5965,7 +5965,7 @@
[self showGlobalMenuControllerInRect:menuControllerRect];
}
-- (void)_didReceiveEditorStateUpdateAfterFocus
+- (void)_didUpdateEditorState
{
[self _updateInitialWritingDirectionIfNecessary];
Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (256832 => 256833)
--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2020-02-18 17:06:14 UTC (rev 256832)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2020-02-18 17:11:21 UTC (rev 256833)
@@ -1158,12 +1158,12 @@
updateFontAttributesAfterEditorStateChange();
}
-void WebPageProxy::dispatchDidReceiveEditorStateAfterFocus()
+void WebPageProxy::dispatchDidUpdateEditorState()
{
if (!m_waitingForPostLayoutEditorStateUpdateAfterFocusingElement || m_editorState.isMissingPostLayoutData)
return;
- pageClient().didReceiveEditorStateUpdateAfterFocus();
+ pageClient().didUpdateEditorState();
m_waitingForPostLayoutEditorStateUpdateAfterFocusingElement = false;
}