зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1097499 part 1 - Control support of 'text-combine-upright: digits' via a separate pref. r=heycam
MozReview-Commit-ID: JerTsxaQCL4 --HG-- extra : source : 999d1d2997591935fa1259fa42a91658da8ee078
This commit is contained in:
Родитель
0e273ade3c
Коммит
b1521c643f
|
@ -167,6 +167,7 @@ typedef nsStyleTransformMatrix::TransformReferenceBox TransformReferenceBox;
|
|||
/* static */ bool nsLayoutUtils::sCSSVariablesEnabled;
|
||||
/* static */ bool nsLayoutUtils::sInterruptibleReflowEnabled;
|
||||
/* static */ bool nsLayoutUtils::sSVGTransformBoxEnabled;
|
||||
/* static */ bool nsLayoutUtils::sTextCombineUprightDigitsEnabled;
|
||||
|
||||
static ViewID sScrollIdCounter = FrameMetrics::START_SCROLL_ID;
|
||||
|
||||
|
@ -7716,6 +7717,8 @@ nsLayoutUtils::Initialize()
|
|||
"layout.interruptible-reflow.enabled");
|
||||
Preferences::AddBoolVarCache(&sSVGTransformBoxEnabled,
|
||||
"svg.transform-box.enabled");
|
||||
Preferences::AddBoolVarCache(&sTextCombineUprightDigitsEnabled,
|
||||
"layout.css.text-combine-upright-digits.enabled");
|
||||
|
||||
for (auto& callback : kPrefCallbacks) {
|
||||
Preferences::RegisterCallbackAndCall(callback.func, callback.name);
|
||||
|
|
|
@ -2411,6 +2411,10 @@ public:
|
|||
return sSVGTransformBoxEnabled;
|
||||
}
|
||||
|
||||
static bool TextCombineUprightDigitsEnabled() {
|
||||
return sTextCombineUprightDigitsEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* See comment above "font.size.inflation.mappingIntercept" in
|
||||
* modules/libpref/src/init/all.js .
|
||||
|
@ -2824,6 +2828,7 @@ private:
|
|||
static bool sCSSVariablesEnabled;
|
||||
static bool sInterruptibleReflowEnabled;
|
||||
static bool sSVGTransformBoxEnabled;
|
||||
static bool sTextCombineUprightDigitsEnabled;
|
||||
|
||||
/**
|
||||
* Helper function for LogTestDataForPaint().
|
||||
|
|
|
@ -15165,6 +15165,9 @@ CSSParserImpl::ParseTextCombineUpright(nsCSSValue& aValue)
|
|||
// if 'digits', need to check for an explicit number [2, 3, 4]
|
||||
if (eCSSUnit_Enumerated == aValue.GetUnit() &&
|
||||
aValue.GetIntValue() == NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_2) {
|
||||
if (!nsLayoutUtils::TextCombineUprightDigitsEnabled()) {
|
||||
return false;
|
||||
}
|
||||
if (!GetToken(true)) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -5426,11 +5426,15 @@ if (IsCSSPropertyPrefEnabled("layout.css.text-combine-upright.enabled")) {
|
|||
inherited: true,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "none" ],
|
||||
other_values: [ "all", "digits", "digits 2", "digits 3", "digits 4", "digits 3" ],
|
||||
other_values: [ "all" ],
|
||||
invalid_values: [ "auto", "all 2", "none all", "digits -3", "digits 0",
|
||||
"digits 12", "none 3", "digits 3.1415", "digits3", "digits 1",
|
||||
"digits 3 all", "digits foo", "digits all", "digits 3.0" ]
|
||||
};
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.text-combine-upright-digits.enabled")) {
|
||||
gCSSProperties["text-combine-upright"].other_values.push(
|
||||
"digits", "digits 2", "digits 3", "digits 4", "digits 3");
|
||||
}
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.masking.enabled")) {
|
||||
|
|
|
@ -2432,6 +2432,8 @@ pref("layout.css.vertical-text.enabled", true);
|
|||
|
||||
// Is support for CSS text-combine-upright (tate-chu-yoko) enabled?
|
||||
pref("layout.css.text-combine-upright.enabled", false);
|
||||
// Is support for CSS text-combine-upright: digits 2-4 enabled?
|
||||
pref("layout.css.text-combine-upright-digits.enabled", false);
|
||||
|
||||
// Is support for object-fit and object-position enabled?
|
||||
pref("layout.css.object-fit-and-position.enabled", true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче