servo/components/style/values
Emilio Cobos Álvarez 8bb7d98f0c style: Add support for the revert-layer keyword
This patch looks bigger than it is, but it's mostly because
of plumbing.

To implement revert-layer we need not only the cascade origin of the
declaration, but the whole cascade level, plus also the layer order.

In order to do this, encapsulate these two things inside a 32-bit
`CascadePriority` struct and plumb it through the rule tree and so on.
This allows us to remove the packing and unpacking of CascadeLevel,
though I kept the ShadowCascadeOrder limit for now in case we need to
reintroduce it.

Fix `!important` behavior of layers while at it (implementing it in
`CascadeLevel::cmp`, spec quote included since it was tricky to find)
since some revert-layer tests were depending on it.

The style attribute test is failing now, but follow-up commit fixes
it, see spec issue.

In terms of the actual keyword implementation, it's sort of
straight-forward: We implement revert and revert-layer in a shared
way, by storing the cascade priority that reverted it.

Differential Revision: https://phabricator.services.mozilla.com/D133372
2023-06-09 10:22:22 +02:00
..
animated style: Run rustfmt on servo/components/style and servo/ports/geckolib 2023-06-09 10:22:19 +02:00
computed style: Implement parsing of the page property 2023-06-09 10:22:22 +02:00
generics style: Add support for the 'ic' font-relative unit 2023-06-09 10:22:22 +02:00
resolved style: Run rustfmt on servo/components/style and servo/ports/geckolib 2023-06-09 10:22:19 +02:00
specified style: Add support for the 'ic' font-relative unit 2023-06-09 10:22:22 +02:00
distance.rs style: Drop fallback attribute from animate and distance. 2020-04-16 16:35:07 +02:00
mod.rs style: Add support for the revert-layer keyword 2023-06-09 10:22:22 +02:00