servo: Merge #19760 - style: Ruby style adjustments shouldn't reset mOriginalDisplay (from emilio:ruby-display-adjust); r=upsuper
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 13 Jan 2018 13:16:06 -0600
changeset 453501 81ee0da0eb40b9304869f0650e30dcb04d630f8c
parent 453500 5c8565f103fe81130f9b528e278461efb6c8de7f
child 453508 4259ed6ea40f6e9af6d5d4dc210685f7ea313768
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersupsuper
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #19760 - style: Ruby style adjustments shouldn't reset mOriginalDisplay (from emilio:ruby-display-adjust); r=upsuper This matches what Gecko does: https://searchfox.org/mozilla-central/rev/7476b71e0010ab3277b77cc0ae4d998c4b1d2b64/layout/style/GeckoStyleContext.cpp#992 And it's conceptually more right, since we ideally shouldn't mutate mOriginalDisplay from StyleAdjuster. Source-Repo: https://github.com/servo/servo Source-Revision: 7b92eb932b34ce1a4b823b2571a50a928491b4b2
servo/components/style/style_adjuster.rs
--- a/servo/components/style/style_adjuster.rs
+++ b/servo/components/style/style_adjuster.rs
@@ -474,17 +474,17 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
         let self_display = self.style.get_box().clone_display();
         // Check whether line break should be suppressed for this element.
         if self.should_suppress_linebreak(layout_parent_style) {
             self.style.flags.insert(ComputedValueFlags::SHOULD_SUPPRESS_LINEBREAK);
             // Inlinify the display type if allowed.
             if !flags.contains(CascadeFlags::SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP) {
                 let inline_display = self_display.inlinify();
                 if self_display != inline_display {
-                    self.style.mutate_box().set_display(inline_display);
+                    self.style.mutate_box().set_adjusted_display(inline_display, false);
                 }
             }
         }
         // Suppress border and padding for ruby level containers.
         // This is actually not part of the spec. It is currently unspecified
         // how border and padding should be handled for ruby level container,
         // and suppressing them here make it easier for layout to handle.
         if self_display.is_ruby_level_container() {