Bug 197145

Summary: Defer EditorState updates until the next layer tree flush in a few additional circumstances
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Severity: Normal CC: aakash_jain, ap, bdakin, commit-queue, darin, rniwa, simon.fraser, thorton, tsavell, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=199196
Bug Depends on:    
Bug Blocks: 197188    
Description Flags
Patch none

Description Wenson Hsieh 2019-04-20 23:41:57 PDT
Examples include after changing editability, showing the font manager on macOS, and after a selection change.
Comment 1 Radar WebKit Bug Importer 2019-04-20 23:42:26 PDT
Comment 2 Wenson Hsieh 2019-04-20 23:46:33 PDT
Created attachment 367904 [details]
Comment 3 Wenson Hsieh 2019-04-21 13:43:13 PDT
Comment on attachment 367904 [details]

Thanks for the review!
Comment 4 WebKit Commit Bot 2019-04-21 14:10:37 PDT
Comment on attachment 367904 [details]

Clearing flags on attachment: 367904

Committed r244494: <https://trac.webkit.org/changeset/244494>
Comment 5 WebKit Commit Bot 2019-04-21 14:10:38 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Truitt Savell 2019-04-30 09:56:55 PDT
It looks like the changes in https://trac.webkit.org/changeset/244494/webkit

has caused the test editing/pasteboard/5761530-1.html to become flakey. 

I was able to reproduce this using command:
run-webkit-tests editing/pasteboard/5761530-1.html --iterations 20 --ios-simulator
The test passes on 244493 and with fail on 244494


--- /Volumes/Data/slave/ios-simulator-12-release-tests-wk2/build/layout-test-results/editing/pasteboard/5761530-1-expected.txt
+++ /Volumes/Data/slave/ios-simulator-12-release-tests-wk2/build/layout-test-results/editing/pasteboard/5761530-1-actual.txt
@@ -1,3 +1,3 @@
 This tests to see that tabs are put into tab spans when they are copied individually. The pasted tab should be inside of a tab span, not a style span. To run the test manually, paste and then inspect the editable region, and ensure that there is a tab span at the beginning of the editable div.
-<span class="Apple-tab-span" style="white-space: pre;">	</span><span class="Apple-tab-span" style="white-space:pre;">	</span>xxx
+<span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space:pre;"> </span>xxx
Comment 7 Ryosuke Niwa 2019-04-30 13:41:18 PDT
That's rather surprising. The test doesn't seem like it would depend anything related to EditorState.
Comment 8 Ryosuke Niwa 2019-04-30 13:42:44 PDT
Filed https://bugs.webkit.org/show_bug.cgi?id=197438 to track the test flakiness.
Comment 9 Alexey Proskuryakov 2019-04-30 14:14:56 PDT
EWS did hit this failure, but since it is flaky, it wasn't reported. Perhaps we could eventually develop some logic for EWS to dig into flaky failures.