Replace usages of whitelist/blacklist
This patch replaces unwelcoming language with better terms.
Generally, the following replacements are made:
- whitelist → allowlist
- blacklist → blocklist
However, in some cases where “whitelist” was used as part of the
function name (e.g. `isWhitelistedProperty`) it felt more natural to
simplify the name (i.e. `isAllowedProperty` instead of the slightly
awkward `isAllowlistedProperty`).
This patch does not change third_party dependencies nor Lighthouse.
It also leaves `setWhitelistedShortcuts` for now, since renaming that
requires changes in Blink.
Change-Id: I56712d15b32b6a4259ccb333de6edd5fc62ee03f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238229
Reviewed-by: Yang Guo <[email protected]>
Commit-Queue: Mathias Bynens <[email protected]>
diff --git a/front_end/console/ConsoleViewMessage.js b/front_end/console/ConsoleViewMessage.js
index aa48f78..36aec76 100644
--- a/front_end/console/ConsoleViewMessage.js
+++ b/front_end/console/ConsoleViewMessage.js
@@ -886,13 +886,13 @@
buffer.setAttribute('style', obj.description);
for (let i = 0; i < buffer.style.length; i++) {
const property = buffer.style[i];
- if (isWhitelistedProperty(property)) {
+ if (isAllowedProperty(property)) {
currentStyle[property] = buffer.style[property];
}
}
}
- function isWhitelistedProperty(property) {
+ function isAllowedProperty(property) {
// Make sure that allowed properties do not interfere with link visibility.
const prefixes = [
'background', 'border', 'color', 'font', 'line', 'margin', 'padding', 'text', '-webkit-background',