mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #29799 - stshine:align-self-stretch, r=Loirooriol
layout_2020: Specify the used cross size when replaced item is stretched According to spec, if the flex item has [align-self: stretch](https://drafts.csswg.org/css-flexbox/#propdef-align-self), redo layout for its contents, treating this used size as its definite cross size so that percentage-sized children can be resolved. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #29788 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
0ea942f00f
15 changed files with 23 additions and 12 deletions
|
@ -573,6 +573,7 @@ fn layout_atomic(
|
|||
let size = replaced.contents.used_size_as_if_inline_element(
|
||||
ifc.containing_block,
|
||||
&replaced.style,
|
||||
None,
|
||||
&pbm,
|
||||
);
|
||||
let fragments = replaced
|
||||
|
|
|
@ -581,7 +581,7 @@ fn layout_in_flow_replaced_block_level<'a>(
|
|||
replaced: &ReplacedContent,
|
||||
) -> BoxFragment {
|
||||
let pbm = style.padding_border_margin(containing_block);
|
||||
let size = replaced.used_size_as_if_inline_element(containing_block, style, &pbm);
|
||||
let size = replaced.used_size_as_if_inline_element(containing_block, style, None, &pbm);
|
||||
|
||||
let (margin_inline_start, margin_inline_end) =
|
||||
solve_inline_margins_for_in_flow_block_level(containing_block, &pbm, size.inline);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue