Skip to content

Commit

Permalink
Avoid crashing trying to invalidate from pseudo-element in :has intro…
Browse files Browse the repository at this point in the history
…duced through nesting.

Differential Revision: https://phabricator.services.mozilla.com/D233532

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1940212
gecko-commit: 44f971223b3786a3f9fac7043d1274f4e65b4990
gecko-reviewers: firefox-style-system-reviewers, emilio
  • Loading branch information
dshin-moz authored and moz-wptsync-bot committed Jan 9, 2025
1 parent 5f69cd7 commit c840faf
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions css/selectors/invalidation/has-nested-pseudo-001-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<link rel="author" title="David Shin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/selectors/#relational">
<link rel="help" href="https://drafts.csswg.org/css-nesting-1/#nest-selector">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1940212">
<style>
::marker {:has(&){}}
</style>
<p>Test</p>
9 changes: 9 additions & 0 deletions css/selectors/invalidation/has-nested-pseudo-002-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<link rel="author" title="David Shin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/selectors/#relational">
<link rel="help" href="https://drafts.csswg.org/css-nesting-1/#nest-selector">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1940212">
<style>
::part(foo) {:has(&){}}
</style>
<p>Test</p>
9 changes: 9 additions & 0 deletions css/selectors/invalidation/has-nested-pseudo-003-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<link rel="author" title="David Shin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/selectors/#relational">
<link rel="help" href="https://drafts.csswg.org/css-nesting-1/#nest-selector">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1940212">
<style>
::slotted(p) {:has(&){}}
</style>
<p>Test</p>

0 comments on commit c840faf

Please sign in to comment.