Bug 237546

Summary: skip scheduling lazy UA shadow tree creation if already created or not needed
Product: WebKit Reporter: Cameron McCormack (:heycam) <heycam>
Component: FormsAssignee: Cameron McCormack (:heycam) <heycam>
Status: RESOLVED FIXED    
Severity: Normal CC: akeerthi, cdumez, changseok, esprehn+autocc, ews-watchlist, gyuyoung.kim, mifenton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Cameron McCormack (:heycam) 2022-03-07 12:17:48 PST
Bug 236747 made <input> element UA shadow trees get created lazily.  HTMLInputElement::insertedIntoAncestor now schedules the UA shadow tree to be created the next time style is flushed.  We currently do this every time an <input> element is inserted into the document, but there's only a need to do this if the particular input type needs a shadow tree and we haven't already created it.
Comment 1 Radar WebKit Bug Importer 2022-03-07 12:19:18 PST
<rdar://problem/89922896>
Comment 2 Cameron McCormack (:heycam) 2022-03-08 12:02:19 PST
Created attachment 454140 [details]
Patch
Comment 3 Aditya Keerthi 2022-03-08 12:11:38 PST
Comment on attachment 454140 [details]
Patch

Might be helpful to put your comment in the bug description in the ChangeLog file.
Comment 4 Cameron McCormack (:heycam) 2022-03-08 12:15:15 PST
Created attachment 454142 [details]
Patch
Comment 5 EWS 2022-03-08 19:00:09 PST
Committed r291028 (248202@main): <https://commits.webkit.org/248202@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 454142 [details].