style: Rename nsStaticAtom subclasses.

Specifically:
- nsICSSAnonBoxPseudo --> nsCSSAnonBoxPseudoStaticAtom
- nsICSSPseudoElement --> nsCSSPseudoElementStaticAtom

The `nsI` prefix isn't necessary because these are no longer XPIDL types, and
the `StaticAtom` suffix makes their meaning clearer.

Bug: 1497734
Reviewed-by: heycam
This commit is contained in:
Nicholas Nethercote 2018-10-10 16:49:13 +11:00 committed by Emilio Cobos Álvarez
parent bcafe4188f
commit cd439df54f
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -35,10 +35,11 @@ class Atom:
self.original_ident = ident self.original_ident = ident
self.value = value self.value = value
self.hash = hash self.hash = hash
# The Gecko type: "nsStaticAtom", "nsICSSPseudoElement", or "nsIAnonBoxPseudo" # The Gecko type: "nsStaticAtom", "nsCSSPseudoElementStaticAtom", or
# "nsAnonBoxPseudoStaticAtom".
self.ty = ty self.ty = ty
# The type of atom: "Atom", "PseudoElement", "NonInheritingAnonBox", # The type of atom: "Atom", "PseudoElement", "NonInheritingAnonBox",
# or "InheritingAnonBox" # or "InheritingAnonBox".
self.atom_type = atom_type self.atom_type = atom_type
if self.is_pseudo() or self.is_anon_box(): if self.is_pseudo() or self.is_anon_box():
self.pseudo_ident = (ident.split("_", 1))[1] self.pseudo_ident = (ident.split("_", 1))[1]
@ -205,7 +206,7 @@ def write_atom_macro(atoms, file_name):
def write_pseudo_elements(atoms, target_filename): def write_pseudo_elements(atoms, target_filename):
pseudos = [] pseudos = []
for atom in atoms: for atom in atoms:
if atom.type() == "nsICSSPseudoElement" or atom.type() == "nsICSSAnonBoxPseudo": if atom.type() == "nsCSSPseudoElementStaticAtom" or atom.type() == "nsCSSAnonBoxPseudoStaticAtom":
pseudos.append(atom) pseudos.append(atom)
pseudo_definition_template = os.path.join(GECKO_DIR, "pseudo_element_definition.mako.rs") pseudo_definition_template = os.path.join(GECKO_DIR, "pseudo_element_definition.mako.rs")