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:
Emilio Cobos Álvarez 2018-01-13 12:56:32 +01:00
parent 6ca651c0c8
commit 76f22adccc
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -193,7 +193,16 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
if our_writing_mode != parent_writing_mode &&
self.style.get_box().clone_display() == Display::Inline {
self.style.mutate_box().set_display(Display::InlineBlock);
// 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);
}
}
}