Skip to content
Permalink
Browse files

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
  • Loading branch information
nnethercote authored and emilio committed Oct 18, 2018
1 parent bcafe41 commit cd439df54fd7682e53a7ab545cc419c104b0f1f3
Showing with 4 additions and 3 deletions.
  1. +4 −3 components/style/gecko/regen_atoms.py
@@ -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]
@@ -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")

0 comments on commit cd439df

Please sign in to comment.
You can’t perform that action at this time.