gecko-dev/servo/components
Martin Robinson f85b73bf84 Bug 1463600 - Implement CSS 'contain: style' r=emilio
Add an implementation of CSS `contain: style`. This introduces two new
data structures, the ContainStyleScope and ContainStyleScopeManager.

ContainStyleScope manages one `contain: style` "world" which has its own
counter and quote lists. The contents of these lists depend on their
parent scopes, but are not affected by their children.
ContainStyleScopeManager manages a tree of scopes starting at a root
scope which is outside of any `contain: style` element.

Scopes are stored in a hash table that is keyed off of the nsIContent
which establishes the `contain: style` scope. When modifying quote or
content lists, the ContainStyleScopeManager is responsible for finding
the appropriate `contain: style` scope to modify.

Perhaps the most complex part of this is that counters and quotes have
read access to the state of counters and quotes that are in ancestor
`contain: style` scopes. In the case of counters, USE nodes that are at
the beginning of counter lists might have a counter scope that starts in
an ancestor `contain: style` scope. When nsCounterNode::SetScope() is
called, the code may look upward in the `contain: style` scope tree to
find the start of the counter scope. In the case of quotes, the first
node in the quote list must look for the state of quotes in ancestor
`contain: style` scopes.

Differential Revision: https://phabricator.services.mozilla.com/D149508
2022-06-22 16:16:59 +00:00
..
derive_common Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame 2022-06-13 00:59:23 +00:00
malloc_size_of Bug 1771896 - Add simple parsing and matching support for :has r=emilio 2022-06-20 08:53:02 +00:00
selectors Bug 1771896 - Add simple parsing and matching support for :has r=emilio 2022-06-20 08:53:02 +00:00
servo_arc Bug 1716535 - Remove nodrop dependency. r=glandium 2021-06-16 09:48:14 +00:00
style Bug 1463600 - Implement CSS 'contain: style' r=emilio 2022-06-22 16:16:59 +00:00
style_derive Bug 1762088 - Remove assert that doesn't hold for text-decorations because of presentation hints. 2022-04-01 02:27:35 +02:00
style_traits Bug 1770616 - Update color-mix() syntax to match the current spec. r=barret 2022-05-31 08:33:47 +00:00
to_shmem Bug 1771764 - Remove 'static bound for ToShmem for Arc/ThinArc. r=dshin,layout-reviewers 2022-05-30 19:07:27 +00:00
to_shmem_derive Bug 1751340 - Upgrade darling to 0.13.1. r=emilio 2022-01-21 21:23:19 +00:00