forked from mirrors/gecko-dev
Bug 1486074 - Move logic for copying aliased properties' fields to the bottom of property_database.js. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D4247 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
c9437b2c8e
commit
987c1af77f
1 changed files with 31 additions and 28 deletions
|
|
@ -7949,34 +7949,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.text-align-unsafe-value.enabled")) {
|
|||
|
||||
gCSSProperties["display"].other_values.push("flow-root");
|
||||
|
||||
// Copy aliased properties' fields from their alias targets.
|
||||
for (var prop in gCSSProperties) {
|
||||
var entry = gCSSProperties[prop];
|
||||
if (entry.alias_for) {
|
||||
var aliasTargetEntry = gCSSProperties[entry.alias_for];
|
||||
if (!aliasTargetEntry) {
|
||||
ok(false,
|
||||
"Alias '" + prop + "' alias_for field, '" + entry.alias_for + "', " +
|
||||
"must be set to a recognized CSS property in gCSSProperties");
|
||||
} else {
|
||||
// Copy 'values' fields & 'prerequisites' field from aliasTargetEntry:
|
||||
var fieldsToCopy =
|
||||
["initial_values", "other_values", "invalid_values",
|
||||
"quirks_values", "unbalanced_values",
|
||||
"prerequisites"];
|
||||
|
||||
fieldsToCopy.forEach(function(fieldName) {
|
||||
// (Don't copy the field if the alias already has something there,
|
||||
// or if the aliased property doesn't have anything to copy.)
|
||||
if (!(fieldName in entry) &&
|
||||
fieldName in aliasTargetEntry) {
|
||||
entry[fieldName] = aliasTargetEntry[fieldName]
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.column-span.enabled")) {
|
||||
gCSSProperties["column-span"] = {
|
||||
domProp: "columnSpan",
|
||||
|
|
@ -8205,3 +8177,34 @@ if (IsCSSPropertyPrefEnabled("layout.css.overflow.moz-scrollbars.enabled")) {
|
|||
} else {
|
||||
gCSSProperties["overflow"].invalid_values.push(...OVERFLOW_MOZKWS);
|
||||
}
|
||||
|
||||
// Copy aliased properties' fields from their alias targets. Keep this logic
|
||||
// at the bottom of this file to ensure all the aliased properties are
|
||||
// processed.
|
||||
for (var prop in gCSSProperties) {
|
||||
var entry = gCSSProperties[prop];
|
||||
if (entry.alias_for) {
|
||||
var aliasTargetEntry = gCSSProperties[entry.alias_for];
|
||||
if (!aliasTargetEntry) {
|
||||
ok(false,
|
||||
"Alias '" + prop + "' alias_for field, '" + entry.alias_for + "', " +
|
||||
"must be set to a recognized CSS property in gCSSProperties");
|
||||
} else {
|
||||
// Copy 'values' fields & 'prerequisites' field from aliasTargetEntry:
|
||||
var fieldsToCopy =
|
||||
["initial_values", "other_values", "invalid_values",
|
||||
"quirks_values", "unbalanced_values",
|
||||
"prerequisites"];
|
||||
|
||||
fieldsToCopy.forEach(function(fieldName) {
|
||||
// (Don't copy the field if the alias already has something there,
|
||||
// or if the aliased property doesn't have anything to copy.)
|
||||
if (!(fieldName in entry) &&
|
||||
fieldName in aliasTargetEntry) {
|
||||
entry[fieldName] = aliasTargetEntry[fieldName]
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue