Bug 252191

Summary: [iOS] Assertion failure in Position::trailingWhitespacePosition while running imported/w3c/web-platform-tests/editing/other/edit-in-textcontrol-immediately-after-hidden.tentative.html
Product: WebKit Reporter: Bri Harris <bharris9>
Component: HTML EditingAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: megan_gardner, rniwa, webkit-bot-watchers-bugzilla, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Crash Log none

Description Bri Harris 2023-02-13 13:54:11 PST
4 tests: 

imported/w3c/web-platform-tests/editing/other/edit-in-textcontrol-immediately-after-hidden.tentative.html?editor=input&hide-target=editor
imported/w3c/web-platform-tests/editing/other/edit-in-textcontrol-immediately-after-hidden.tentative.html?editor=input&hide-target=parent
imported/w3c/web-platform-tests/editing/other/edit-in-textcontrol-immediately-after-hidden.tentative.html?editor=textarea&hide-target=editor
imported/w3c/web-platform-tests/editing/other/edit-in-textcontrol-immediately-after-hidden.tentative.html?editor=textarea&hide-target=parent

are constant crashes on iOS Debug WK2 running on Intel only.


HISTORY:
https://results.webkit.org/?suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fediting%2Fother%2Fedit-in-textcontrol-immediately-after-hidden.tentative.html%3Feditor%3Dinput%26hide-target%3Deditor&test=imported%2Fw3c%2Fweb-platform-tests%2Fediting%2Fother%2Fedit-in-textcontrol-immediately-after-hidden.tentative.html%3Feditor%3Dinput%26hide-target%3Dparent&test=imported%2Fw3c%2Fweb-platform-tests%2Fediting%2Fother%2Fedit-in-textcontrol-immediately-after-hidden.tentative.html%3Feditor%3Dtextarea%26hide-target%3Deditor&test=imported%2Fw3c%2Fweb-platform-tests%2Fediting%2Fother%2Fedit-in-textcontrol-immediately-after-hidden.tentative.html%3Feditor%3Dtextarea%26hide-target%3Dparent
Comment 1 Bri Harris 2023-02-13 13:59:27 PST
I was able to reproduce this crash as follows:


run-webkit-tests imported/w3c/web-platform-tests/editing/other/edit-in-textcontrol-immediately-after-hidden.tentative.html
Comment 2 Bri Harris 2023-02-13 14:00:01 PST
Created attachment 464974 [details]
Crash Log
Comment 3 Ryan Haddad 2023-02-13 14:16:55 PST
ASSERTION FAILED: isEditablePosition(*this)
dom/Position.cpp(1139) : WebCore::Position WebCore::Position::trailingWhitespacePosition(WebCore::Affinity, bool) const
1   0x6b27fb379 WTFCrash
2   0x6e197ec0b WTFCrashWithInfo(int, char const*, char const*, int)
3   0x6e5786e6e WebCore::Position::trailingWhitespacePosition(WebCore::Affinity, bool) const
4   0x6e58c136e WebCore::DeleteSelectionCommand::initializePositionData()
5   0x6e58c71c8 WebCore::DeleteSelectionCommand::doApply()
6   0x6e589f90f WebCore::CompositeEditCommand::applyCommandToComposite(WTF::Ref<WebCore::EditCommand, WTF::RawPtrTraits<WebCore::EditCommand> >&&)
7   0x6e58a2207 WebCore::CompositeEditCommand::deleteSelection(WebCore::VisibleSelection const&, bool, bool, bool, bool, bool)
8   0x6e5981d56 WebCore::TypingCommand::deleteKeyPressed(WebCore::TextGranularity, bool)
9   0x6e5983e03 WebCore::TypingCommand::doApply()
10  0x6e588b76f WebCore::CompositeEditCommand::apply()
11  0x6e5980df3 WebCore::TypingCommand::deleteKeyPressed(WebCore::Document&, unsigned int, WebCore::TextGranularity)
12  0x6e591bb66 WebCore::executeDelete(WebCore::Frame&, WebCore::Event*, WebCore::EditorCommandSource, WTF::String const&)
13  0x6e58f12b4 WebCore::Editor::Command::execute(WTF::String const&, WebCore::Event*) const
14  0x6e558ef69 WebCore::Document::execCommand(WTF::String const&, bool, WTF::String const&)
Comment 4 Radar WebKit Bug Importer 2023-02-13 14:19:36 PST
<rdar://problem/105416324>
Comment 5 Bri Harris 2023-02-13 14:29:52 PST
Pull request: https://github.com/WebKit/WebKit/pull/10058
Comment 6 EWS 2023-02-13 14:35:34 PST
Test gardening commit 260221@main (243f6b3c6f56): <https://commits.webkit.org/260221@main>

Reviewed commits have been landed. Closing PR #10058 and removing active labels.
Comment 7 Alexey Proskuryakov 2023-02-13 15:21:59 PST
I think that it would be better to skip consistent crashes, not just mark as flaky.
Comment 8 Bri Harris 2023-02-14 11:58:28 PST
Pull request: https://github.com/WebKit/WebKit/pull/10103
Comment 9 EWS 2023-02-14 12:02:40 PST
Test gardening commit 260268@main (05b1334a3417): <https://commits.webkit.org/260268@main>

Reviewed commits have been landed. Closing PR #10103 and removing active labels.
Comment 10 Ryosuke Niwa 2023-03-21 18:35:34 PDT
Pull request: https://github.com/WebKit/WebKit/pull/11790
Comment 11 EWS 2023-03-22 16:34:52 PDT
Committed 261995@main (23d8c7872d0f): <https://commits.webkit.org/261995@main>

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