Bug 218256 - REGRESSION (r258321): CSS rules using :first-of-type are applied to any/all siblings in a group under certain circumstances
Summary: REGRESSION (r258321): CSS rules using :first-of-type are applied to any/all s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 14
Hardware: Mac macOS 10.15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-27 13:23 PDT by Eben Packwood
Modified: 2021-01-11 10:12 PST (History)
4 users (show)

See Also:


Attachments
Minimal working example (1.19 KB, text/html)
2020-10-27 13:23 PDT, Eben Packwood
no flags Details
patch (6.57 KB, patch)
2021-01-11 08:24 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (6.47 KB, patch)
2021-01-11 09:09 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eben Packwood 2020-10-27 13:23:30 PDT
Created attachment 412456 [details]
Minimal working example

In the attached example, when using Safari 14 or Safari Technology Preview, moving the mouse over the different elements of the page will result in the CSS rule `table td:first-of-type {color: red;}` being applied to potentially any arbitrary sibling in a group.

Only the first `td` in each group should be colored red, but mousing over and out of the other `td` elements results in these element also being colored red. This also occurs with various other properties.
Comment 1 Radar WebKit Bug Importer 2020-10-27 20:12:27 PDT
<rdar://problem/70749584>
Comment 2 Antti Koivisto 2020-10-28 01:34:22 PDT
style sharing bug perhaps?
Comment 3 Antti Koivisto 2020-10-28 01:36:19 PDT
A decent theory is that the animation code is losing the bits that prevent style sharing.
Comment 4 Antti Koivisto 2020-10-28 02:24:30 PDT
Yeah, disabling style sharing makes the bug go away.
Comment 5 Antti Koivisto 2021-01-11 08:24:41 PST
Created attachment 417380 [details]
patch
Comment 6 Antti Koivisto 2021-01-11 09:09:34 PST
Created attachment 417386 [details]
patch
Comment 7 EWS 2021-01-11 10:12:25 PST
Committed r271367: <https://trac.webkit.org/changeset/271367>

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