Bug 1141919 - Fix incomplete line break suppression. r=dbaron, a=sledru
authorXidorn Quan <quanxunzhen@gmail.com>
Thu, 12 Mar 2015 10:24:49 +1100
changeset 257779 c36dcffd0b40ac1b01cb3b5ce0df1a0569415acb
parent 257778 a2dec0c6164718e662551511f9f835e3c60164f9
child 257780 16fb0cf8266abbb9f6fa64d11763170fc3024d8a
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron, sledru
bugs1141919
milestone38.0a2
Bug 1141919 - Fix incomplete line break suppression. r=dbaron, a=sledru
layout/style/nsStyleContext.cpp
--- a/layout/style/nsStyleContext.cpp
+++ b/layout/style/nsStyleContext.cpp
@@ -631,17 +631,19 @@ nsStyleContext::ApplyStyleFixups(bool aS
         }
       }
     }
 
     // The display change should only occur for "in-flow" children
     if (!disp->IsOutOfFlowStyle() &&
         ((containerDisp->mDisplay == NS_STYLE_DISPLAY_INLINE &&
           containerContext->IsInlineDescendantOfRuby()) ||
-         containerDisp->IsRubyDisplayType())) {
+         containerDisp->IsRubyDisplayType() ||
+         disp->mDisplay == NS_STYLE_DISPLAY_RUBY_TEXT ||
+         disp->mDisplay == NS_STYLE_DISPLAY_RUBY_BASE)) {
       mBits |= NS_STYLE_IS_INLINE_DESCENDANT_OF_RUBY;
       uint8_t displayVal = disp->mDisplay;
       nsRuleNode::EnsureInlineDisplay(displayVal);
       if (displayVal != disp->mDisplay) {
         nsStyleDisplay *mutable_display =
           static_cast<nsStyleDisplay*>(GetUniqueStyleData(eStyleStruct_Display));
         mutable_display->mDisplay = displayVal;
       }