servo/components
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
..
allocator Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
atoms Further changes required by Servo 2023-06-09 10:22:21 +02:00
background_hang_monitor Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
bluetooth Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
bluetooth_traits Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
canvas Further changes required by Servo 2023-05-24 18:32:39 +02:00
canvas_traits Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
compositing Clean up and document the send_display_list interface 2023-05-24 09:16:25 +02:00
config Place floats in layout 2020, but don't flow text around the floats yet. 2023-06-03 06:09:21 +02:00
config_plugins Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
constellation Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
deny_public_fields Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
derive_common Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
devtools Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
devtools_traits Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
dom_struct Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
domobject_derive Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
embedder_traits Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
fallible Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
geometry Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
gfx Further changes required by Servo 2023-06-09 10:22:20 +02:00
gfx_traits Clean up and document the send_display_list interface 2023-05-24 09:16:25 +02:00
hashglobe Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
jstraceable_derive Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
layout Clean up and document the send_display_list interface 2023-05-24 09:16:25 +02:00
layout_2020 Auto merge of #29827 - mrobinson:fragment-tree-directory, r=atbrakhi 2023-06-04 20:06:31 +02:00
layout_thread Layout-2020: Serialize access to stylo thread pool. 2023-05-26 20:09:50 +05:30
layout_thread_2020 Layout-2020: Serialize access to stylo thread pool. 2023-05-26 20:09:50 +05:30
layout_traits Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
malloc_size_of Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
media Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
metrics Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
msg Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
net Update tungstenite 2023-05-20 21:55:00 +00:00
net_traits Auto merge of #29637 - AnthonyJ3:Use-same-origin-as-default-credential-mode-for-RequestInit-fix, r=mukilan 2023-05-18 14:16:45 +02:00
pixels Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
profile Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
profile_traits Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
rand Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
range Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
remutex Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
script Further changes required by Servo 2023-06-09 10:22:18 +02:00
script_layout_interface Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
script_plugins Upgrade remaining components to edition 2018 2023-02-18 09:42:37 +01:00
script_traits Clean up and document the send_display_list interface 2023-05-24 09:16:25 +02:00
selectors style: Remove layout.css.is-and-where-better-error-recovery.enabled 2023-05-24 18:32:43 +02:00
servo Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
servo_arc style: Refactor the author sheet cache to keep alive the relevant StylesheetContents 2023-05-24 18:32:30 +02:00
size_of_test Upgrade remaining components to edition 2018 2023-02-18 09:42:37 +01:00
std_test_override Upgrade remaining components to edition 2018 2023-02-18 09:42:37 +01:00
style style: Add support for the revert-layer keyword 2023-06-09 10:22:22 +02:00
style_derive style: Make #[css(field_bound)] and #[css(iterable)] work properly 2023-06-09 10:22:17 +02:00
style_traits style: Make #[css(field_bound)] and #[css(iterable)] work properly 2023-06-09 10:22:17 +02:00
to_shmem Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
to_shmem_derive Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
url Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
webdriver_server Fix compiler warning introduced in 4aa8a1c418 2023-05-20 02:03:58 +00:00
webgpu Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
webrender_surfman Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
webrender_traits Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00