Skip to content

Commit

Permalink
Implement parsing / serialization for container{,-type,-name} CSS pro…
Browse files Browse the repository at this point in the history
…perties.

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
   w3c/csswg-drafts#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:
   w3c/csswg-drafts#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:
   w3c/csswg-drafts#7179

Differential Revision: https://phabricator.services.mozilla.com/D142419

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1762088
gecko-commit: bdaf003569a7cd516ada250c6d73e5288a69b1ae
gecko-reviewers: firefox-style-system-reviewers, layout-reviewers, boris
  • Loading branch information
emilio authored and moz-wptsync-bot committed Mar 31, 2022
1 parent ef2c023 commit 8721569
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion css/css-contain/container-queries/container-parsing.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
test_valid_value('container', 'size / block-size');
test_valid_value('container', 'inline-size / inline-size');
test_valid_value('container', 'size / size');
test_valid_value('container', 'size style / none', 'size style');
test_valid_value('container', 'size style / none', 'style size');
test_valid_value('container', 'size / foo');
test_valid_value('container', 'size / foo bar');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
test_valid_value('container-type', 'size');
test_valid_value('container-type', 'inline-size');

test_valid_value('container-type', 'inline-size style');
test_valid_value('container-type', 'inline-size style', 'style inline-size');
test_valid_value('container-type', 'style inline-size');
test_valid_value('container-type', 'style size');

Expand Down

0 comments on commit 8721569

Please sign in to comment.