There are multiple autofill pseudo classes, it should be a matter of using PseudoClassChangeInvalidation instead of invalidateStyleForSubtree().
Created attachment 456895 [details] [fast-cq] Patch
Comment on attachment 456895 [details] [fast-cq] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456895&action=review > LayoutTests/ChangeLog:9 > + * fast/forms/input-autofilled-expected.txt: > + * fast/forms/input-autofilled.html: Please add (or expand) a WPT.
Comment on attachment 456895 [details] [fast-cq] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456895&action=review >> LayoutTests/ChangeLog:9 >> + * fast/forms/input-autofilled.html: > > Please add (or expand) a WPT. You can't use `window.internals.setAutofilled(input, true);` in WPT unfortunately.
Committed r292531 (249369@main): <https://commits.webkit.org/249369@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 456895 [details].
<rdar://problem/91410097>