gecko-dev/dom/base/rust
David Shin c7ccd24b1c Bug 1974230: Add UA-only pseudo-selector for suppressing frame generation of elements during printing. r=firefox-style-system-reviewers,emilio
The plan is to apply this internal pseudo-selector during construction of print
selection subtree - Currently, every node outside of the selection is deleted,
but elements outside of the selection would have this pseudo-selector applied
instead. In the UA stylesheet, we ensure that elements matching this
pseudo-class have `display: none` applied.

This change would make print selection behave more consistently by preserving
matching for tree-structural pseudo-classes; however, the main reason for this
change is to allow the copied document for print selection can preserve the
relation between every `<style>` node and `Stylesheet`, which is required for
`@scope` with implicit scope to behave properly (As the implicit scope root is
defined as the parent of the style node).

Without this change, attempting to preserve relations between `<style>` and
`Stylesheet` would result in having all stylesheets deleted because `<style>`
nodes are never selected, and thus deleted, then causing the deletion of the
stylesheet.

Differential Revision: https://phabricator.services.mozilla.com/D255164
2025-07-04 18:49:07 +00:00
..
Cargo.toml
cbindgen.toml
lib.rs Bug 1974230: Add UA-only pseudo-selector for suppressing frame generation of elements during printing. r=firefox-style-system-reviewers,emilio 2025-07-04 18:49:07 +00:00