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
This commit is contained in:
Xidorn Quan 2017-07-04 16:54:11 +10:00
Родитель 180940d947
Коммит d8a0bd5c97
1 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -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) {