From 96d86ab5e72c5d2a2bd1396cde8caa59a5e336dc Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Wed, 24 Feb 2016 10:40:30 -0800 Subject: [PATCH] Bug 1250342 patch 2: Rename NS_STYLE_TEXT_ALIGN_TRUE to NS_STYLE_TEXT_ALIGN_UNSAFE. r=mats MozReview-Commit-ID: LuHepP37jtr --- layout/style/nsCSSParser.cpp | 6 +++--- layout/style/nsCSSProps.cpp | 4 ++-- layout/style/nsRuleNode.cpp | 4 ++-- layout/style/nsStyleConsts.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index b481bad14bb8..395fe356052d 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -14895,14 +14895,14 @@ CSSParserImpl::ParseTextAlign(nsCSSValue& aValue, const KTableEntry aTable[]) nsCSSValue right; if (ParseSingleTokenVariant(right, VARIANT_KEYWORD, aTable)) { // 'true' must be combined with some other value than 'true'. - if (left.GetIntValue() == NS_STYLE_TEXT_ALIGN_TRUE && - right.GetIntValue() == NS_STYLE_TEXT_ALIGN_TRUE) { + if (left.GetIntValue() == NS_STYLE_TEXT_ALIGN_UNSAFE && + right.GetIntValue() == NS_STYLE_TEXT_ALIGN_UNSAFE) { return false; } aValue.SetPairValue(left, right); } else { // Single value 'true' is not allowed. - if (left.GetIntValue() == NS_STYLE_TEXT_ALIGN_TRUE) { + if (left.GetIntValue() == NS_STYLE_TEXT_ALIGN_UNSAFE) { return false; } aValue = left; diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 5a0e28002310..f31d6572a8dc 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -1959,7 +1959,7 @@ KTableEntry nsCSSProps::kTextAlignKTable[] = { { eCSSKeyword__moz_left, NS_STYLE_TEXT_ALIGN_MOZ_LEFT }, { eCSSKeyword_start, NS_STYLE_TEXT_ALIGN_DEFAULT }, { eCSSKeyword_end, NS_STYLE_TEXT_ALIGN_END }, - { eCSSKeyword_unsafe, NS_STYLE_TEXT_ALIGN_TRUE }, + { eCSSKeyword_unsafe, NS_STYLE_TEXT_ALIGN_UNSAFE }, { eCSSKeyword_match_parent, NS_STYLE_TEXT_ALIGN_MATCH_PARENT }, { eCSSKeyword_UNKNOWN, -1 } }; @@ -1972,7 +1972,7 @@ KTableEntry nsCSSProps::kTextAlignLastKTable[] = { { eCSSKeyword_justify, NS_STYLE_TEXT_ALIGN_JUSTIFY }, { eCSSKeyword_start, NS_STYLE_TEXT_ALIGN_DEFAULT }, { eCSSKeyword_end, NS_STYLE_TEXT_ALIGN_END }, - { eCSSKeyword_unsafe, NS_STYLE_TEXT_ALIGN_TRUE }, + { eCSSKeyword_unsafe, NS_STYLE_TEXT_ALIGN_UNSAFE }, { eCSSKeyword_UNKNOWN, -1 } }; diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index c209fa1518fc..f3ef2121a985 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -4396,7 +4396,7 @@ nsRuleNode::ComputeTextData(void* aStartStruct, const nsCSSValuePair& textAlignValuePair = textAlignValue->GetPairValue(); textAlignValue = &textAlignValuePair.mXValue; if (eCSSUnit_Enumerated == textAlignValue->GetUnit()) { - if (textAlignValue->GetIntValue() == NS_STYLE_TEXT_ALIGN_TRUE) { + if (textAlignValue->GetIntValue() == NS_STYLE_TEXT_ALIGN_UNSAFE) { textAlignValue = &textAlignValuePair.mYValue; } } else if (eCSSUnit_String == textAlignValue->GetUnit()) { @@ -4421,7 +4421,7 @@ nsRuleNode::ComputeTextData(void* aStartStruct, const nsCSSValuePair& textAlignLastValuePair = textAlignLastValue->GetPairValue(); textAlignLastValue = &textAlignLastValuePair.mXValue; if (eCSSUnit_Enumerated == textAlignLastValue->GetUnit()) { - if (textAlignLastValue->GetIntValue() == NS_STYLE_TEXT_ALIGN_TRUE) { + if (textAlignLastValue->GetIntValue() == NS_STYLE_TEXT_ALIGN_UNSAFE) { textAlignLastValue = &textAlignLastValuePair.mYValue; } } diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h index ffa27adf5d5e..cd9c98fc80d5 100644 --- a/layout/style/nsStyleConsts.h +++ b/layout/style/nsStyleConsts.h @@ -809,7 +809,7 @@ enum class FillMode : uint32_t; // NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT is only used in data structs; it // is never present in stylesheets or computed data. #define NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT 11 -#define NS_STYLE_TEXT_ALIGN_TRUE 12 +#define NS_STYLE_TEXT_ALIGN_UNSAFE 12 #define NS_STYLE_TEXT_ALIGN_MATCH_PARENT 13 // Note: make sure that the largest NS_STYLE_TEXT_ALIGN_* value is smaller than // the smallest NS_STYLE_VERTICAL_ALIGN_* value below!