-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Skip pending
:has()
invalidations if there are no :has()
`invalidate_style()` already tries to avoid scheduling invalidation for `:has()` by checking result of `may_have_has_selectors()`, but it might still result in unnecessary work because `may_have_has_selectors()` does not force building of rules cache. This change adds `have_has_selectors()` that forces building of rules cache and is invoked in `update_style()` to double-check whether we actually need to process scheduled `:has()` invalidations. This allows to skip ~100000 ancestor traversals on this WPT test: https://wpt.live/html/select/options-length-too-large.html
- Loading branch information
1 parent
90ba4b1
commit 875a714
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters