Bug 255182

Summary: REGRESSION(262563@main): [ iOS ] imported/w3c/web-platform-tests/editing/other/editable-state-and-focus-in-shadow-dom-in-designMode.tentative.html is a constant text failure
Product: WebKit Reporter: Robert Jenner <jenner>
Component: HTML EditingAssignee: Ryosuke Niwa <rniwa>
Status: NEW ---    
Severity: Normal CC: rniwa, webkit-bot-watchers-bugzilla, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=254966

Description Robert Jenner 2023-04-07 17:09:46 PDT
imported/w3c/web-platform-tests/editing/other/editable-state-and-focus-in-shadow-dom-in-designMode.tentative.html

is a constant text failure on iOs and XVFB/Wayland.

HISTORY:
https://results.webkit.org/?suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fediting%2Fother%2Feditable-state-and-focus-in-shadow-dom-in-designMode.tentative.html

DIFF URL:
https://build.webkit.org/results/Apple-iOS-16-Simulator-Release-WK2-Tests/262718@main%20(2043)/imported/w3c/web-platform-tests/editing/other/editable-state-and-focus-in-shadow-dom-in-designMode.tentative-pretty-diff.html

DIFF TEXT:
 PASS Focus after Collapse selection into text in the open shadow DOM
 PASS Typing "A" after Collapse selection into text in the open shadow DOM
 PASS Focus after Collapse selection into text in <div contenteditable> in the open shadow DOM
-PASS Typing "A" after Collapse selection into text in <div contenteditable> in the open shadow DOM
+FAIL Typing "A" after Collapse selection into text in <div contenteditable> in the open shadow DOM assert_equals: The shadow DOM shouldn't be modified after Collapse selection into text in <div contenteditable> in the open shadow DOM expected "<style>:focus { outline: 3px red solid; }</style><div>text<div contenteditable=\"\">Aeditable</div><object tabindex=\"0\">object</object><p tabindex=\"0\">paragraph</p></div>" but got "<style>:focus { outline: 3px red solid; }</style><div>text<div contenteditable=\"\">editable</div><object tabindex=\"0\">object</object><p tabindex=\"0\">paragraph</p></div>"
 PASS Focus after Set focus to <object> in the open shadow DOM
 PASS Typing "A" after Set focus to <object> in the open shadow DOM
 PASS Focus after Set focus to <p tabindex="0"> in the open shadow DOM
@@ -27,7 +27,7 @@
 PASS Focus after Collapse selection into text in the closed shadow DOM
 PASS Typing "A" after Collapse selection into text in the closed shadow DOM
 PASS Focus after Collapse selection into text in <div contenteditable> in the closed shadow DOM
-PASS Typing "A" after Collapse selection into text in <div contenteditable> in the closed shadow DOM
+FAIL Typing "A" after Collapse selection into text in <div contenteditable> in the closed shadow DOM assert_equals: The shadow DOM shouldn't be modified after Collapse selection into text in <div contenteditable> in the closed shadow DOM expected "<style>:focus { outline: 3px red solid; }</style><div>text<div contenteditable=\"\">Aeditable</div><object tabindex=\"0\">object</object><p tabindex=\"0\">paragraph</p></div>" but got "<style>:focus { outline: 3px red solid; }</style><div>text<div contenteditable=\"\">editable</div><object tabindex=\"0\">object</object><p tabindex=\"0\">paragraph</p></div>"
 PASS Focus after Set focus to <object> in the closed shadow DOM
 PASS Typing "A" after Set focus to <object> in the closed shadow DOM
 PASS Focus after Set focus to <p tabindex="0"> in the closed shadow DOM
Comment 1 Radar WebKit Bug Importer 2023-04-07 17:10:05 PDT
<rdar://problem/107774968>
Comment 2 Robert Jenner 2023-04-07 17:11:09 PDT
I have reproduce the text failure on iOS 16 Release ToT running the test as follows:

run-webkit-tests --iOS-simulator imported/w3c/web-platform-tests/editing/other/editable-state-and-focus-in-shadow-dom-in-designMode.tentative.html


I have marked expectations for this test on iOS while under investigation. 

https://commits.webkit.org/262734@main
Comment 3 Robert Jenner 2023-04-07 17:30:51 PDT
I was able to verify that https://commits.webkit.org/262563@main is the regression point, which is also when this test was last touched/modified.
Comment 4 Ryosuke Niwa 2023-04-10 13:19:48 PDT
The issue is somehow that letter “A” isn’t typed into the editable region in iOS. We probably just need to check in the failing test expectation for now.

Waiting for the keyboard to show up, for example, doesn’t help.
Comment 5 Ryosuke Niwa 2023-04-10 13:25:45 PDT
Pull request: https://github.com/WebKit/WebKit/pull/12583
Comment 6 EWS 2023-04-10 13:38:08 PDT
Test gardening commit 262782@main (c3cf8c9d9de2): <https://commits.webkit.org/262782@main>

Reviewed commits have been landed. Closing PR #12583 and removing active labels.