mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
style: Implement parsing / serialization for container{,-type,-name} CSS properties
Two noteworthy details that may seem random otherwise: * Moving values around in nsStyleDisplay is needed so that the struct remains under the size limit that we have to avoid jumping allocator buckets. * All the test expectation churn is because tests depend on `container-type: size` parsing to run, and now they run. Tests for the relevant bits I implemented are passing, with the only exception of some `container-name-computed.html` failures which are https://github.com/w3c/csswg-drafts/issues/7181. Safari agrees with us there. Other notes when looking at the spec and seeing how it matches the implementation: * `container` syntax doesn't match spec, but matches tests and sanity: https://github.com/w3c/csswg-drafts/issues/7180 * `container-type` syntax doesn't _quite_ match spec, but matches tests and I think it's a spec bug since the definition for the missing keyword is gone: https://github.com/w3c/csswg-drafts/issues/7179 Differential Revision: https://phabricator.services.mozilla.com/D142419
This commit is contained in:
parent
ee4e09359f
commit
ec6099563e
9 changed files with 161 additions and 16 deletions
|
@ -623,6 +623,26 @@ ${helpers.predefined_type(
|
|||
animation_value_type="none",
|
||||
)}
|
||||
|
||||
${helpers.predefined_type(
|
||||
"container-type",
|
||||
"ContainerType",
|
||||
"computed::ContainerType::NONE",
|
||||
engines="gecko",
|
||||
animation_value_type="none",
|
||||
gecko_pref="layout.css.container-queries.enabled",
|
||||
spec="https://drafts.csswg.org/css-contain-3/#container-type",
|
||||
)}
|
||||
|
||||
${helpers.predefined_type(
|
||||
"container-name",
|
||||
"ContainerName",
|
||||
"computed::ContainerName::none()",
|
||||
engines="gecko",
|
||||
animation_value_type="none",
|
||||
gecko_pref="layout.css.container-queries.enabled",
|
||||
spec="https://drafts.csswg.org/css-contain-3/#container-name",
|
||||
)}
|
||||
|
||||
${helpers.predefined_type(
|
||||
"appearance",
|
||||
"Appearance",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue