Bug 1319015 - fix css-properties normalization when remote dbg old ff;r=pbro
MozReview-Commit-ID: L6lPypzjzNv
--- a/devtools/shared/fronts/css-properties.js
+++ b/devtools/shared/fronts/css-properties.js
@@ -263,32 +263,36 @@ function normalizeCssData(db) {
// now it returns an object with multiple types of CSS information.
if (!db.properties) {
db = { properties: db };
}
// Fill in any missing DB information from the static database.
db = Object.assign({}, CSS_PROPERTIES_DB, db);
+ let missingSupports = !db.properties.color.supports;
+ let missingValues = !db.properties.color.values;
+ let missingSubproperties = !db.properties.background.subproperties;
+
for (let name in db.properties) {
// Skip the current property if we can't find it in CSS_PROPERTIES_DB.
if (typeof CSS_PROPERTIES_DB.properties[name] !== "object") {
continue;
}
// Add "supports" information to the css properties if it's missing.
- if (!db.properties.color.supports) {
+ if (missingSupports) {
db.properties[name].supports = CSS_PROPERTIES_DB.properties[name].supports;
}
// Add "values" information to the css properties if it's missing.
- if (!db.properties.color.values) {
+ if (missingValues) {
db.properties[name].values = CSS_PROPERTIES_DB.properties[name].values;
}
// Add "subproperties" information to the css properties if it's missing.
- if (!db.properties.background.subproperties) {
+ if (missingSubproperties) {
db.properties[name].subproperties =
CSS_PROPERTIES_DB.properties[name].subproperties;
}
}
}
reattachCssColorValues(db);