Bug 1654004 - Tweak browser_parsable_css.js to account for other rules when the ::file-chooser-button pref is disabled. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D84271
This commit is contained in:
Cameron McCormack 2020-07-21 07:57:47 +00:00
Родитель aa01f8a3ec
Коммит 406ebd614d
1 изменённых файлов: 9 добавлений и 8 удалений

Просмотреть файл

@ -50,13 +50,6 @@ let whitelist = [
errorMessage: /Unknown property.*overflow-clip-box/i,
isFromDevTools: false,
},
// System colors reserved to UA / chrome sheets
{
sourceName: /(?:res|gre-resources)\/forms\.css$/i,
errorMessage: /Expected color but found \u2018-moz.*/i,
platforms: ["linux"],
isFromDevTools: false,
},
// These variables are declared somewhere else, and error when we load the
// files directly. They're all marked intermittent because their appearance
// in the error console seems to not be consistent.
@ -81,7 +74,15 @@ if (
});
}
if (!Services.prefs.getBoolPref("layout.css.file-chooser-button.enabled")) {
if (Services.prefs.getBoolPref("layout.css.file-chooser-button.enabled")) {
// System colors reserved to UA / chrome sheets
whitelist.push({
sourceName: /(?:res|gre-resources)\/forms\.css$/i,
errorMessage: /Expected color but found \u2018-moz.*/i,
platforms: ["linux"],
isFromDevTools: false,
});
} else {
// Reserved to UA sheets, behind a pref for content.
whitelist.push({
sourceName: /(?:res|gre-resources)\/forms\.css$/i,