Bug 1500885 - mTextAlignTrue / mTextAlingLastTrue are write-only. r=mats

They were added in bug 929991, but there's no text-align: true anymore.

Differential Revision: https://phabricator.services.mozilla.com/D9371

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2018-10-22 15:14:42 +00:00
parent cb95d44ffc
commit 449b22d059
5 changed files with 5 additions and 37 deletions

View File

@ -3218,9 +3218,7 @@ nsLineLayout::TextAlignLine(nsLineBox* aLine,
//
nscoord dx = 0;
uint8_t textAlign = mStyleText->mTextAlign;
bool textAlignTrue = mStyleText->mTextAlignTrue;
if (aIsLastLine) {
textAlignTrue = mStyleText->mTextAlignLastTrue;
if (mStyleText->mTextAlignLast == NS_STYLE_TEXT_ALIGN_AUTO) {
if (textAlign == NS_STYLE_TEXT_ALIGN_JUSTIFY) {
textAlign = NS_STYLE_TEXT_ALIGN_START;
@ -3231,7 +3229,7 @@ nsLineLayout::TextAlignLine(nsLineBox* aLine,
}
bool isSVG = nsSVGUtils::IsInSVGTextSubtree(mBlockReflowInput->mFrame);
bool doTextAlign = remainingISize > 0 || textAlignTrue;
bool doTextAlign = remainingISize > 0;
int32_t additionalGaps = 0;
if (!isSVG && (mHasRuby || (doTextAlign &&

View File

@ -2708,31 +2708,13 @@ nsComputedDOMStyle::DoGetVerticalAlign()
return val.forget();
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::CreateTextAlignValue(uint8_t aAlign, bool aAlignTrue,
const KTableEntry aTable[])
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(nsCSSProps::ValueToKeywordEnum(aAlign, aTable));
if (!aAlignTrue) {
return val.forget();
}
RefPtr<nsROCSSPrimitiveValue> first = new nsROCSSPrimitiveValue;
first->SetIdent(eCSSKeyword_unsafe);
RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(false);
valueList->AppendCSSValue(first.forget());
valueList->AppendCSSValue(val.forget());
return valueList.forget();
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetTextAlign()
{
const nsStyleText* style = StyleText();
return CreateTextAlignValue(style->mTextAlign, style->mTextAlignTrue,
nsCSSProps::kTextAlignKTable);
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(nsCSSProps::ValueToKeywordEnum(
StyleText()->mTextAlign, nsCSSProps::kTextAlignKTable));
return val.forget();
}
already_AddRefed<CSSValue>

View File

@ -149,10 +149,6 @@ private:
nsMargin GetAdjustedValuesForBoxSizing();
// Helper method for DoGetTextAlign[Last].
already_AddRefed<CSSValue> CreateTextAlignValue(uint8_t aAlign,
bool aAlignTrue,
const KTableEntry aTable[]);
// This indicates error by leaving mComputedStyle null.
void UpdateCurrentStyleSources(bool aNeedsLayoutFlush);
void ClearCurrentStyleSources();

View File

@ -4313,8 +4313,6 @@ AreShadowArraysEqual(nsCSSShadowArray* lhs,
nsStyleText::nsStyleText(const nsPresContext* aContext)
: mTextAlign(NS_STYLE_TEXT_ALIGN_START)
, mTextAlignLast(NS_STYLE_TEXT_ALIGN_AUTO)
, mTextAlignTrue(false)
, mTextAlignLastTrue(false)
, mTextJustify(StyleTextJustify::Auto)
, mTextTransform(NS_STYLE_TEXT_TRANSFORM_NONE)
, mWhiteSpace(StyleWhiteSpace::Normal)
@ -4350,8 +4348,6 @@ nsStyleText::nsStyleText(const nsPresContext* aContext)
nsStyleText::nsStyleText(const nsStyleText& aSource)
: mTextAlign(aSource.mTextAlign)
, mTextAlignLast(aSource.mTextAlignLast)
, mTextAlignTrue(false)
, mTextAlignLastTrue(false)
, mTextJustify(aSource.mTextJustify)
, mTextTransform(aSource.mTextTransform)
, mWhiteSpace(aSource.mWhiteSpace)
@ -4402,8 +4398,6 @@ nsStyleText::CalcDifference(const nsStyleText& aNewData) const
if ((mTextAlign != aNewData.mTextAlign) ||
(mTextAlignLast != aNewData.mTextAlignLast) ||
(mTextAlignTrue != aNewData.mTextAlignTrue) ||
(mTextAlignLastTrue != aNewData.mTextAlignLastTrue) ||
(mTextTransform != aNewData.mTextTransform) ||
(mWhiteSpace != aNewData.mWhiteSpace) ||
(mWordBreak != aNewData.mWordBreak) ||

View File

@ -1640,8 +1640,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleText
uint8_t mTextAlign; // NS_STYLE_TEXT_ALIGN_*
uint8_t mTextAlignLast; // NS_STYLE_TEXT_ALIGN_*
bool mTextAlignTrue : 1;
bool mTextAlignLastTrue : 1;
mozilla::StyleTextJustify mTextJustify;
uint8_t mTextTransform; // NS_STYLE_TEXT_TRANSFORM_*
mozilla::StyleWhiteSpace mWhiteSpace;