Skip to content

Commit

Permalink
style: Rename nsStaticAtom subclasses.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nnethercote authored and emilio committed Oct 18, 2018
1 parent bcafe41 commit cd439df
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/style/gecko/regen_atoms.py
Expand Up @@ -35,10 +35,11 @@ def __init__(self, ident, value, hash, ty, atom_type):
self.original_ident = ident
self.value = value
self.hash = hash
# The Gecko type: "nsStaticAtom", "nsICSSPseudoElement", or "nsIAnonBoxPseudo"
# The Gecko type: "nsStaticAtom", "nsCSSPseudoElementStaticAtom", or
# "nsAnonBoxPseudoStaticAtom".
self.ty = ty
# The type of atom: "Atom", "PseudoElement", "NonInheritingAnonBox",
# or "InheritingAnonBox"
# or "InheritingAnonBox".
self.atom_type = atom_type
if self.is_pseudo() or self.is_anon_box():
self.pseudo_ident = (ident.split("_", 1))[1]
Expand Down Expand Up @@ -205,7 +206,7 @@ def write_atom_macro(atoms, file_name):
def write_pseudo_elements(atoms, target_filename):
pseudos = []
for atom in atoms:
if atom.type() == "nsICSSPseudoElement" or atom.type() == "nsICSSAnonBoxPseudo":
if atom.type() == "nsCSSPseudoElementStaticAtom" or atom.type() == "nsCSSAnonBoxPseudoStaticAtom":
pseudos.append(atom)

pseudo_definition_template = os.path.join(GECKO_DIR, "pseudo_element_definition.mako.rs")
Expand Down

0 comments on commit cd439df

Please sign in to comment.