Hi everyone,

Just a heads up on some changes to static atoms that I landed a couple of days.

Static atom definitions now live in xpcom/ds/StaticAtoms.py.  This script 
generates nsGkAtomList.h at build time.  nsGkAtomList.h is still used by 
nsGkAtoms.{h,cpp} to actually define the C++ atoms and by 
servo/components/style/gecko/regen_atoms.py to generate Rust definitions that 
link to the C++ ones.  (The move to defining these in Python will help with 
later work simplifying regen_atoms.py and generating additional data to help 
reference static atoms from Rust static consts.)

nsGkAtoms is now the only static atom table we have.  Previously we had 
separately defined atoms in nsCSSPseudoElements, nsCSSAnonBoxes, and 
nsDirectoryService.  These have all been merged into nsGkAtoms with prefixes on 
the identifiers, e.g. nsGkAtoms::PseudoElement_before.  For convenience, 
accessors on nsCSSPseudoElements and nsCSSAnonBoxes to their atoms remain, but 
they've become inline accessor functions, e.g. nsCSSPseudoElements::before().

If defining a new pseudo-element or anonymous box, you'll need to add an entry 
to both nsCSS{PseudoElement,AnonBox}List.h and StaticAtoms.py.  Assertions 
check for this.

Thanks,

Cameron
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to