mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
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:
parent
cb95d44ffc
commit
449b22d059
@ -3218,9 +3218,7 @@ nsLineLayout::TextAlignLine(nsLineBox* aLine,
|
|||||||
//
|
//
|
||||||
nscoord dx = 0;
|
nscoord dx = 0;
|
||||||
uint8_t textAlign = mStyleText->mTextAlign;
|
uint8_t textAlign = mStyleText->mTextAlign;
|
||||||
bool textAlignTrue = mStyleText->mTextAlignTrue;
|
|
||||||
if (aIsLastLine) {
|
if (aIsLastLine) {
|
||||||
textAlignTrue = mStyleText->mTextAlignLastTrue;
|
|
||||||
if (mStyleText->mTextAlignLast == NS_STYLE_TEXT_ALIGN_AUTO) {
|
if (mStyleText->mTextAlignLast == NS_STYLE_TEXT_ALIGN_AUTO) {
|
||||||
if (textAlign == NS_STYLE_TEXT_ALIGN_JUSTIFY) {
|
if (textAlign == NS_STYLE_TEXT_ALIGN_JUSTIFY) {
|
||||||
textAlign = NS_STYLE_TEXT_ALIGN_START;
|
textAlign = NS_STYLE_TEXT_ALIGN_START;
|
||||||
@ -3231,7 +3229,7 @@ nsLineLayout::TextAlignLine(nsLineBox* aLine,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool isSVG = nsSVGUtils::IsInSVGTextSubtree(mBlockReflowInput->mFrame);
|
bool isSVG = nsSVGUtils::IsInSVGTextSubtree(mBlockReflowInput->mFrame);
|
||||||
bool doTextAlign = remainingISize > 0 || textAlignTrue;
|
bool doTextAlign = remainingISize > 0;
|
||||||
|
|
||||||
int32_t additionalGaps = 0;
|
int32_t additionalGaps = 0;
|
||||||
if (!isSVG && (mHasRuby || (doTextAlign &&
|
if (!isSVG && (mHasRuby || (doTextAlign &&
|
||||||
|
@ -2708,31 +2708,13 @@ nsComputedDOMStyle::DoGetVerticalAlign()
|
|||||||
return val.forget();
|
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>
|
already_AddRefed<CSSValue>
|
||||||
nsComputedDOMStyle::DoGetTextAlign()
|
nsComputedDOMStyle::DoGetTextAlign()
|
||||||
{
|
{
|
||||||
const nsStyleText* style = StyleText();
|
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
|
||||||
return CreateTextAlignValue(style->mTextAlign, style->mTextAlignTrue,
|
val->SetIdent(nsCSSProps::ValueToKeywordEnum(
|
||||||
nsCSSProps::kTextAlignKTable);
|
StyleText()->mTextAlign, nsCSSProps::kTextAlignKTable));
|
||||||
|
return val.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<CSSValue>
|
already_AddRefed<CSSValue>
|
||||||
|
@ -149,10 +149,6 @@ private:
|
|||||||
|
|
||||||
nsMargin GetAdjustedValuesForBoxSizing();
|
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.
|
// This indicates error by leaving mComputedStyle null.
|
||||||
void UpdateCurrentStyleSources(bool aNeedsLayoutFlush);
|
void UpdateCurrentStyleSources(bool aNeedsLayoutFlush);
|
||||||
void ClearCurrentStyleSources();
|
void ClearCurrentStyleSources();
|
||||||
|
@ -4313,8 +4313,6 @@ AreShadowArraysEqual(nsCSSShadowArray* lhs,
|
|||||||
nsStyleText::nsStyleText(const nsPresContext* aContext)
|
nsStyleText::nsStyleText(const nsPresContext* aContext)
|
||||||
: mTextAlign(NS_STYLE_TEXT_ALIGN_START)
|
: mTextAlign(NS_STYLE_TEXT_ALIGN_START)
|
||||||
, mTextAlignLast(NS_STYLE_TEXT_ALIGN_AUTO)
|
, mTextAlignLast(NS_STYLE_TEXT_ALIGN_AUTO)
|
||||||
, mTextAlignTrue(false)
|
|
||||||
, mTextAlignLastTrue(false)
|
|
||||||
, mTextJustify(StyleTextJustify::Auto)
|
, mTextJustify(StyleTextJustify::Auto)
|
||||||
, mTextTransform(NS_STYLE_TEXT_TRANSFORM_NONE)
|
, mTextTransform(NS_STYLE_TEXT_TRANSFORM_NONE)
|
||||||
, mWhiteSpace(StyleWhiteSpace::Normal)
|
, mWhiteSpace(StyleWhiteSpace::Normal)
|
||||||
@ -4350,8 +4348,6 @@ nsStyleText::nsStyleText(const nsPresContext* aContext)
|
|||||||
nsStyleText::nsStyleText(const nsStyleText& aSource)
|
nsStyleText::nsStyleText(const nsStyleText& aSource)
|
||||||
: mTextAlign(aSource.mTextAlign)
|
: mTextAlign(aSource.mTextAlign)
|
||||||
, mTextAlignLast(aSource.mTextAlignLast)
|
, mTextAlignLast(aSource.mTextAlignLast)
|
||||||
, mTextAlignTrue(false)
|
|
||||||
, mTextAlignLastTrue(false)
|
|
||||||
, mTextJustify(aSource.mTextJustify)
|
, mTextJustify(aSource.mTextJustify)
|
||||||
, mTextTransform(aSource.mTextTransform)
|
, mTextTransform(aSource.mTextTransform)
|
||||||
, mWhiteSpace(aSource.mWhiteSpace)
|
, mWhiteSpace(aSource.mWhiteSpace)
|
||||||
@ -4402,8 +4398,6 @@ nsStyleText::CalcDifference(const nsStyleText& aNewData) const
|
|||||||
|
|
||||||
if ((mTextAlign != aNewData.mTextAlign) ||
|
if ((mTextAlign != aNewData.mTextAlign) ||
|
||||||
(mTextAlignLast != aNewData.mTextAlignLast) ||
|
(mTextAlignLast != aNewData.mTextAlignLast) ||
|
||||||
(mTextAlignTrue != aNewData.mTextAlignTrue) ||
|
|
||||||
(mTextAlignLastTrue != aNewData.mTextAlignLastTrue) ||
|
|
||||||
(mTextTransform != aNewData.mTextTransform) ||
|
(mTextTransform != aNewData.mTextTransform) ||
|
||||||
(mWhiteSpace != aNewData.mWhiteSpace) ||
|
(mWhiteSpace != aNewData.mWhiteSpace) ||
|
||||||
(mWordBreak != aNewData.mWordBreak) ||
|
(mWordBreak != aNewData.mWordBreak) ||
|
||||||
|
@ -1640,8 +1640,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleText
|
|||||||
|
|
||||||
uint8_t mTextAlign; // NS_STYLE_TEXT_ALIGN_*
|
uint8_t mTextAlign; // NS_STYLE_TEXT_ALIGN_*
|
||||||
uint8_t mTextAlignLast; // NS_STYLE_TEXT_ALIGN_*
|
uint8_t mTextAlignLast; // NS_STYLE_TEXT_ALIGN_*
|
||||||
bool mTextAlignTrue : 1;
|
|
||||||
bool mTextAlignLastTrue : 1;
|
|
||||||
mozilla::StyleTextJustify mTextJustify;
|
mozilla::StyleTextJustify mTextJustify;
|
||||||
uint8_t mTextTransform; // NS_STYLE_TEXT_TRANSFORM_*
|
uint8_t mTextTransform; // NS_STYLE_TEXT_TRANSFORM_*
|
||||||
mozilla::StyleWhiteSpace mWhiteSpace;
|
mozilla::StyleWhiteSpace mWhiteSpace;
|
||||||
|
Loading…
Reference in New Issue
Block a user