зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1195018 - Support 'background_color' member in the manifest processor. r=marcosc
This commit is contained in:
Родитель
69e504a564
Коммит
25c5f0d76a
|
@ -90,6 +90,7 @@ this.ManifestProcessor = { // jshint ignore:line
|
|||
),
|
||||
'short_name': processShortNameMember(),
|
||||
'theme_color': processThemeColorMember(),
|
||||
'background_color': processBackgroundColorMember(),
|
||||
};
|
||||
processedManifest.scope = processScopeMember();
|
||||
return processedManifest;
|
||||
|
@ -224,6 +225,17 @@ this.ManifestProcessor = { // jshint ignore:line
|
|||
return extractor.extractColorValue(spec);
|
||||
}
|
||||
|
||||
function processBackgroundColorMember() {
|
||||
const spec = {
|
||||
objectName: 'manifest',
|
||||
object: rawManifest,
|
||||
property: 'background_color',
|
||||
expectedType: 'string',
|
||||
trim: true
|
||||
};
|
||||
return extractor.extractColorValue(spec);
|
||||
}
|
||||
|
||||
function processLangMember() {
|
||||
const spec = {
|
||||
objectName: 'manifest',
|
||||
|
|
|
@ -53,7 +53,7 @@ ValueExtractor.prototype = {
|
|||
if (DOMUtils.isValidCSSColor(value)) {
|
||||
color = value;
|
||||
} else if (value) {
|
||||
const msg = `background_color: ${value} is not a valid CSS color.`;
|
||||
const msg = `${spec.property}: ${value} is not a valid CSS color.`;
|
||||
this.console.warn(msg);
|
||||
}
|
||||
return color;
|
||||
|
|
Загрузка…
Ссылка в новой задаче