mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out 3 changesets (bug 1250342) for reftest failures in text-align-true.html CLOSED TREE
Backed out changeset 0eae0890ee11 (bug 1250342) Backed out changeset e82e430d0eda (bug 1250342) Backed out changeset 866f8a7337df (bug 1250342)
This commit is contained in:
parent
eb51f3519d
commit
18cead6ef6
@ -139,7 +139,7 @@ using namespace mozilla::gfx;
|
||||
#define GRID_TEMPLATE_SUBGRID_ENABLED_PREF_NAME "layout.css.grid-template-subgrid-value.enabled"
|
||||
#define STICKY_ENABLED_PREF_NAME "layout.css.sticky.enabled"
|
||||
#define DISPLAY_CONTENTS_ENABLED_PREF_NAME "layout.css.display-contents.enabled"
|
||||
#define TEXT_ALIGN_UNSAFE_ENABLED_PREF_NAME "layout.css.text-align-unsafe-value.enabled"
|
||||
#define TEXT_ALIGN_TRUE_ENABLED_PREF_NAME "layout.css.text-align-true-value.enabled"
|
||||
#define FLOAT_LOGICAL_VALUES_ENABLED_PREF_NAME "layout.css.float-logical-values.enabled"
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -281,29 +281,29 @@ DisplayContentsEnabledPrefChangeCallback(const char* aPrefName, void* aClosure)
|
||||
}
|
||||
}
|
||||
|
||||
// When the pref "layout.css.text-align-unsafe-value.enabled" changes, this
|
||||
// When the pref "layout.css.text-align-true-value.enabled" changes, this
|
||||
// function is called to let us update kTextAlignKTable & kTextAlignLastKTable,
|
||||
// to selectively disable or restore the entries for "true" in those tables.
|
||||
static void
|
||||
TextAlignUnsafeEnabledPrefChangeCallback(const char* aPrefName, void* aClosure)
|
||||
TextAlignTrueEnabledPrefChangeCallback(const char* aPrefName, void* aClosure)
|
||||
{
|
||||
NS_ASSERTION(strcmp(aPrefName, TEXT_ALIGN_UNSAFE_ENABLED_PREF_NAME) == 0,
|
||||
"Did you misspell " TEXT_ALIGN_UNSAFE_ENABLED_PREF_NAME " ?");
|
||||
NS_ASSERTION(strcmp(aPrefName, TEXT_ALIGN_TRUE_ENABLED_PREF_NAME) == 0,
|
||||
"Did you misspell " TEXT_ALIGN_TRUE_ENABLED_PREF_NAME " ?");
|
||||
|
||||
static bool sIsInitialized;
|
||||
static int32_t sIndexOfTrueInTextAlignTable;
|
||||
static int32_t sIndexOfTrueInTextAlignLastTable;
|
||||
bool isTextAlignUnsafeEnabled =
|
||||
Preferences::GetBool(TEXT_ALIGN_UNSAFE_ENABLED_PREF_NAME, false);
|
||||
bool isTextAlignTrueEnabled =
|
||||
Preferences::GetBool(TEXT_ALIGN_TRUE_ENABLED_PREF_NAME, false);
|
||||
|
||||
if (!sIsInitialized) {
|
||||
// First run: find the position of "true" in kTextAlignKTable.
|
||||
sIndexOfTrueInTextAlignTable =
|
||||
nsCSSProps::FindIndexOfKeyword(eCSSKeyword_unsafe,
|
||||
nsCSSProps::FindIndexOfKeyword(eCSSKeyword_true,
|
||||
nsCSSProps::kTextAlignKTable);
|
||||
// First run: find the position of "true" in kTextAlignLastKTable.
|
||||
sIndexOfTrueInTextAlignLastTable =
|
||||
nsCSSProps::FindIndexOfKeyword(eCSSKeyword_unsafe,
|
||||
nsCSSProps::FindIndexOfKeyword(eCSSKeyword_true,
|
||||
nsCSSProps::kTextAlignLastKTable);
|
||||
sIsInitialized = true;
|
||||
}
|
||||
@ -312,10 +312,10 @@ TextAlignUnsafeEnabledPrefChangeCallback(const char* aPrefName, void* aClosure)
|
||||
// depending on whether the pref is enabled vs. disabled.
|
||||
MOZ_ASSERT(sIndexOfTrueInTextAlignTable >= 0);
|
||||
nsCSSProps::kTextAlignKTable[sIndexOfTrueInTextAlignTable].mKeyword =
|
||||
isTextAlignUnsafeEnabled ? eCSSKeyword_unsafe : eCSSKeyword_UNKNOWN;
|
||||
isTextAlignTrueEnabled ? eCSSKeyword_true : eCSSKeyword_UNKNOWN;
|
||||
MOZ_ASSERT(sIndexOfTrueInTextAlignLastTable >= 0);
|
||||
nsCSSProps::kTextAlignLastKTable[sIndexOfTrueInTextAlignLastTable].mKeyword =
|
||||
isTextAlignUnsafeEnabled ? eCSSKeyword_unsafe : eCSSKeyword_UNKNOWN;
|
||||
isTextAlignTrueEnabled ? eCSSKeyword_true : eCSSKeyword_UNKNOWN;
|
||||
}
|
||||
|
||||
// When the pref "layout.css.float-logical-values.enabled" changes, this
|
||||
@ -659,19 +659,19 @@ nsLayoutUtils::IsGridTemplateSubgridValueEnabled()
|
||||
}
|
||||
|
||||
bool
|
||||
nsLayoutUtils::IsTextAlignUnsafeValueEnabled()
|
||||
nsLayoutUtils::IsTextAlignTrueValueEnabled()
|
||||
{
|
||||
static bool sTextAlignUnsafeValueEnabled;
|
||||
static bool sTextAlignUnsafeValueEnabledPrefCached = false;
|
||||
static bool sTextAlignTrueValueEnabled;
|
||||
static bool sTextAlignTrueValueEnabledPrefCached = false;
|
||||
|
||||
if (!sTextAlignUnsafeValueEnabledPrefCached) {
|
||||
sTextAlignUnsafeValueEnabledPrefCached = true;
|
||||
Preferences::AddBoolVarCache(&sTextAlignUnsafeValueEnabled,
|
||||
TEXT_ALIGN_UNSAFE_ENABLED_PREF_NAME,
|
||||
if (!sTextAlignTrueValueEnabledPrefCached) {
|
||||
sTextAlignTrueValueEnabledPrefCached = true;
|
||||
Preferences::AddBoolVarCache(&sTextAlignTrueValueEnabled,
|
||||
TEXT_ALIGN_TRUE_ENABLED_PREF_NAME,
|
||||
false);
|
||||
}
|
||||
|
||||
return sTextAlignUnsafeValueEnabled;
|
||||
return sTextAlignTrueValueEnabled;
|
||||
}
|
||||
|
||||
void
|
||||
@ -7538,14 +7538,14 @@ nsLayoutUtils::Initialize()
|
||||
Preferences::RegisterCallback(StickyEnabledPrefChangeCallback,
|
||||
STICKY_ENABLED_PREF_NAME);
|
||||
StickyEnabledPrefChangeCallback(STICKY_ENABLED_PREF_NAME, nullptr);
|
||||
Preferences::RegisterCallback(TextAlignUnsafeEnabledPrefChangeCallback,
|
||||
TEXT_ALIGN_UNSAFE_ENABLED_PREF_NAME);
|
||||
Preferences::RegisterCallback(TextAlignTrueEnabledPrefChangeCallback,
|
||||
TEXT_ALIGN_TRUE_ENABLED_PREF_NAME);
|
||||
Preferences::RegisterCallback(DisplayContentsEnabledPrefChangeCallback,
|
||||
DISPLAY_CONTENTS_ENABLED_PREF_NAME);
|
||||
DisplayContentsEnabledPrefChangeCallback(DISPLAY_CONTENTS_ENABLED_PREF_NAME,
|
||||
nullptr);
|
||||
TextAlignUnsafeEnabledPrefChangeCallback(TEXT_ALIGN_UNSAFE_ENABLED_PREF_NAME,
|
||||
nullptr);
|
||||
TextAlignTrueEnabledPrefChangeCallback(TEXT_ALIGN_TRUE_ENABLED_PREF_NAME,
|
||||
nullptr);
|
||||
Preferences::RegisterCallback(FloatLogicalValuesEnabledPrefChangeCallback,
|
||||
FLOAT_LOGICAL_VALUES_ENABLED_PREF_NAME);
|
||||
FloatLogicalValuesEnabledPrefChangeCallback(FLOAT_LOGICAL_VALUES_ENABLED_PREF_NAME,
|
||||
|
@ -2291,7 +2291,7 @@ public:
|
||||
* Checks whether support for the CSS text-align (and -moz-text-align-last)
|
||||
* 'true' value is enabled.
|
||||
*/
|
||||
static bool IsTextAlignUnsafeValueEnabled();
|
||||
static bool IsTextAlignTrueValueEnabled();
|
||||
|
||||
/**
|
||||
* Checks if CSS variables are currently enabled.
|
||||
|
@ -307,7 +307,7 @@ fails-if(!cocoaWidget||OSX==1006||OSX==1007) != osx-font-smoothing.html osx-font
|
||||
fails-if(!cocoaWidget||OSX==1006||OSX==1007) != osx-font-smoothing-2.html osx-font-smoothing-2-notref.html
|
||||
== osx-font-smoothing-2.html osx-font-smoothing-2-ref.html
|
||||
|
||||
pref(layout.css.text-align-unsafe-value.enabled,true) == text-align-true.html text-align-true-ref.html
|
||||
pref(layout.css.text-align-true-value.enabled,true) == text-align-true.html text-align-true-ref.html
|
||||
|
||||
# stray control chars should be visible by default, bug 1099557
|
||||
!= control-chars-01a.html control-chars-01-notref.html
|
||||
|
@ -593,6 +593,7 @@ CSS_KEY(translatez, translatez)
|
||||
CSS_KEY(transparent, transparent) // for nsComputedDOMStyle only
|
||||
CSS_KEY(triangle, triangle)
|
||||
CSS_KEY(tri-state, tri_state)
|
||||
CSS_KEY(true, true)
|
||||
CSS_KEY(ultra-condensed, ultra_condensed)
|
||||
CSS_KEY(ultra-expanded, ultra_expanded)
|
||||
CSS_KEY(under, under)
|
||||
|
@ -14887,7 +14887,7 @@ CSSParserImpl::ParseTextAlign(nsCSSValue& aValue, const KTableEntry aTable[])
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!nsLayoutUtils::IsTextAlignUnsafeValueEnabled()) {
|
||||
if (!nsLayoutUtils::IsTextAlignTrueValueEnabled()) {
|
||||
aValue = left;
|
||||
return true;
|
||||
}
|
||||
@ -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_UNSAFE &&
|
||||
right.GetIntValue() == NS_STYLE_TEXT_ALIGN_UNSAFE) {
|
||||
if (left.GetIntValue() == NS_STYLE_TEXT_ALIGN_TRUE &&
|
||||
right.GetIntValue() == NS_STYLE_TEXT_ALIGN_TRUE) {
|
||||
return false;
|
||||
}
|
||||
aValue.SetPairValue(left, right);
|
||||
} else {
|
||||
// Single value 'true' is not allowed.
|
||||
if (left.GetIntValue() == NS_STYLE_TEXT_ALIGN_UNSAFE) {
|
||||
if (left.GetIntValue() == NS_STYLE_TEXT_ALIGN_TRUE) {
|
||||
return false;
|
||||
}
|
||||
aValue = left;
|
||||
|
@ -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_UNSAFE },
|
||||
{ eCSSKeyword_true, NS_STYLE_TEXT_ALIGN_TRUE },
|
||||
{ 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_UNSAFE },
|
||||
{ eCSSKeyword_true, NS_STYLE_TEXT_ALIGN_TRUE },
|
||||
{ eCSSKeyword_UNKNOWN, -1 }
|
||||
};
|
||||
|
||||
|
@ -813,7 +813,7 @@ public:
|
||||
static const KTableEntry kStackSizingKTable[];
|
||||
static const KTableEntry kTableLayoutKTable[];
|
||||
// Not const because we modify its entries when the pref
|
||||
// "layout.css.text-align-unsafe-value.enabled" changes:
|
||||
// "layout.css.text-align-true-value.enabled" changes:
|
||||
static KTableEntry kTextAlignKTable[];
|
||||
static KTableEntry kTextAlignLastKTable[];
|
||||
static const KTableEntry kTextCombineUprightKTable[];
|
||||
|
@ -3534,7 +3534,7 @@ nsComputedDOMStyle::CreateTextAlignValue(uint8_t aAlign, bool aAlignTrue,
|
||||
}
|
||||
|
||||
RefPtr<nsROCSSPrimitiveValue> first = new nsROCSSPrimitiveValue;
|
||||
first->SetIdent(eCSSKeyword_unsafe);
|
||||
first->SetIdent(eCSSKeyword_true);
|
||||
|
||||
RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(false);
|
||||
valueList->AppendCSSValue(first.forget());
|
||||
|
@ -4392,7 +4392,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_UNSAFE) {
|
||||
if (textAlignValue->GetIntValue() == NS_STYLE_TEXT_ALIGN_TRUE) {
|
||||
textAlignValue = &textAlignValuePair.mYValue;
|
||||
}
|
||||
} else if (eCSSUnit_String == textAlignValue->GetUnit()) {
|
||||
@ -4417,7 +4417,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_UNSAFE) {
|
||||
if (textAlignLastValue->GetIntValue() == NS_STYLE_TEXT_ALIGN_TRUE) {
|
||||
textAlignLastValue = &textAlignLastValuePair.mYValue;
|
||||
}
|
||||
}
|
||||
|
@ -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_UNSAFE 12
|
||||
#define NS_STYLE_TEXT_ALIGN_TRUE 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!
|
||||
|
@ -7300,7 +7300,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.unset-value.enabled")) {
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.filters.enabled")) {
|
||||
gCSSProperties["filter"].invalid_values.push("drop-shadow(unset, 2px 2px)", "drop-shadow(2px 2px, unset)");
|
||||
}
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.text-align-unsafe-value.enabled")) {
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.text-align-true-value.enabled")) {
|
||||
gCSSProperties["text-align"].other_values.push("true left");
|
||||
} else {
|
||||
gCSSProperties["text-align"].invalid_values.push("true left");
|
||||
|
@ -2346,8 +2346,8 @@ pref("layout.css.convertFromNode.enabled", false);
|
||||
pref("layout.css.convertFromNode.enabled", true);
|
||||
#endif
|
||||
|
||||
// Is support for CSS "text-align: unsafe X" enabled?
|
||||
pref("layout.css.text-align-unsafe-value.enabled", false);
|
||||
// Is support for CSS "text-align: true X" enabled?
|
||||
pref("layout.css.text-align-true-value.enabled", false);
|
||||
|
||||
// Is support for CSS "float: inline-{start,end}" and
|
||||
// "clear: inline-{start,end}" enabled?
|
||||
|
Loading…
Reference in New Issue
Block a user