Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing "ancestor filter" reset in style computer after crossing shadow-tree boundary #3323

Open
kalenikaliaksandr opened this issue Jan 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@kalenikaliaksandr
Copy link
Member

we have an optimization for style rule matching that allows us to quickly reject selectors by comparing them against filters collected as we traverse down the tree, e.g. we can easily tell that .a .b {} is not going to match on an element if we haven't encountered element with class "a" as we was descending.

the issue is that we don't reset this filter after we cross shadow tree boundary which might cause false positive rejections. it's really hard to provide a simple reduction because ancestor filter is implemented using Bloom filter which gives false positives. it's possible to reproduce this pretty easily if you change ancestor filter to use deterministic data structure like hash table.

@kalenikaliaksandr kalenikaliaksandr added the bug Something isn't working label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant