Implement parsing / serialization for container properties.
Categories
(Core :: CSS Parsing and Computation, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox100 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
Bug 1762088 - Allow to derive Parse/ToCss/SpecifiedValueInfo on bitflags. r=#style,#layout-reviewers
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Assignee | ||
Comment 1•3 years ago
|
||
We keep getting this pattern of properties that have a set of joint and
disjoint flags, and copy-pasting or writing the same parsing and
serialization code in slightly different ways.
container-type is one such type, and I think we should have a single way
of dealing with this, thus implement deriving for various traits for
bitflags, with an attribute that says which flags are single vs mixed.
See docs and properties I ported. The remaining ones I left TODOs with,
they are a bit trickier but can be ported with some care.
Assignee | ||
Comment 2•3 years ago
|
||
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 somecontainer-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
Depends on D142418
Assignee | ||
Updated•3 years ago
|
Comment 8•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Should we dupe bug 1744223, bug 1744224, and bug 1744228 over to this bug?
It looks like those were basically-fixed (at a CSS parsing/serialization level) by https://hg.mozilla.org/mozilla-central/rev/bdaf003569a7
(There's more to be done to support them in layout, but I'm not sure that these individual per-property bugs are the best spot to do that.)
Description
•