зеркало из https://github.com/mozilla/gecko-dev.git
Bug 997006 - rename text-combine-horizontal to text-combine-upright. r=dholbert
This commit is contained in:
Родитель
c95190797a
Коммит
89d63e9b46
|
@ -738,7 +738,7 @@ protected:
|
|||
bool ParseTextAlignLast(nsCSSValue& aValue);
|
||||
bool ParseTextDecoration();
|
||||
bool ParseTextDecorationLine(nsCSSValue& aValue);
|
||||
bool ParseTextCombineHorizontal(nsCSSValue& aValue);
|
||||
bool ParseTextCombineUpright(nsCSSValue& aValue);
|
||||
bool ParseTextOverflow(nsCSSValue& aValue);
|
||||
bool ParseTouchAction(nsCSSValue& aValue);
|
||||
|
||||
|
@ -9322,8 +9322,8 @@ CSSParserImpl::ParseSingleValueProperty(nsCSSValue& aValue,
|
|||
return ParseTextAlignLast(aValue);
|
||||
case eCSSProperty_text_decoration_line:
|
||||
return ParseTextDecorationLine(aValue);
|
||||
case eCSSProperty_text_combine_horizontal:
|
||||
return ParseTextCombineHorizontal(aValue);
|
||||
case eCSSProperty_text_combine_upright:
|
||||
return ParseTextCombineUpright(aValue);
|
||||
case eCSSProperty_text_overflow:
|
||||
return ParseTextOverflow(aValue);
|
||||
case eCSSProperty_touch_action:
|
||||
|
@ -12433,16 +12433,16 @@ CSSParserImpl::ParseTouchAction(nsCSSValue& aValue)
|
|||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseTextCombineHorizontal(nsCSSValue& aValue)
|
||||
CSSParserImpl::ParseTextCombineUpright(nsCSSValue& aValue)
|
||||
{
|
||||
if (!ParseVariant(aValue, VARIANT_HK,
|
||||
nsCSSProps::kTextCombineHorizontalKTable)) {
|
||||
nsCSSProps::kTextCombineUprightKTable)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// if 'digits', need to check for an explicit number [2, 3, 4]
|
||||
if (eCSSUnit_Enumerated == aValue.GetUnit() &&
|
||||
aValue.GetIntValue() == NS_STYLE_TEXT_COMBINE_HORIZ_DIGITS_2) {
|
||||
aValue.GetIntValue() == NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_2) {
|
||||
if (!GetToken(true)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -12451,11 +12451,11 @@ CSSParserImpl::ParseTextCombineHorizontal(nsCSSValue& aValue)
|
|||
case 2: // already set, nothing to do
|
||||
break;
|
||||
case 3:
|
||||
aValue.SetIntValue(NS_STYLE_TEXT_COMBINE_HORIZ_DIGITS_3,
|
||||
aValue.SetIntValue(NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_3,
|
||||
eCSSUnit_Enumerated);
|
||||
break;
|
||||
case 4:
|
||||
aValue.SetIntValue(NS_STYLE_TEXT_COMBINE_HORIZ_DIGITS_4,
|
||||
aValue.SetIntValue(NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_4,
|
||||
eCSSUnit_Enumerated);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -3011,15 +3011,15 @@ CSS_PROP_SHORTHAND(
|
|||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
CSS_PROP_TEXT(
|
||||
text-combine-horizontal,
|
||||
text_combine_horizontal,
|
||||
TextCombineHorizontal,
|
||||
text-combine-upright,
|
||||
text_combine_upright,
|
||||
TextCombineUpright,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_PARSER_FUNCTION,
|
||||
"layout.css.vertical-text.enabled",
|
||||
0,
|
||||
kTextCombineHorizontalKTable,
|
||||
offsetof(nsStyleText, mTextCombineHorizontal),
|
||||
kTextCombineUprightKTable,
|
||||
offsetof(nsStyleText, mTextCombineUpright),
|
||||
eStyleAnimType_EnumU8)
|
||||
CSS_PROP_TEXTRESET(
|
||||
-moz-text-decoration-color,
|
||||
|
|
|
@ -1570,10 +1570,10 @@ KTableValue nsCSSProps::kTextAlignLastKTable[] = {
|
|||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
||||
const KTableValue nsCSSProps::kTextCombineHorizontalKTable[] = {
|
||||
eCSSKeyword_none, NS_STYLE_TEXT_COMBINE_HORIZ_NONE,
|
||||
eCSSKeyword_all, NS_STYLE_TEXT_COMBINE_HORIZ_ALL,
|
||||
eCSSKeyword_digits, NS_STYLE_TEXT_COMBINE_HORIZ_DIGITS_2, // w/o number ==> 2
|
||||
const KTableValue nsCSSProps::kTextCombineUprightKTable[] = {
|
||||
eCSSKeyword_none, NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE,
|
||||
eCSSKeyword_all, NS_STYLE_TEXT_COMBINE_UPRIGHT_ALL,
|
||||
eCSSKeyword_digits, NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_2, // w/o number ==> 2
|
||||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
||||
|
|
|
@ -618,7 +618,7 @@ public:
|
|||
// "layout.css.text-align-true-value.enabled" changes:
|
||||
static KTableValue kTextAlignKTable[];
|
||||
static KTableValue kTextAlignLastKTable[];
|
||||
static const KTableValue kTextCombineHorizontalKTable[];
|
||||
static const KTableValue kTextCombineUprightKTable[];
|
||||
static const KTableValue kTextDecorationLineKTable[];
|
||||
static const KTableValue kTextDecorationStyleKTable[];
|
||||
static const KTableValue kTextOrientationKTable[];
|
||||
|
|
|
@ -953,13 +953,13 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult,
|
|||
switch(aProperty) {
|
||||
|
||||
|
||||
case eCSSProperty_text_combine_horizontal:
|
||||
if (intValue <= NS_STYLE_TEXT_COMBINE_HORIZ_ALL) {
|
||||
case eCSSProperty_text_combine_upright:
|
||||
if (intValue <= NS_STYLE_TEXT_COMBINE_UPRIGHT_ALL) {
|
||||
AppendASCIItoUTF16(nsCSSProps::LookupPropertyValue(aProperty, intValue),
|
||||
aResult);
|
||||
} else if (intValue == NS_STYLE_TEXT_COMBINE_HORIZ_DIGITS_2) {
|
||||
} else if (intValue == NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_2) {
|
||||
aResult.AppendLiteral("digits 2");
|
||||
} else if (intValue == NS_STYLE_TEXT_COMBINE_HORIZ_DIGITS_3) {
|
||||
} else if (intValue == NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_3) {
|
||||
aResult.AppendLiteral("digits 3");
|
||||
} else {
|
||||
aResult.AppendLiteral("digits 4");
|
||||
|
|
|
@ -3125,18 +3125,18 @@ nsComputedDOMStyle::DoGetTextAlignLast()
|
|||
}
|
||||
|
||||
CSSValue*
|
||||
nsComputedDOMStyle::DoGetTextCombineHorizontal()
|
||||
nsComputedDOMStyle::DoGetTextCombineUpright()
|
||||
{
|
||||
nsROCSSPrimitiveValue *val = new nsROCSSPrimitiveValue;
|
||||
uint8_t tch = StyleText()->mTextCombineHorizontal;
|
||||
uint8_t tch = StyleText()->mTextCombineUpright;
|
||||
|
||||
if (tch <= NS_STYLE_TEXT_COMBINE_HORIZ_ALL) {
|
||||
if (tch <= NS_STYLE_TEXT_COMBINE_UPRIGHT_ALL) {
|
||||
val->SetIdent(
|
||||
nsCSSProps::ValueToKeywordEnum(tch,
|
||||
nsCSSProps::kTextCombineHorizontalKTable));
|
||||
} else if (tch <= NS_STYLE_TEXT_COMBINE_HORIZ_DIGITS_2) {
|
||||
nsCSSProps::kTextCombineUprightKTable));
|
||||
} else if (tch <= NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_2) {
|
||||
val->SetString(NS_LITERAL_STRING("digits 2"));
|
||||
} else if (tch <= NS_STYLE_TEXT_COMBINE_HORIZ_DIGITS_3) {
|
||||
} else if (tch <= NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_3) {
|
||||
val->SetString(NS_LITERAL_STRING("digits 3"));
|
||||
} else {
|
||||
val->SetString(NS_LITERAL_STRING("digits 4"));
|
||||
|
|
|
@ -376,7 +376,7 @@ private:
|
|||
mozilla::dom::CSSValue* DoGetLineHeight();
|
||||
mozilla::dom::CSSValue* DoGetTextAlign();
|
||||
mozilla::dom::CSSValue* DoGetTextAlignLast();
|
||||
mozilla::dom::CSSValue* DoGetTextCombineHorizontal();
|
||||
mozilla::dom::CSSValue* DoGetTextCombineUpright();
|
||||
mozilla::dom::CSSValue* DoGetTextDecoration();
|
||||
mozilla::dom::CSSValue* DoGetTextDecorationColor();
|
||||
mozilla::dom::CSSValue* DoGetTextDecorationLine();
|
||||
|
|
|
@ -195,7 +195,7 @@ COMPUTED_STYLE_PROP(right, Right)
|
|||
//// COMPUTED_STYLE_PROP(size, Size)
|
||||
COMPUTED_STYLE_PROP(table_layout, TableLayout)
|
||||
COMPUTED_STYLE_PROP(text_align, TextAlign)
|
||||
COMPUTED_STYLE_PROP(text_combine_horizontal, TextCombineHorizontal)
|
||||
COMPUTED_STYLE_PROP(text_combine_upright, TextCombineUpright)
|
||||
COMPUTED_STYLE_PROP(text_decoration, TextDecoration)
|
||||
COMPUTED_STYLE_PROP(text_indent, TextIndent)
|
||||
COMPUTED_STYLE_PROP(text_orientation, TextOrientation)
|
||||
|
|
|
@ -4261,13 +4261,13 @@ nsRuleNode::ComputeTextData(void* aStartStruct,
|
|||
parentText->mTextOrientation,
|
||||
NS_STYLE_TEXT_ORIENTATION_AUTO, 0, 0, 0, 0);
|
||||
|
||||
// text-combine-horizontal: enum, inherit, initial
|
||||
SetDiscrete(*aRuleData->ValueForTextCombineHorizontal(),
|
||||
text->mTextCombineHorizontal,
|
||||
// text-combine-upright: enum, inherit, initial
|
||||
SetDiscrete(*aRuleData->ValueForTextCombineUpright(),
|
||||
text->mTextCombineUpright,
|
||||
canStoreInRuleTree,
|
||||
SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT,
|
||||
parentText->mTextCombineHorizontal,
|
||||
NS_STYLE_TEXT_COMBINE_HORIZ_NONE, 0, 0, 0, 0);
|
||||
parentText->mTextCombineUpright,
|
||||
NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE, 0, 0, 0, 0);
|
||||
|
||||
COMPUTE_END_INHERITED(Text, text)
|
||||
}
|
||||
|
|
|
@ -843,11 +843,11 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
|
|||
#define NS_STYLE_TEXT_ORIENTATION_SIDEWAYS 2
|
||||
|
||||
// See nsStyleText
|
||||
#define NS_STYLE_TEXT_COMBINE_HORIZ_NONE 0
|
||||
#define NS_STYLE_TEXT_COMBINE_HORIZ_ALL 1
|
||||
#define NS_STYLE_TEXT_COMBINE_HORIZ_DIGITS_2 2
|
||||
#define NS_STYLE_TEXT_COMBINE_HORIZ_DIGITS_3 3
|
||||
#define NS_STYLE_TEXT_COMBINE_HORIZ_DIGITS_4 4
|
||||
#define NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE 0
|
||||
#define NS_STYLE_TEXT_COMBINE_UPRIGHT_ALL 1
|
||||
#define NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_2 2
|
||||
#define NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_3 3
|
||||
#define NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_4 4
|
||||
|
||||
// See nsStyleText
|
||||
#define NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT 0
|
||||
|
|
|
@ -3058,7 +3058,7 @@ nsStyleText::nsStyleText(void)
|
|||
mHyphens = NS_STYLE_HYPHENS_MANUAL;
|
||||
mTextSizeAdjust = NS_STYLE_TEXT_SIZE_ADJUST_AUTO;
|
||||
mTextOrientation = NS_STYLE_TEXT_ORIENTATION_AUTO;
|
||||
mTextCombineHorizontal = NS_STYLE_TEXT_COMBINE_HORIZ_NONE;
|
||||
mTextCombineUpright = NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE;
|
||||
mControlCharacterVisibility = NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN;
|
||||
|
||||
mLetterSpacing.SetNormalValue();
|
||||
|
@ -3082,7 +3082,7 @@ nsStyleText::nsStyleText(const nsStyleText& aSource)
|
|||
mHyphens(aSource.mHyphens),
|
||||
mTextSizeAdjust(aSource.mTextSizeAdjust),
|
||||
mTextOrientation(aSource.mTextOrientation),
|
||||
mTextCombineHorizontal(aSource.mTextCombineHorizontal),
|
||||
mTextCombineUpright(aSource.mTextCombineUpright),
|
||||
mControlCharacterVisibility(aSource.mControlCharacterVisibility),
|
||||
mTabSize(aSource.mTabSize),
|
||||
mWordSpacing(aSource.mWordSpacing),
|
||||
|
@ -3107,7 +3107,7 @@ nsChangeHint nsStyleText::CalcDifference(const nsStyleText& aOther) const
|
|||
return NS_STYLE_HINT_FRAMECHANGE;
|
||||
}
|
||||
|
||||
if (mTextCombineHorizontal != aOther.mTextCombineHorizontal ||
|
||||
if (mTextCombineUpright != aOther.mTextCombineUpright ||
|
||||
mControlCharacterVisibility != aOther.mControlCharacterVisibility) {
|
||||
return nsChangeHint_ReconstructFrame;
|
||||
}
|
||||
|
|
|
@ -1526,7 +1526,7 @@ struct nsStyleText {
|
|||
uint8_t mHyphens; // [inherited] see nsStyleConsts.h
|
||||
uint8_t mTextSizeAdjust; // [inherited] see nsStyleConsts.h
|
||||
uint8_t mTextOrientation; // [inherited] see nsStyleConsts.h
|
||||
uint8_t mTextCombineHorizontal; // [inherited] see nsStyleConsts.h
|
||||
uint8_t mTextCombineUpright; // [inherited] see nsStyleConsts.h
|
||||
uint8_t mControlCharacterVisibility; // [inherited] see nsStyleConsts.h
|
||||
int32_t mTabSize; // [inherited] see nsStyleConsts.h
|
||||
|
||||
|
|
|
@ -4398,8 +4398,8 @@ if (SpecialPowers.getBoolPref("layout.css.vertical-text.enabled")) {
|
|||
other_values: [ "upright", "sideways" ],
|
||||
invalid_values: [ "none", "3em" ]
|
||||
},
|
||||
"text-combine-horizontal": {
|
||||
domProp: "textCombineHorizontal",
|
||||
"text-combine-upright": {
|
||||
domProp: "textCombineUpright",
|
||||
inherited: true,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "none" ],
|
||||
|
|
|
@ -68,7 +68,7 @@ function step() {
|
|||
// ----
|
||||
|
||||
var gProps = {
|
||||
"layout.css.vertical-text.enabled": ["text-combine-horizontal", "text-orientation", "writing-mode"],
|
||||
"layout.css.vertical-text.enabled": ["text-combine-upright", "text-orientation", "writing-mode"],
|
||||
"layout.css.font-features.enabled": ["font-kerning", "font-synthesis", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position"],
|
||||
"layout.css.image-orientation.enabled": ["image-orientation"],
|
||||
"layout.css.mix-blend-mode.enabled": ["mix-blend-mode"],
|
||||
|
|
Загрузка…
Ссылка в новой задаче