From 76f22adcccd0890195dcd85891fa6536a36c5760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 13 Jan 2018 12:56:32 +0100 Subject: [PATCH] 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. --- components/style/style_adjuster.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index 4da9f0f9227..1c859532d63 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -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); + } } }