Defer EditorState updates until the next layer tree flush in a few additional circums...
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 21 Apr 2019 21:10:31 +0000 (21:10 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 21 Apr 2019 21:10:31 +0000 (21:10 +0000)
commit57c6a89212aefb21fc94b02bda9c24feac69494c
treef4485a9f1e93d1a68a9d4eda0e191037da80d3c1
parentba7dd8c1cad9ea41a44ba5d222c015de914b1c9e
Defer EditorState updates until the next layer tree flush in a few additional circumstances
https://bugs.webkit.org/show_bug.cgi?id=197145
<rdar://problem/50078170>

Reviewed by Darin Adler.

Source/WebKit:

Gets rid of sendPartialEditorStateAndSchedulePostLayoutUpdate(), in favor of always scheduling a full editor
state update after the next compositing flush.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateEditorStateAfterLayoutIfEditabilityChanged):
(WebKit::WebPage::setNeedsFontAttributes):
(WebKit::WebPage::didChangeOverflowScrollPosition):
(WebKit::WebPage::didChangeSelection):
(WebKit::WebPage::didChangeSelectionOrOverflowScrollPosition):
(WebKit::WebPage::sendPartialEditorStateAndSchedulePostLayoutUpdate): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState const):
(WebKit::WebPage::updateVisibleContentRects):

Tools:

Adjusts several editing API tests to wait for a presentation update following a selection change, programmatic
focus, or showing the font manager.

* TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKContentViewTargetForAction.mm:
(TEST):
* TestWebKitAPI/Tests/mac/FontManagerTests.mm:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewTargetForAction.mm
Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm