Make the choice of layout runtime setting

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Martin Robinson 2023-06-28 10:07:08 +02:00
parent f11c6045e3
commit d31cdb682f
No known key found for this signature in database
GPG key ID: D56AA4FA55EFE6F8
262 changed files with 1740 additions and 3700 deletions

View file

@ -497,6 +497,18 @@ impl From<stylo::Display> for Display {
// These should not be values of DisplayInside, but oh well
stylo::DisplayInside::None => return Display::None,
stylo::DisplayInside::Contents => return Display::Contents,
// TODO: Implement support for tables.
stylo::DisplayInside::Table |
stylo::DisplayInside::TableRowGroup |
stylo::DisplayInside::TableColumn |
stylo::DisplayInside::TableColumnGroup |
stylo::DisplayInside::TableHeaderGroup |
stylo::DisplayInside::TableFooterGroup |
stylo::DisplayInside::TableRow |
stylo::DisplayInside::TableCell => DisplayInside::Flow {
is_list_item: packed.is_list_item(),
},
};
let outside = match packed.outside() {
stylo::DisplayOutside::Block => DisplayOutside::Block,
@ -504,6 +516,11 @@ impl From<stylo::Display> for Display {
// This should not be a value of DisplayInside, but oh well
stylo::DisplayOutside::None => return Display::None,
// TODO: Implement support for tables.
stylo::DisplayOutside::TableCaption | stylo::DisplayOutside::InternalTable => {
DisplayOutside::Block
},
};
Display::GeneratingBox(DisplayGeneratingBox::OutsideInside { outside, inside })
}