mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
60e65c175d
commit
569fd5d8b5
33 changed files with 70 additions and 106 deletions
|
@ -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 {
|
||||
|
|
|
@ -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(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue