Skip to content

Allow display: flow-root list-item for Servo - #539

Merged
Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:display-flow-root-list-item
Nov 27, 2026
Merged

Loirooriol merged 1 commit into
servo:mainfrom
Loirooriol:display-flow-root-list-item

Conversation

@Loirooriol

@Loirooriol Loirooriol commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

In the past, Servo didn't support flow-root nor contents, so these values were restricted to Gecko with conditional compilation.

Now Servo supports them, but some conditional compilation remained:

  • flow-root was ignored in is_valid_for_list_item() for Servo.
  • contents was ignored in is_line_participant() for Servo.

Note only the former mattered in practice, since is_line_participant() is only used by Gecko.

To avoid risks of having the same problem for ruby or -webkit-box, this patch removes all conditional compilation for display values. But the unsupported values are gated by Servo-specific preferences.

Servo PR: servo/servo#50254

In the past, Servo didn't support `flow-root` nor `contents`, so these
values were restricted to Gecko with conditional compilation.

Now Servo supports them, but some conditional compilation remained:
- `flow-root` was ignored in `is_valid_for_list_item()` for Servo.
- `contents` was ignored in `is_line_participant()` for Servo.

Note only the former mattered in practice, since `is_line_participant()`
is only used by Gecko.

To avoid risks of having the same problem for `ruby` or `-webkit-box`,
this patch removes all conditional compilation for `display` values.
But the unsupported values ara gated by Servo-specific preferences.

Signed-off-by: Oriol Brufau <[email protected]>
@Loirooriol
Loirooriol added this pull request to the merge queue Nov 27, 2026
Merged via the queue into servo:main with commit ea7e4d8 Nov 27, 2026
6 checks passed
@Loirooriol
Loirooriol deleted the display-flow-root-list-item branch November 27, 2026 07:53
shubhamg13 pushed a commit to shubhamg13/servo that referenced this pull request Nov 27, 2026
Bumps Stylo to servo/stylo#539

We were already capable of handling a list item that establishes a block
formatting context by other means (e.g. `align-content: start`), but
this allows authors to opt into this behavior with `display` alone.

Testing: Some tests pass

Signed-off-by: Oriol Brufau <[email protected]>
staging-devin-ai-integration Bot pushed a commit to DioxusLabs/blitz that referenced this pull request Nov 28, 2026
- Handle DisplayOutside::InternalRuby and the ruby/webkit-box DisplayInside
  variants, now compiled for Servo (servo/stylo#539)
- Map the modern AlignmentBaseline values, now compiled for Servo behind
  layout.css.baseline-metric.modern.enabled (servo/stylo#535)
- Pass a per-document random() hasher key to Device::new (servo/stylo#520)
- Fill the new prefers-contrast/-reduced-motion/-reduced-transparency
  MediaData fields with NoPreference (servo/stylo#528)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants