Bug 1847753 - [devtools] Stop storing pseudo elements in properties-db. r=devtools-reviewers,nchevobbe

This appears to be unused and only page-actor is reading the list of all pseudo elements
by querying InspectorUtils directly.

Differential Revision: https://phabricator.services.mozilla.com/D185664
This commit is contained in:
Alexandre Poirot 2023-08-09 13:30:40 +00:00
parent e385adffde
commit ab708dfa41
8 changed files with 1 additions and 59 deletions

View File

@ -81,7 +81,6 @@ class CssPropertiesFront extends FrontClassWithSpec(cssPropertiesSpec) {
*/
function CssProperties(db) {
this.properties = db.properties;
this.pseudoElements = db.pseudoElements;
this.isKnown = this.isKnown.bind(this);
this.isInherited = this.isInherited.bind(this);

View File

@ -25,9 +25,8 @@ class CssPropertiesActor extends Actor {
getCSSDatabase() {
const properties = generateCssProperties();
const pseudoElements = InspectorUtils.getCSSPseudoElementNames();
return { properties, pseudoElements };
return { properties };
}
}
exports.CssPropertiesActor = CssPropertiesActor;

View File

@ -24,7 +24,6 @@ dump("DEVTOOLS_CSS_DB_DELIMITER");
dump(
JSON.stringify({
cssProperties: cssProperties(),
pseudoElements: pseudoElements(),
})
);
@ -50,10 +49,3 @@ function cssProperties() {
}
return properties;
}
/**
* The list of all CSS Pseudo Elements.
*/
function pseudoElements() {
return InspectorUtils.getCSSPseudoElementNames();
}

View File

@ -52,7 +52,6 @@ def generate_css_db(command_context):
command_context,
{
"cssProperties": stringify(db["cssProperties"]),
"pseudoElements": stringify(db["pseudoElements"]),
},
)

View File

@ -12302,27 +12302,3 @@ exports.CSS_PROPERTIES = {
]
}
};
/**
* A list of the pseudo elements.
*/
exports.PSEUDO_ELEMENTS = [
"::after",
"::before",
"::marker",
"::backdrop",
"::cue",
"::first-letter",
"::first-line",
"::highlight",
"::selection",
"::-moz-focus-inner",
"::-moz-progress-bar",
"::-moz-range-track",
"::-moz-range-progress",
"::-moz-range-thumb",
"::-moz-meter-bar",
"::placeholder",
"::-moz-color-swatch",
"::file-selector-button"
];

View File

@ -14,8 +14,3 @@
* A list of CSS Properties and their various characteristics.
*/
exports.CSS_PROPERTIES = ${cssProperties};
/**
* A list of the pseudo elements.
*/
exports.PSEUDO_ELEMENTS = ${pseudoElements};

View File

@ -24,17 +24,9 @@ try {
);
db = {
CSS_PROPERTIES: {},
PSEUDO_ELEMENTS: [],
};
}
/**
* The list of all CSS Pseudo Elements.
*
* This list can be updated with `mach devtools-css-db`.
*/
exports.PSEUDO_ELEMENTS = db.PSEUDO_ELEMENTS;
/**
* A list of CSS Properties and their various characteristics. This is used on the
* client-side when the CssPropertiesActor is not found, or when the client and server
@ -49,5 +41,4 @@ exports.CSS_PROPERTIES = db.CSS_PROPERTIES;
exports.CSS_PROPERTIES_DB = {
properties: db.CSS_PROPERTIES,
pseudoElements: db.PSEUDO_ELEMENTS,
};

View File

@ -20,7 +20,6 @@
"use strict";
const {
PSEUDO_ELEMENTS,
CSS_PROPERTIES,
} = require("resource://devtools/shared/css/generated/properties-db.js");
const PREFERENCES = InspectorUtils.getCSSPropertyPrefs();
@ -39,14 +38,6 @@ function run_test() {
"assertion run `mach devtools-css-db` to re-generate " +
"the client side properties.";
// Check that the platform and client match for pseudo elements.
deepEqual(
PSEUDO_ELEMENTS,
InspectorUtils.getCSSPseudoElementNames(),
"The pseudo elements match on the client and platform. " +
propertiesErrorMessage
);
/**
* Check that the platform and client match for the details on their CSS properties.
* Enumerate each property to aid in debugging. Sometimes these properties don't