Closed Bug 1762088 Opened 3 years ago Closed 3 years ago

Implement parsing / serialization for container properties.

Categories

(Core :: CSS Parsing and Computation, task)

task

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

No description provided.

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.

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:

Depends on D142418

Keywords: leave-open
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1bb4d3114199 Allow to derive Parse/ToCss/SpecifiedValueInfo on bitflags. r=firefox-style-system-reviewers,layout-reviewers,boris
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bdaf003569a7 Implement parsing / serialization for container{,-type,-name} CSS properties. r=firefox-style-system-reviewers,layout-reviewers,boris
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/33463 for changes under testing/web-platform/tests
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/d9f904ba9e20 Remove assert that doesn't hold for text-decorations because of presentation hints.
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/122d5fa4212e Annotate a test that expectedly fails on android due to overlay scrollbars.
Upstream PR merged by moz-wptsync-bot
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch

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.)

Flags: needinfo?(emilio)

Yes

Flags: needinfo?(emilio)
No longer blocks: 1760446
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: