Upgrade stylo to 2024-07-16 (#32812)

* Upgrade stylo to 2024-07-16

Signed-off-by: Martin Robinson <mrobinson@igalia.com>

* Use the new `dom` crate from stylo

Signed-off-by: Martin Robinson <mrobinson@igalia.com>

---------

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2024-07-24 16:37:08 +02:00 committed by GitHub
parent 60e65c175d
commit 569fd5d8b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 70 additions and 106 deletions

View file

@ -932,16 +932,16 @@ impl<'a, 'b> InlineFormattingContextState<'a, 'b> {
let text_align = match text_align_keyword {
TextAlignKeyword::Start => TextAlign::Start,
TextAlignKeyword::Center | TextAlignKeyword::ServoCenter => TextAlign::Center,
TextAlignKeyword::Center | TextAlignKeyword::MozCenter => TextAlign::Center,
TextAlignKeyword::End => TextAlign::End,
TextAlignKeyword::Left | TextAlignKeyword::ServoLeft => {
TextAlignKeyword::Left | TextAlignKeyword::MozLeft => {
if style.writing_mode.line_left_is_inline_start() {
TextAlign::Start
} else {
TextAlign::End
}
},
TextAlignKeyword::Right | TextAlignKeyword::ServoRight => {
TextAlignKeyword::Right | TextAlignKeyword::MozRight => {
if style.writing_mode.line_left_is_inline_start() {
TextAlign::End
} else {

View file

@ -1478,13 +1478,9 @@ fn justify_self_alignment(containing_block: &ContainingBlock, free_space: Au) ->
let style = containing_block.style;
debug_assert!(free_space >= Au::zero());
match style.clone_text_align() {
TextAlignKeyword::ServoCenter => free_space / 2,
TextAlignKeyword::ServoLeft if !style.writing_mode.line_left_is_inline_start() => {
free_space
},
TextAlignKeyword::ServoRight if style.writing_mode.line_left_is_inline_start() => {
free_space
},
TextAlignKeyword::MozCenter => free_space / 2,
TextAlignKeyword::MozLeft if !style.writing_mode.line_left_is_inline_start() => free_space,
TextAlignKeyword::MozRight if style.writing_mode.line_left_is_inline_start() => free_space,
_ => Au::zero(),
}
}

View file

@ -718,6 +718,7 @@ impl From<stylo::Display> for Display {
is_list_item: packed.is_list_item(),
},
stylo::DisplayInside::Flex => DisplayInside::Flex,
stylo::DisplayInside::Grid => todo!("Grid support is not yet implemented."),
// These should not be values of DisplayInside, but oh well
stylo::DisplayInside::None => return Display::None,