mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Adjust the writing-mode fixup to call set_adjusted_display on Servo.
This is functionally equivalent right now (set_adjusted_display will just do set_display), but won't be after #19709.
This commit is contained in:
parent
6ca651c0c8
commit
76f22adccc
1 changed files with 10 additions and 1 deletions
|
@ -193,9 +193,18 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
||||||
|
|
||||||
if our_writing_mode != parent_writing_mode &&
|
if our_writing_mode != parent_writing_mode &&
|
||||||
self.style.get_box().clone_display() == Display::Inline {
|
self.style.get_box().clone_display() == Display::Inline {
|
||||||
|
// TODO(emilio): Figure out if we can just set the adjusted display
|
||||||
|
// on Gecko too and unify this code path.
|
||||||
|
if cfg!(feature = "servo") {
|
||||||
|
self.style.mutate_box().set_adjusted_display(
|
||||||
|
Display::InlineBlock,
|
||||||
|
false,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
self.style.mutate_box().set_display(Display::InlineBlock);
|
self.style.mutate_box().set_display(Display::InlineBlock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
fn adjust_for_contain(&mut self) {
|
fn adjust_for_contain(&mut self) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue