From d8a0bd5c976125fbdc2358a0a90d0504a6030a4e Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Tue, 4 Jul 2017 16:54:11 +1000 Subject: [PATCH] Bug 1364274 part 2 - Move HAS_TEXT_DECORATION_LINES bit computation back to ApplyStyleFixups. r=heycam MozReview-Commit-ID: vsLnXvJ9UI --HG-- extra : rebase_source : 37923ac7ab91c75245d14dafa7bef623ce92603b --- layout/style/GeckoStyleContext.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/layout/style/GeckoStyleContext.cpp b/layout/style/GeckoStyleContext.cpp index 357d5c2f815d..02c177df56d5 100644 --- a/layout/style/GeckoStyleContext.cpp +++ b/layout/style/GeckoStyleContext.cpp @@ -523,17 +523,6 @@ nsStyleContext::SetStyleBits() // add to ApplyStyleFixups in Gecko and StyleAdjuster as part of Servo's // cascade. - // See if we have any text decorations. - // First see if our parent has text decorations. If our parent does, then we inherit the bit. - if (mParent && mParent->HasTextDecorationLines()) { - AddStyleBit(NS_STYLE_HAS_TEXT_DECORATION_LINES); - } else { - // We might have defined a decoration. - if (StyleTextReset()->HasTextDecorationLines()) { - AddStyleBit(NS_STYLE_HAS_TEXT_DECORATION_LINES); - } - } - if ((mParent && mParent->HasPseudoElementData()) || IsPseudoElement()) { AddStyleBit(NS_STYLE_HAS_PSEUDO_ELEMENT_DATA); } @@ -717,6 +706,17 @@ GeckoStyleContext::ApplyStyleFixups(bool aSkipParentDisplayBasedStyleFixup) mutableVis->mWritingMode = NS_STYLE_WRITING_MODE_HORIZONTAL_TB; } + // See if we have any text decorations. + // First see if our parent has text decorations. If our parent does, then we inherit the bit. + if (mParent && mParent->HasTextDecorationLines()) { + AddStyleBit(NS_STYLE_HAS_TEXT_DECORATION_LINES); + } else { + // We might have defined a decoration. + if (StyleTextReset()->HasTextDecorationLines()) { + AddStyleBit(NS_STYLE_HAS_TEXT_DECORATION_LINES); + } + } + // CSS 2.1 10.1: Propagate the root element's 'direction' to the ICB. // (PageContentFrame/CanvasFrame etc will inherit 'direction') if (mPseudoTag == nsCSSAnonBoxes::viewport) {