Bug 1951893 - Remove unneeded StaticAtom suffixes. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D240598
This commit is contained in:
Tom Schuster
2025-03-11 11:36:09 +00:00
parent 4a07aebf8e
commit b8d11d463f
40 changed files with 856 additions and 858 deletions

View File

@@ -847,7 +847,7 @@ static const nsRoleMapEntry sWAIRoleMaps[] = {
states::LINKED
},
{ // list
nsGkAtoms::list_,
nsGkAtoms::list,
roles::LIST,
kUseMapRole,
eNoValue,
@@ -881,7 +881,7 @@ static const nsRoleMapEntry sWAIRoleMaps[] = {
states::READONLY
},
{ // log
nsGkAtoms::log_,
nsGkAtoms::log,
roles::NOTHING,
kUseNativeRole,
eNoValue,
@@ -1017,7 +1017,7 @@ static const nsRoleMapEntry sWAIRoleMaps[] = {
kNoReqStates
},
{ // note
nsGkAtoms::note_,
nsGkAtoms::note,
roles::NOTE,
kUseMapRole,
eNoValue,
@@ -1170,7 +1170,7 @@ static const nsRoleMapEntry sWAIRoleMaps[] = {
eARIAReadonlyOrEditable
},
{ // separator
nsGkAtoms::separator_,
nsGkAtoms::separator,
roles::SEPARATOR,
kUseMapRole,
eHasValueMinMaxIfFocusable,

View File

@@ -84,7 +84,7 @@ bool aria::MapToState(EStateRule aRule, dom::Element* aElement,
case eARIAAutoComplete: {
static const EnumTypeData data = {
nsGkAtoms::aria_autocomplete,
{nsGkAtoms::inlinevalue, nsGkAtoms::list_, nsGkAtoms::both, nullptr},
{nsGkAtoms::inlinevalue, nsGkAtoms::list, nsGkAtoms::both, nullptr},
{states::SUPPORTS_AUTOCOMPLETION,
states::HASPOPUP | states::SUPPORTS_AUTOCOMPLETION,
states::HASPOPUP | states::SUPPORTS_AUTOCOMPLETION},

View File

@@ -121,7 +121,7 @@ class CacheKey {
// The difference between the layout viewport and the visual viewport in app
// units. This is stored as a two-element (x, y) array and is unscaled by zoom
// or resolution.
static constexpr nsStaticAtom* VisualViewportOffset = nsGkAtoms::voffset_;
static constexpr nsStaticAtom* VisualViewportOffset = nsGkAtoms::voffset;
// AccAttributes, CacheDomain::ARIA
// ARIA attributes that are exposed as object attributes; i.e. returned in
// Accessible::Attributes.

View File

@@ -7,107 +7,107 @@
MARKUPMAP(math, New_HyperText, roles::MATHML_MATH)
MARKUPMAP(mi_, New_HyperText, roles::MATHML_IDENTIFIER)
MARKUPMAP(mi, New_HyperText, roles::MATHML_IDENTIFIER)
MARKUPMAP(mn_, New_HyperText, roles::MATHML_NUMBER)
MARKUPMAP(mn, New_HyperText, roles::MATHML_NUMBER)
MARKUPMAP(mo_, New_HyperText, roles::MATHML_OPERATOR,
AttrFromDOM(accent_, accent_), AttrFromDOM(fence_, fence_),
AttrFromDOM(separator_, separator_), AttrFromDOM(largeop_, largeop_))
MARKUPMAP(mo, New_HyperText, roles::MATHML_OPERATOR,
AttrFromDOM(accent, accent), AttrFromDOM(fence, fence),
AttrFromDOM(separator, separator), AttrFromDOM(largeop, largeop))
MARKUPMAP(mtext_, New_HyperText, roles::MATHML_TEXT)
MARKUPMAP(mtext, New_HyperText, roles::MATHML_TEXT)
MARKUPMAP(ms_, New_HyperText, roles::MATHML_STRING_LITERAL)
MARKUPMAP(ms, New_HyperText, roles::MATHML_STRING_LITERAL)
MARKUPMAP(mglyph_, New_HyperText, roles::MATHML_GLYPH)
MARKUPMAP(mglyph, New_HyperText, roles::MATHML_GLYPH)
MARKUPMAP(mrow_, New_HyperText, roles::MATHML_ROW)
MARKUPMAP(mrow, New_HyperText, roles::MATHML_ROW)
MARKUPMAP(mfrac_, New_HyperText, roles::MATHML_FRACTION,
AttrFromDOM(bevelled_, bevelled_),
AttrFromDOM(linethickness_, linethickness_))
MARKUPMAP(mfrac, New_HyperText, roles::MATHML_FRACTION,
AttrFromDOM(bevelled, bevelled),
AttrFromDOM(linethickness, linethickness))
MARKUPMAP(msqrt_, New_HyperText, roles::MATHML_SQUARE_ROOT)
MARKUPMAP(msqrt, New_HyperText, roles::MATHML_SQUARE_ROOT)
MARKUPMAP(mroot_, New_HyperText, roles::MATHML_ROOT)
MARKUPMAP(mroot, New_HyperText, roles::MATHML_ROOT)
MARKUPMAP(mfenced_, New_HyperText, roles::MATHML_ROW)
MARKUPMAP(mfenced, New_HyperText, roles::MATHML_ROW)
MARKUPMAP(menclose_, New_HyperText, roles::MATHML_ENCLOSED,
AttrFromDOM(notation_, notation_))
MARKUPMAP(menclose, New_HyperText, roles::MATHML_ENCLOSED,
AttrFromDOM(notation, notation))
MARKUPMAP(mstyle_, New_HyperText, roles::MATHML_STYLE)
MARKUPMAP(mstyle, New_HyperText, roles::MATHML_STYLE)
MARKUPMAP(msub_, New_HyperText, roles::MATHML_SUB)
MARKUPMAP(msub, New_HyperText, roles::MATHML_SUB)
MARKUPMAP(msup_, New_HyperText, roles::MATHML_SUP)
MARKUPMAP(msup, New_HyperText, roles::MATHML_SUP)
MARKUPMAP(msubsup_, New_HyperText, roles::MATHML_SUB_SUP)
MARKUPMAP(msubsup, New_HyperText, roles::MATHML_SUB_SUP)
MARKUPMAP(munder_, New_HyperText, roles::MATHML_UNDER,
AttrFromDOM(accentunder_, accentunder_), AttrFromDOM(align, align))
MARKUPMAP(munder, New_HyperText, roles::MATHML_UNDER,
AttrFromDOM(accentunder, accentunder), AttrFromDOM(align, align))
MARKUPMAP(mover_, New_HyperText, roles::MATHML_OVER,
AttrFromDOM(accent_, accent_), AttrFromDOM(align, align))
MARKUPMAP(mover, New_HyperText, roles::MATHML_OVER, AttrFromDOM(accent, accent),
AttrFromDOM(align, align))
MARKUPMAP(munderover_, New_HyperText, roles::MATHML_UNDER_OVER,
AttrFromDOM(accent_, accent_),
AttrFromDOM(accentunder_, accentunder_), AttrFromDOM(align, align))
MARKUPMAP(munderover, New_HyperText, roles::MATHML_UNDER_OVER,
AttrFromDOM(accent, accent), AttrFromDOM(accentunder, accentunder),
AttrFromDOM(align, align))
MARKUPMAP(mmultiscripts_, New_HyperText, roles::MATHML_MULTISCRIPTS)
MARKUPMAP(mmultiscripts, New_HyperText, roles::MATHML_MULTISCRIPTS)
MARKUPMAP(
mtable_,
mtable,
[](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* {
return new HTMLTableAccessible(aElement, aContext->Document());
},
roles::MATHML_TABLE, AttrFromDOM(align, align),
AttrFromDOM(columnlines_, columnlines_), AttrFromDOM(rowlines_, rowlines_))
AttrFromDOM(columnlines, columnlines), AttrFromDOM(rowlines, rowlines))
MARKUPMAP(
mlabeledtr_,
mlabeledtr,
[](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* {
return new HTMLTableRowAccessible(aElement, aContext->Document());
},
roles::MATHML_LABELED_ROW)
MARKUPMAP(
mtr_,
mtr,
[](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* {
return new HTMLTableRowAccessible(aElement, aContext->Document());
},
roles::MATHML_TABLE_ROW)
MARKUPMAP(
mtd_,
mtd,
[](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* {
return new HTMLTableCellAccessible(aElement, aContext->Document());
},
0)
MARKUPMAP(maction_, New_HyperText, roles::MATHML_ACTION,
AttrFromDOM(actiontype_, actiontype_),
AttrFromDOM(selection_, selection_))
MARKUPMAP(maction, New_HyperText, roles::MATHML_ACTION,
AttrFromDOM(actiontype, actiontype),
AttrFromDOM(selection, selection))
MARKUPMAP(merror_, New_HyperText, roles::MATHML_ERROR)
MARKUPMAP(merror, New_HyperText, roles::MATHML_ERROR)
MARKUPMAP(mstack_, New_HyperText, roles::MATHML_STACK,
AttrFromDOM(align, align), AttrFromDOM(position, position))
MARKUPMAP(mlongdiv_, New_HyperText, roles::MATHML_LONG_DIVISION,
AttrFromDOM(longdivstyle_, longdivstyle_))
MARKUPMAP(msgroup_, New_HyperText, roles::MATHML_STACK_GROUP,
AttrFromDOM(position, position), AttrFromDOM(shift_, shift_))
MARKUPMAP(msrow_, New_HyperText, roles::MATHML_STACK_ROW,
MARKUPMAP(mstack, New_HyperText, roles::MATHML_STACK, AttrFromDOM(align, align),
AttrFromDOM(position, position))
MARKUPMAP(mscarries_, New_HyperText, roles::MATHML_STACK_CARRIES,
AttrFromDOM(location_, location_), AttrFromDOM(position, position))
MARKUPMAP(mlongdiv, New_HyperText, roles::MATHML_LONG_DIVISION,
AttrFromDOM(longdivstyle, longdivstyle))
MARKUPMAP(mscarry_, New_HyperText, roles::MATHML_STACK_CARRY,
AttrFromDOM(crossout_, crossout_))
MARKUPMAP(msgroup, New_HyperText, roles::MATHML_STACK_GROUP,
AttrFromDOM(position, position), AttrFromDOM(shift, shift))
MARKUPMAP(msline_, New_HyperText, roles::MATHML_STACK_LINE,
MARKUPMAP(msrow, New_HyperText, roles::MATHML_STACK_ROW,
AttrFromDOM(position, position))
MARKUPMAP(mscarries, New_HyperText, roles::MATHML_STACK_CARRIES,
AttrFromDOM(location, location), AttrFromDOM(position, position))
MARKUPMAP(mscarry, New_HyperText, roles::MATHML_STACK_CARRY,
AttrFromDOM(crossout, crossout))
MARKUPMAP(msline, New_HyperText, roles::MATHML_STACK_LINE,
AttrFromDOM(position, position))

View File

@@ -188,7 +188,7 @@ ROLE(GROUPING,
ROLE(SEPARATOR,
"separator",
nsGkAtoms::separator_,
nsGkAtoms::separator,
ATK_ROLE_SEPARATOR,
NSAccessibilitySplitterRole,
@"AXContentSeparator",
@@ -305,7 +305,7 @@ ROLE(LINK,
ROLE(LIST,
"list",
nsGkAtoms::list_,
nsGkAtoms::list,
ATK_ROLE_LIST,
NSAccessibilityListRole,
NSAccessibilityContentListSubrole,
@@ -943,7 +943,7 @@ ROLE(GRID_CELL,
ROLE(NOTE,
"note",
nsGkAtoms::note_,
nsGkAtoms::note,
ATK_ROLE_COMMENT,
NSAccessibilityGroupRole,
@"AXDocumentNote",

View File

@@ -158,7 +158,7 @@ nsStaticAtom* nsAccUtils::NormalizeARIAToken(const AttrArray* aAttrs,
if (aAttr == nsGkAtoms::aria_current) {
static AttrArray::AttrValuesArray tokens[] = {
nsGkAtoms::page, nsGkAtoms::step, nsGkAtoms::location_,
nsGkAtoms::page, nsGkAtoms::step, nsGkAtoms::location,
nsGkAtoms::date, nsGkAtoms::time, nsGkAtoms::_true,
nullptr};
int32_t idx =

View File

@@ -1464,11 +1464,11 @@ LocalAccessible* nsAccessibilityService::CreateAccessible(
}
// Fall back to text when encountering Content MathML.
if (!newAcc && !content->IsAnyOfMathMLElements(
nsGkAtoms::annotation_, nsGkAtoms::annotation_xml_,
nsGkAtoms::mpadded_, nsGkAtoms::mphantom_,
nsGkAtoms::maligngroup_, nsGkAtoms::malignmark_,
nsGkAtoms::mspace_, nsGkAtoms::semantics_)) {
if (!newAcc &&
!content->IsAnyOfMathMLElements(
nsGkAtoms::annotation, nsGkAtoms::annotation_xml,
nsGkAtoms::mpadded, nsGkAtoms::mphantom, nsGkAtoms::maligngroup,
nsGkAtoms::malignmark, nsGkAtoms::mspace, nsGkAtoms::semantics)) {
newAcc = new HyperTextAccessible(content, document);
}
} else if (content->IsGeneratedContentContainerForMarker()) {

View File

@@ -317,7 +317,7 @@ void HyperTextAccessible::SetMathMLXMLRoles(AccAttributes* aAttributes) {
}
if (NS_MATHML_EMBELLISH_IS_SEPARATOR(embellishData.flags)) {
aAttributes->SetAttribute(nsGkAtoms::xmlroles,
nsGkAtoms::separator_);
nsGkAtoms::separator);
}
}
}
@@ -391,7 +391,7 @@ void HyperTextAccessible::SetMathMLXMLRoles(AccAttributes* aAttributes) {
for (child = child->GetNextSibling(); child;
child = child->GetNextSibling()) {
if (!child->IsMathMLElement()) continue;
if (child->IsMathMLElement(nsGkAtoms::mprescripts_)) {
if (child->IsMathMLElement(nsGkAtoms::mprescripts)) {
postscript = false;
subscript = true;
continue;
@@ -970,7 +970,7 @@ Relation HyperTextAccessible::RelationByType(RelationType aType) const {
if (parent) {
nsIContent* parentContent = parent->GetContent();
if (parentContent &&
parentContent->IsMathMLElement(nsGkAtoms::mroot_)) {
parentContent->IsMathMLElement(nsGkAtoms::mroot)) {
// Add a relation pointing to the parent <mroot>.
rel.AppendTarget(parent);
}
@@ -978,7 +978,7 @@ Relation HyperTextAccessible::RelationByType(RelationType aType) const {
}
break;
case RelationType::NODE_PARENT_OF:
if (HasOwnContent() && mContent->IsMathMLElement(nsGkAtoms::mroot_)) {
if (HasOwnContent() && mContent->IsMathMLElement(nsGkAtoms::mroot)) {
LocalAccessible* base = LocalChildAt(0);
LocalAccessible* index = LocalChildAt(1);
if (base && index) {

View File

@@ -54,7 +54,7 @@ void HTMLFormAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
for (uint32_t i = 0; i < length; i++) {
if (LocalAccessible* acc = mDoc->GetAccessible(controls->Item(i))) {
if (acc->IsTextField() && !acc->IsPassword()) {
if (!acc->Elm()->HasAttr(nsGkAtoms::list_) &&
if (!acc->Elm()->HasAttr(nsGkAtoms::list) &&
!acc->Elm()->AttrValueIs(kNameSpaceID_None,
nsGkAtoms::autocomplete, nsGkAtoms::OFF,
eIgnoreCase)) {
@@ -290,7 +290,7 @@ role HTMLTextFieldAccessible::NativeRole() const {
return roles::PASSWORD_TEXT;
}
dom::Element* el = mContent->AsElement();
if (el->HasAttr(nsGkAtoms::list_)) {
if (el->HasAttr(nsGkAtoms::list)) {
return roles::EDITCOMBOBOX;
}
if (const nsAttrValue* attr = el->GetParsedAttr(nsGkAtoms::type)) {
@@ -367,7 +367,7 @@ void HTMLTextFieldAccessible::Value(nsString& aValue) const {
}
bool HTMLTextFieldAccessible::AttributeChangesState(nsAtom* aAttribute) {
if (aAttribute == nsGkAtoms::readonly || aAttribute == nsGkAtoms::list_ ||
if (aAttribute == nsGkAtoms::readonly || aAttribute == nsGkAtoms::list ||
aAttribute == nsGkAtoms::autocomplete) {
return true;
}
@@ -409,7 +409,7 @@ uint64_t HTMLTextFieldAccessible::NativeState() const {
}
// Expose autocomplete state if it has associated autocomplete list.
if (mContent->AsElement()->HasAttr(nsGkAtoms::list_)) {
if (mContent->AsElement()->HasAttr(nsGkAtoms::list)) {
return state | states::SUPPORTS_AUTOCOMPLETION | states::HASPOPUP;
}

View File

@@ -62,7 +62,7 @@ role HTMLTableCellAccessible::NativeRole() const {
// this role to be returned if this is a valid cell. An invalid cell (e.g. if
// the table has role="none") won't use this class, so it will get a generic
// role, since the markup map doesn't specify a role.
if (mContent->IsMathMLElement(nsGkAtoms::mtd_)) {
if (mContent->IsMathMLElement(nsGkAtoms::mtd)) {
return roles::MATHML_CELL;
}
return roles::CELL;
@@ -369,7 +369,7 @@ void HTMLTableAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
already_AddRefed<AccAttributes> HTMLTableAccessible::NativeAttributes() {
RefPtr<AccAttributes> attributes = AccessibleWrap::NativeAttributes();
if (mContent->IsMathMLElement(nsGkAtoms::mtable_)) {
if (mContent->IsMathMLElement(nsGkAtoms::mtable)) {
GetAccService()->MarkupAttributes(this, attributes);
}
@@ -440,7 +440,9 @@ bool HTMLTableAccessible::IsProbablyLayoutTable() {
}
#else
# define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \
{ return isLayout; }
{ \
return isLayout; \
}
#endif
MOZ_ASSERT(!IsDefunct(), "Table accessible should not be defunct");
@@ -457,7 +459,7 @@ bool HTMLTableAccessible::IsProbablyLayoutTable() {
}
dom::Element* el = Elm();
if (el->IsMathMLElement(nsGkAtoms::mtable_)) {
if (el->IsMathMLElement(nsGkAtoms::mtable)) {
RETURN_LAYOUT_ANSWER(false, "MathML matrix");
}

View File

@@ -58,8 +58,7 @@ using namespace mozilla::a11y;
// Per the MathML 3 spec, the latter happens iff the linethickness
// attribute is of the form [zero-float][optional-unit]. In that case we
// set line thickness to zero and in the other cases we set it to one.
if (NSString* thickness =
utils::GetAccAttr(self, nsGkAtoms::linethickness_)) {
if (NSString* thickness = utils::GetAccAttr(self, nsGkAtoms::linethickness)) {
NSNumberFormatter* formatter =
[[[NSNumberFormatter alloc] init] autorelease];
NSNumber* value = [formatter numberFromString:thickness];

View File

@@ -387,7 +387,7 @@ using namespace mozilla::a11y;
// and are instructed by the ARIA map to use the native host role.
roleAtom = [self ARIARole];
if (roleAtom == nsGkAtoms::log_) {
if (roleAtom == nsGkAtoms::log) {
return @"AXApplicationLog";
}

View File

@@ -4150,7 +4150,7 @@ bool nsContentUtils::IsCustomElementName(nsAtom* aName, uint32_t aNameSpaceID) {
// font-face-format
// font-face-name
// missing-glyph
return aName != nsGkAtoms::annotation_xml_ &&
return aName != nsGkAtoms::annotation_xml &&
aName != nsGkAtoms::colorProfile && aName != nsGkAtoms::font_face &&
aName != nsGkAtoms::font_face_src &&
aName != nsGkAtoms::font_face_uri &&

View File

@@ -221,7 +221,7 @@ const nsStaticAtom* const kAttributesHTML[] = {
nsGkAtoms::kind,
nsGkAtoms::label,
nsGkAtoms::lang,
nsGkAtoms::list_,
nsGkAtoms::list,
nsGkAtoms::longdesc,
nsGkAtoms::loop,
nsGkAtoms::low,
@@ -645,326 +645,326 @@ static_assert(AllOf(std::begin(kURLAttributesSVG), std::end(kURLAttributesSVG),
}));
const nsStaticAtom* const kElementsMathML[] = {
nsGkAtoms::abs_, // abs
nsGkAtoms::_and, // and
nsGkAtoms::annotation_, // annotation
nsGkAtoms::annotation_xml_, // annotation-xml
nsGkAtoms::apply_, // apply
nsGkAtoms::approx_, // approx
nsGkAtoms::arccos_, // arccos
nsGkAtoms::arccosh_, // arccosh
nsGkAtoms::arccot_, // arccot
nsGkAtoms::arccoth_, // arccoth
nsGkAtoms::arccsc_, // arccsc
nsGkAtoms::arccsch_, // arccsch
nsGkAtoms::arcsec_, // arcsec
nsGkAtoms::arcsech_, // arcsech
nsGkAtoms::arcsin_, // arcsin
nsGkAtoms::arcsinh_, // arcsinh
nsGkAtoms::arctan_, // arctan
nsGkAtoms::arctanh_, // arctanh
nsGkAtoms::arg_, // arg
nsGkAtoms::bind_, // bind
nsGkAtoms::bvar_, // bvar
nsGkAtoms::card_, // card
nsGkAtoms::cartesianproduct_, // cartesianproduct
nsGkAtoms::cbytes_, // cbytes
nsGkAtoms::ceiling, // ceiling
nsGkAtoms::cerror_, // cerror
nsGkAtoms::ci_, // ci
nsGkAtoms::cn_, // cn
nsGkAtoms::codomain_, // codomain
nsGkAtoms::complexes_, // complexes
nsGkAtoms::compose_, // compose
nsGkAtoms::condition_, // condition
nsGkAtoms::conjugate_, // conjugate
nsGkAtoms::cos_, // cos
nsGkAtoms::cosh_, // cosh
nsGkAtoms::cot_, // cot
nsGkAtoms::coth_, // coth
nsGkAtoms::cs_, // cs
nsGkAtoms::csc_, // csc
nsGkAtoms::csch_, // csch
nsGkAtoms::csymbol_, // csymbol
nsGkAtoms::curl_, // curl
nsGkAtoms::declare, // declare
nsGkAtoms::degree_, // degree
nsGkAtoms::determinant_, // determinant
nsGkAtoms::diff_, // diff
nsGkAtoms::divergence_, // divergence
nsGkAtoms::divide_, // divide
nsGkAtoms::domain_, // domain
nsGkAtoms::domainofapplication_, // domainofapplication
nsGkAtoms::el, // el
nsGkAtoms::emptyset_, // emptyset
nsGkAtoms::eq_, // eq
nsGkAtoms::equivalent_, // equivalent
nsGkAtoms::eulergamma_, // eulergamma
nsGkAtoms::exists_, // exists
nsGkAtoms::exp_, // exp
nsGkAtoms::exponentiale_, // exponentiale
nsGkAtoms::factorial_, // factorial
nsGkAtoms::factorof_, // factorof
nsGkAtoms::_false, // false
nsGkAtoms::floor, // floor
nsGkAtoms::fn_, // fn
nsGkAtoms::forall_, // forall
nsGkAtoms::gcd_, // gcd
nsGkAtoms::geq_, // geq
nsGkAtoms::grad, // grad
nsGkAtoms::gt_, // gt
nsGkAtoms::ident_, // ident
nsGkAtoms::image, // image
nsGkAtoms::imaginary_, // imaginary
nsGkAtoms::imaginaryi_, // imaginaryi
nsGkAtoms::implies_, // implies
nsGkAtoms::in, // in
nsGkAtoms::infinity, // infinity
nsGkAtoms::int_, // int
nsGkAtoms::integers_, // integers
nsGkAtoms::intersect_, // intersect
nsGkAtoms::interval_, // interval
nsGkAtoms::inverse_, // inverse
nsGkAtoms::lambda_, // lambda
nsGkAtoms::laplacian_, // laplacian
nsGkAtoms::lcm_, // lcm
nsGkAtoms::leq_, // leq
nsGkAtoms::limit_, // limit
nsGkAtoms::list_, // list
nsGkAtoms::ln_, // ln
nsGkAtoms::log_, // log
nsGkAtoms::logbase_, // logbase
nsGkAtoms::lowlimit_, // lowlimit
nsGkAtoms::lt_, // lt
nsGkAtoms::maction_, // maction
nsGkAtoms::maligngroup_, // maligngroup
nsGkAtoms::malignmark_, // malignmark
nsGkAtoms::math, // math
nsGkAtoms::matrix, // matrix
nsGkAtoms::matrixrow_, // matrixrow
nsGkAtoms::max, // max
nsGkAtoms::mean_, // mean
nsGkAtoms::median_, // median
nsGkAtoms::menclose_, // menclose
nsGkAtoms::merror_, // merror
nsGkAtoms::mfrac_, // mfrac
nsGkAtoms::mglyph_, // mglyph
nsGkAtoms::mi_, // mi
nsGkAtoms::min, // min
nsGkAtoms::minus_, // minus
nsGkAtoms::mlabeledtr_, // mlabeledtr
nsGkAtoms::mlongdiv_, // mlongdiv
nsGkAtoms::mmultiscripts_, // mmultiscripts
nsGkAtoms::mn_, // mn
nsGkAtoms::mo_, // mo
nsGkAtoms::mode, // mode
nsGkAtoms::moment_, // moment
nsGkAtoms::momentabout_, // momentabout
nsGkAtoms::mover_, // mover
nsGkAtoms::mpadded_, // mpadded
nsGkAtoms::mphantom_, // mphantom
nsGkAtoms::mprescripts_, // mprescripts
nsGkAtoms::mroot_, // mroot
nsGkAtoms::mrow_, // mrow
nsGkAtoms::ms_, // ms
nsGkAtoms::mscarries_, // mscarries
nsGkAtoms::mscarry_, // mscarry
nsGkAtoms::msgroup_, // msgroup
nsGkAtoms::msline_, // msline
nsGkAtoms::mspace_, // mspace
nsGkAtoms::msqrt_, // msqrt
nsGkAtoms::msrow_, // msrow
nsGkAtoms::mstack_, // mstack
nsGkAtoms::mstyle_, // mstyle
nsGkAtoms::msub_, // msub
nsGkAtoms::msubsup_, // msubsup
nsGkAtoms::msup_, // msup
nsGkAtoms::mtable_, // mtable
nsGkAtoms::mtd_, // mtd
nsGkAtoms::mtext_, // mtext
nsGkAtoms::mtr_, // mtr
nsGkAtoms::munder_, // munder
nsGkAtoms::munderover_, // munderover
nsGkAtoms::naturalnumbers_, // naturalnumbers
nsGkAtoms::neq_, // neq
nsGkAtoms::none, // none
nsGkAtoms::_not, // not
nsGkAtoms::notanumber_, // notanumber
nsGkAtoms::note_, // note
nsGkAtoms::notin_, // notin
nsGkAtoms::notprsubset_, // notprsubset
nsGkAtoms::notsubset_, // notsubset
nsGkAtoms::_or, // or
nsGkAtoms::otherwise, // otherwise
nsGkAtoms::outerproduct_, // outerproduct
nsGkAtoms::partialdiff_, // partialdiff
nsGkAtoms::pi_, // pi
nsGkAtoms::piece_, // piece
nsGkAtoms::piecewise_, // piecewise
nsGkAtoms::plus_, // plus
nsGkAtoms::power_, // power
nsGkAtoms::primes_, // primes
nsGkAtoms::product_, // product
nsGkAtoms::prsubset_, // prsubset
nsGkAtoms::quotient_, // quotient
nsGkAtoms::rationals_, // rationals
nsGkAtoms::real_, // real
nsGkAtoms::reals_, // reals
nsGkAtoms::reln_, // reln
nsGkAtoms::rem, // rem
nsGkAtoms::root_, // root
nsGkAtoms::scalarproduct_, // scalarproduct
nsGkAtoms::sdev_, // sdev
nsGkAtoms::sec_, // sec
nsGkAtoms::sech_, // sech
nsGkAtoms::selector_, // selector
nsGkAtoms::semantics_, // semantics
nsGkAtoms::sep_, // sep
nsGkAtoms::set, // set
nsGkAtoms::setdiff_, // setdiff
nsGkAtoms::share_, // share
nsGkAtoms::sin_, // sin
nsGkAtoms::sinh_, // sinh
nsGkAtoms::subset_, // subset
nsGkAtoms::sum, // sum
nsGkAtoms::tan_, // tan
nsGkAtoms::tanh_, // tanh
nsGkAtoms::tendsto_, // tendsto
nsGkAtoms::times_, // times
nsGkAtoms::transpose_, // transpose
nsGkAtoms::_true, // true
nsGkAtoms::union_, // union
nsGkAtoms::uplimit_, // uplimit
nsGkAtoms::variance_, // variance
nsGkAtoms::vector_, // vector
nsGkAtoms::vectorproduct_, // vectorproduct
nsGkAtoms::xor_, // xor
nsGkAtoms::abs, // abs
nsGkAtoms::_and, // and
nsGkAtoms::annotation, // annotation
nsGkAtoms::annotation_xml, // annotation-xml
nsGkAtoms::apply, // apply
nsGkAtoms::approx, // approx
nsGkAtoms::arccos, // arccos
nsGkAtoms::arccosh, // arccosh
nsGkAtoms::arccot, // arccot
nsGkAtoms::arccoth, // arccoth
nsGkAtoms::arccsc, // arccsc
nsGkAtoms::arccsch, // arccsch
nsGkAtoms::arcsec, // arcsec
nsGkAtoms::arcsech, // arcsech
nsGkAtoms::arcsin, // arcsin
nsGkAtoms::arcsinh, // arcsinh
nsGkAtoms::arctan, // arctan
nsGkAtoms::arctanh, // arctanh
nsGkAtoms::arg, // arg
nsGkAtoms::bind, // bind
nsGkAtoms::bvar, // bvar
nsGkAtoms::card, // card
nsGkAtoms::cartesianproduct, // cartesianproduct
nsGkAtoms::cbytes, // cbytes
nsGkAtoms::ceiling, // ceiling
nsGkAtoms::cerror, // cerror
nsGkAtoms::ci, // ci
nsGkAtoms::cn, // cn
nsGkAtoms::codomain, // codomain
nsGkAtoms::complexes, // complexes
nsGkAtoms::compose, // compose
nsGkAtoms::condition, // condition
nsGkAtoms::conjugate, // conjugate
nsGkAtoms::cos, // cos
nsGkAtoms::cosh, // cosh
nsGkAtoms::cot, // cot
nsGkAtoms::coth, // coth
nsGkAtoms::cs, // cs
nsGkAtoms::csc, // csc
nsGkAtoms::csch, // csch
nsGkAtoms::csymbol, // csymbol
nsGkAtoms::curl, // curl
nsGkAtoms::declare, // declare
nsGkAtoms::degree, // degree
nsGkAtoms::determinant, // determinant
nsGkAtoms::diff, // diff
nsGkAtoms::divergence, // divergence
nsGkAtoms::divide, // divide
nsGkAtoms::domain, // domain
nsGkAtoms::domainofapplication, // domainofapplication
nsGkAtoms::el, // el
nsGkAtoms::emptyset, // emptyset
nsGkAtoms::eq, // eq
nsGkAtoms::equivalent, // equivalent
nsGkAtoms::eulergamma, // eulergamma
nsGkAtoms::exists, // exists
nsGkAtoms::exp, // exp
nsGkAtoms::exponentiale, // exponentiale
nsGkAtoms::factorial, // factorial
nsGkAtoms::factorof, // factorof
nsGkAtoms::_false, // false
nsGkAtoms::floor, // floor
nsGkAtoms::fn, // fn
nsGkAtoms::forall, // forall
nsGkAtoms::gcd, // gcd
nsGkAtoms::geq, // geq
nsGkAtoms::grad, // grad
nsGkAtoms::gt, // gt
nsGkAtoms::ident, // ident
nsGkAtoms::image, // image
nsGkAtoms::imaginary, // imaginary
nsGkAtoms::imaginaryi, // imaginaryi
nsGkAtoms::implies, // implies
nsGkAtoms::in, // in
nsGkAtoms::infinity, // infinity
nsGkAtoms::int_, // int
nsGkAtoms::integers, // integers
nsGkAtoms::intersect, // intersect
nsGkAtoms::interval, // interval
nsGkAtoms::inverse, // inverse
nsGkAtoms::lambda, // lambda
nsGkAtoms::laplacian, // laplacian
nsGkAtoms::lcm, // lcm
nsGkAtoms::leq, // leq
nsGkAtoms::limit, // limit
nsGkAtoms::list, // list
nsGkAtoms::ln, // ln
nsGkAtoms::log, // log
nsGkAtoms::logbase, // logbase
nsGkAtoms::lowlimit, // lowlimit
nsGkAtoms::lt, // lt
nsGkAtoms::maction, // maction
nsGkAtoms::maligngroup, // maligngroup
nsGkAtoms::malignmark, // malignmark
nsGkAtoms::math, // math
nsGkAtoms::matrix, // matrix
nsGkAtoms::matrixrow, // matrixrow
nsGkAtoms::max, // max
nsGkAtoms::mean, // mean
nsGkAtoms::median, // median
nsGkAtoms::menclose, // menclose
nsGkAtoms::merror, // merror
nsGkAtoms::mfrac, // mfrac
nsGkAtoms::mglyph, // mglyph
nsGkAtoms::mi, // mi
nsGkAtoms::min, // min
nsGkAtoms::minus, // minus
nsGkAtoms::mlabeledtr, // mlabeledtr
nsGkAtoms::mlongdiv, // mlongdiv
nsGkAtoms::mmultiscripts, // mmultiscripts
nsGkAtoms::mn, // mn
nsGkAtoms::mo, // mo
nsGkAtoms::mode, // mode
nsGkAtoms::moment, // moment
nsGkAtoms::momentabout, // momentabout
nsGkAtoms::mover, // mover
nsGkAtoms::mpadded, // mpadded
nsGkAtoms::mphantom, // mphantom
nsGkAtoms::mprescripts, // mprescripts
nsGkAtoms::mroot, // mroot
nsGkAtoms::mrow, // mrow
nsGkAtoms::ms, // ms
nsGkAtoms::mscarries, // mscarries
nsGkAtoms::mscarry, // mscarry
nsGkAtoms::msgroup, // msgroup
nsGkAtoms::msline, // msline
nsGkAtoms::mspace, // mspace
nsGkAtoms::msqrt, // msqrt
nsGkAtoms::msrow, // msrow
nsGkAtoms::mstack, // mstack
nsGkAtoms::mstyle, // mstyle
nsGkAtoms::msub, // msub
nsGkAtoms::msubsup, // msubsup
nsGkAtoms::msup, // msup
nsGkAtoms::mtable, // mtable
nsGkAtoms::mtd, // mtd
nsGkAtoms::mtext, // mtext
nsGkAtoms::mtr, // mtr
nsGkAtoms::munder, // munder
nsGkAtoms::munderover, // munderover
nsGkAtoms::naturalnumbers, // naturalnumbers
nsGkAtoms::neq, // neq
nsGkAtoms::none, // none
nsGkAtoms::_not, // not
nsGkAtoms::notanumber, // notanumber
nsGkAtoms::note, // note
nsGkAtoms::notin, // notin
nsGkAtoms::notprsubset, // notprsubset
nsGkAtoms::notsubset, // notsubset
nsGkAtoms::_or, // or
nsGkAtoms::otherwise, // otherwise
nsGkAtoms::outerproduct, // outerproduct
nsGkAtoms::partialdiff, // partialdiff
nsGkAtoms::pi, // pi
nsGkAtoms::piece, // piece
nsGkAtoms::piecewise, // piecewise
nsGkAtoms::plus, // plus
nsGkAtoms::power, // power
nsGkAtoms::primes, // primes
nsGkAtoms::product, // product
nsGkAtoms::prsubset, // prsubset
nsGkAtoms::quotient, // quotient
nsGkAtoms::rationals, // rationals
nsGkAtoms::real, // real
nsGkAtoms::reals, // reals
nsGkAtoms::reln, // reln
nsGkAtoms::rem, // rem
nsGkAtoms::root, // root
nsGkAtoms::scalarproduct, // scalarproduct
nsGkAtoms::sdev, // sdev
nsGkAtoms::sec, // sec
nsGkAtoms::sech, // sech
nsGkAtoms::selector, // selector
nsGkAtoms::semantics, // semantics
nsGkAtoms::sep, // sep
nsGkAtoms::set, // set
nsGkAtoms::setdiff, // setdiff
nsGkAtoms::share, // share
nsGkAtoms::sin, // sin
nsGkAtoms::sinh, // sinh
nsGkAtoms::subset, // subset
nsGkAtoms::sum, // sum
nsGkAtoms::tan, // tan
nsGkAtoms::tanh, // tanh
nsGkAtoms::tendsto, // tendsto
nsGkAtoms::times, // times
nsGkAtoms::transpose, // transpose
nsGkAtoms::_true, // true
nsGkAtoms::union_, // union
nsGkAtoms::uplimit, // uplimit
nsGkAtoms::variance, // variance
nsGkAtoms::vector, // vector
nsGkAtoms::vectorproduct, // vectorproduct
nsGkAtoms::xor_, // xor
nullptr};
const nsStaticAtom* const kAttributesMathML[] = {
nsGkAtoms::accent_, // accent
nsGkAtoms::accentunder_, // accentunder
nsGkAtoms::actiontype_, // actiontype
nsGkAtoms::align, // align
nsGkAtoms::alignmentscope_, // alignmentscope
nsGkAtoms::alt, // alt
nsGkAtoms::altimg_, // altimg
nsGkAtoms::altimg_height_, // altimg-height
nsGkAtoms::altimg_valign_, // altimg-valign
nsGkAtoms::altimg_width_, // altimg-width
nsGkAtoms::background, // background
nsGkAtoms::base, // base
nsGkAtoms::bevelled_, // bevelled
nsGkAtoms::cd_, // cd
nsGkAtoms::cdgroup_, // cdgroup
nsGkAtoms::charalign_, // charalign
nsGkAtoms::close, // close
nsGkAtoms::closure_, // closure
nsGkAtoms::color, // color
nsGkAtoms::columnalign_, // columnalign
nsGkAtoms::columnalignment_, // columnalignment
nsGkAtoms::columnlines_, // columnlines
nsGkAtoms::columnspacing_, // columnspacing
nsGkAtoms::columnspan_, // columnspan
nsGkAtoms::columnwidth_, // columnwidth
nsGkAtoms::crossout_, // crossout
nsGkAtoms::decimalpoint_, // decimalpoint
nsGkAtoms::definitionURL_, // definitionURL
nsGkAtoms::denomalign_, // denomalign
nsGkAtoms::depth_, // depth
nsGkAtoms::dir, // dir
nsGkAtoms::display, // display
nsGkAtoms::displaystyle_, // displaystyle
nsGkAtoms::edge_, // edge
nsGkAtoms::encoding, // encoding
nsGkAtoms::equalcolumns_, // equalcolumns
nsGkAtoms::equalrows_, // equalrows
nsGkAtoms::fence_, // fence
nsGkAtoms::fontfamily_, // fontfamily
nsGkAtoms::fontsize_, // fontsize
nsGkAtoms::fontstyle_, // fontstyle
nsGkAtoms::fontweight_, // fontweight
nsGkAtoms::form, // form
nsGkAtoms::frame, // frame
nsGkAtoms::framespacing_, // framespacing
nsGkAtoms::groupalign_, // groupalign
nsGkAtoms::height, // height
nsGkAtoms::href, // href
nsGkAtoms::id, // id
nsGkAtoms::indentalign_, // indentalign
nsGkAtoms::indentalignfirst_, // indentalignfirst
nsGkAtoms::indentalignlast_, // indentalignlast
nsGkAtoms::indentshift_, // indentshift
nsGkAtoms::indentshiftfirst_, // indentshiftfirst
nsGkAtoms::indenttarget_, // indenttarget
nsGkAtoms::index, // index
nsGkAtoms::integer, // integer
nsGkAtoms::largeop_, // largeop
nsGkAtoms::length, // length
nsGkAtoms::linebreak_, // linebreak
nsGkAtoms::linebreakmultchar_, // linebreakmultchar
nsGkAtoms::linebreakstyle_, // linebreakstyle
nsGkAtoms::linethickness_, // linethickness
nsGkAtoms::location_, // location
nsGkAtoms::longdivstyle_, // longdivstyle
nsGkAtoms::lquote_, // lquote
nsGkAtoms::lspace_, // lspace
nsGkAtoms::ltr, // ltr
nsGkAtoms::mathbackground_, // mathbackground
nsGkAtoms::mathcolor_, // mathcolor
nsGkAtoms::mathsize_, // mathsize
nsGkAtoms::mathvariant_, // mathvariant
nsGkAtoms::maxsize_, // maxsize
nsGkAtoms::minlabelspacing_, // minlabelspacing
nsGkAtoms::minsize_, // minsize
nsGkAtoms::movablelimits_, // movablelimits
nsGkAtoms::msgroup_, // msgroup
nsGkAtoms::name, // name
nsGkAtoms::newline, // newline
nsGkAtoms::notation_, // notation
nsGkAtoms::numalign_, // numalign
nsGkAtoms::number, // number
nsGkAtoms::open, // open
nsGkAtoms::order, // order
nsGkAtoms::other, // other
nsGkAtoms::overflow, // overflow
nsGkAtoms::position, // position
nsGkAtoms::role, // role
nsGkAtoms::rowalign_, // rowalign
nsGkAtoms::rowlines_, // rowlines
nsGkAtoms::rowspacing_, // rowspacing
nsGkAtoms::rowspan, // rowspan
nsGkAtoms::rquote_, // rquote
nsGkAtoms::rspace_, // rspace
nsGkAtoms::schemaLocation_, // schemaLocation
nsGkAtoms::scriptlevel_, // scriptlevel
nsGkAtoms::scriptminsize_, // scriptminsize
nsGkAtoms::scriptsize_, // scriptsize
nsGkAtoms::scriptsizemultiplier_, // scriptsizemultiplier
nsGkAtoms::selection_, // selection
nsGkAtoms::separator_, // separator
nsGkAtoms::separators_, // separators
nsGkAtoms::shift_, // shift
nsGkAtoms::side_, // side
nsGkAtoms::src, // src
nsGkAtoms::stackalign_, // stackalign
nsGkAtoms::stretchy_, // stretchy
nsGkAtoms::subscriptshift_, // subscriptshift
nsGkAtoms::superscriptshift_, // superscriptshift
nsGkAtoms::symmetric_, // symmetric
nsGkAtoms::type, // type
nsGkAtoms::voffset_, // voffset
nsGkAtoms::width, // width
nsGkAtoms::xref_, // xref
nsGkAtoms::accent, // accent
nsGkAtoms::accentunder, // accentunder
nsGkAtoms::actiontype, // actiontype
nsGkAtoms::align, // align
nsGkAtoms::alignmentscope, // alignmentscope
nsGkAtoms::alt, // alt
nsGkAtoms::altimg, // altimg
nsGkAtoms::altimg_height, // altimg-height
nsGkAtoms::altimg_valign, // altimg-valign
nsGkAtoms::altimg_width, // altimg-width
nsGkAtoms::background, // background
nsGkAtoms::base, // base
nsGkAtoms::bevelled, // bevelled
nsGkAtoms::cd, // cd
nsGkAtoms::cdgroup, // cdgroup
nsGkAtoms::charalign, // charalign
nsGkAtoms::close, // close
nsGkAtoms::closure, // closure
nsGkAtoms::color, // color
nsGkAtoms::columnalign, // columnalign
nsGkAtoms::columnalignment, // columnalignment
nsGkAtoms::columnlines, // columnlines
nsGkAtoms::columnspacing, // columnspacing
nsGkAtoms::columnspan, // columnspan
nsGkAtoms::columnwidth, // columnwidth
nsGkAtoms::crossout, // crossout
nsGkAtoms::decimalpoint, // decimalpoint
nsGkAtoms::definitionURL, // definitionURL
nsGkAtoms::denomalign, // denomalign
nsGkAtoms::depth, // depth
nsGkAtoms::dir, // dir
nsGkAtoms::display, // display
nsGkAtoms::displaystyle, // displaystyle
nsGkAtoms::edge, // edge
nsGkAtoms::encoding, // encoding
nsGkAtoms::equalcolumns, // equalcolumns
nsGkAtoms::equalrows, // equalrows
nsGkAtoms::fence, // fence
nsGkAtoms::fontfamily, // fontfamily
nsGkAtoms::fontsize, // fontsize
nsGkAtoms::fontstyle, // fontstyle
nsGkAtoms::fontweight, // fontweight
nsGkAtoms::form, // form
nsGkAtoms::frame, // frame
nsGkAtoms::framespacing, // framespacing
nsGkAtoms::groupalign, // groupalign
nsGkAtoms::height, // height
nsGkAtoms::href, // href
nsGkAtoms::id, // id
nsGkAtoms::indentalign, // indentalign
nsGkAtoms::indentalignfirst, // indentalignfirst
nsGkAtoms::indentalignlast, // indentalignlast
nsGkAtoms::indentshift, // indentshift
nsGkAtoms::indentshiftfirst, // indentshiftfirst
nsGkAtoms::indenttarget, // indenttarget
nsGkAtoms::index, // index
nsGkAtoms::integer, // integer
nsGkAtoms::largeop, // largeop
nsGkAtoms::length, // length
nsGkAtoms::linebreak, // linebreak
nsGkAtoms::linebreakmultchar, // linebreakmultchar
nsGkAtoms::linebreakstyle, // linebreakstyle
nsGkAtoms::linethickness, // linethickness
nsGkAtoms::location, // location
nsGkAtoms::longdivstyle, // longdivstyle
nsGkAtoms::lquote, // lquote
nsGkAtoms::lspace, // lspace
nsGkAtoms::ltr, // ltr
nsGkAtoms::mathbackground, // mathbackground
nsGkAtoms::mathcolor, // mathcolor
nsGkAtoms::mathsize, // mathsize
nsGkAtoms::mathvariant, // mathvariant
nsGkAtoms::maxsize, // maxsize
nsGkAtoms::minlabelspacing, // minlabelspacing
nsGkAtoms::minsize, // minsize
nsGkAtoms::movablelimits, // movablelimits
nsGkAtoms::msgroup, // msgroup
nsGkAtoms::name, // name
nsGkAtoms::newline, // newline
nsGkAtoms::notation, // notation
nsGkAtoms::numalign, // numalign
nsGkAtoms::number, // number
nsGkAtoms::open, // open
nsGkAtoms::order, // order
nsGkAtoms::other, // other
nsGkAtoms::overflow, // overflow
nsGkAtoms::position, // position
nsGkAtoms::role, // role
nsGkAtoms::rowalign, // rowalign
nsGkAtoms::rowlines, // rowlines
nsGkAtoms::rowspacing, // rowspacing
nsGkAtoms::rowspan, // rowspan
nsGkAtoms::rquote, // rquote
nsGkAtoms::rspace, // rspace
nsGkAtoms::schemaLocation, // schemaLocation
nsGkAtoms::scriptlevel, // scriptlevel
nsGkAtoms::scriptminsize, // scriptminsize
nsGkAtoms::scriptsize, // scriptsize
nsGkAtoms::scriptsizemultiplier, // scriptsizemultiplier
nsGkAtoms::selection, // selection
nsGkAtoms::separator, // separator
nsGkAtoms::separators, // separators
nsGkAtoms::shift, // shift
nsGkAtoms::side, // side
nsGkAtoms::src, // src
nsGkAtoms::stackalign, // stackalign
nsGkAtoms::stretchy, // stretchy
nsGkAtoms::subscriptshift, // subscriptshift
nsGkAtoms::superscriptshift, // superscriptshift
nsGkAtoms::symmetric, // symmetric
nsGkAtoms::type, // type
nsGkAtoms::voffset, // voffset
nsGkAtoms::width, // width
nsGkAtoms::xref, // xref
nullptr};
const nsStaticAtom* const kURLAttributesMathML[] = {
// clang-format off
nsGkAtoms::href,
nsGkAtoms::src,
nsGkAtoms::cdgroup_,
nsGkAtoms::altimg_,
nsGkAtoms::definitionURL_,
nsGkAtoms::cdgroup,
nsGkAtoms::altimg,
nsGkAtoms::definitionURL,
nullptr
// clang-format on
};
@@ -1318,9 +1318,9 @@ bool nsTreeSanitizer::SanitizeURL(mozilla::dom::Element* aElement,
v[3] == ':')) {
rv = NS_ERROR_FAILURE;
}
} else if (nsGkAtoms::cdgroup_ == aLocalName ||
nsGkAtoms::altimg_ == aLocalName ||
nsGkAtoms::definitionURL_ == aLocalName) {
} else if (nsGkAtoms::cdgroup == aLocalName ||
nsGkAtoms::altimg == aLocalName ||
nsGkAtoms::definitionURL == aLocalName) {
// Gecko doesn't fetch these now and shouldn't in the future, but
// in case someone goofs with these in the future, let's drop them.
rv = NS_ERROR_FAILURE;

View File

@@ -1764,7 +1764,7 @@ void HTMLInputElement::SetValue(const nsAString& aValue, CallerType aCallerType,
HTMLDataListElement* HTMLInputElement::GetList() const {
nsAutoString dataListId;
GetAttr(nsGkAtoms::list_, dataListId);
GetAttr(nsGkAtoms::list, dataListId);
if (dataListId.IsEmpty()) {
return nullptr;
}

View File

@@ -87,15 +87,15 @@ bool MathMLElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
MOZ_ASSERT(IsMathMLElement());
if (aNamespaceID == kNameSpaceID_None) {
if (aAttribute == nsGkAtoms::mathcolor_ ||
aAttribute == nsGkAtoms::mathbackground_) {
if (aAttribute == nsGkAtoms::mathcolor ||
aAttribute == nsGkAtoms::mathbackground) {
return aResult.ParseColor(aValue);
}
if (aAttribute == nsGkAtoms::tabindex) {
return aResult.ParseIntValue(aValue);
}
if (mNodeInfo->Equals(nsGkAtoms::mtd_)) {
if (aAttribute == nsGkAtoms::columnspan_) {
if (mNodeInfo->Equals(nsGkAtoms::mtd)) {
if (aAttribute == nsGkAtoms::columnspan) {
aResult.ParseClampedNonNegativeInt(aValue, 1, 1, MAX_COLSPAN);
return true;
}
@@ -113,11 +113,11 @@ bool MathMLElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
// https://mathml-refresh.github.io/mathml-core/#global-attributes
static Element::MappedAttributeEntry sGlobalAttributes[] = {
{nsGkAtoms::dir},
{nsGkAtoms::mathbackground_},
{nsGkAtoms::mathcolor_},
{nsGkAtoms::mathsize_},
{nsGkAtoms::scriptlevel_},
{nsGkAtoms::displaystyle_},
{nsGkAtoms::mathbackground},
{nsGkAtoms::mathcolor},
{nsGkAtoms::mathsize},
{nsGkAtoms::scriptlevel},
{nsGkAtoms::displaystyle},
{nullptr}};
bool MathMLElement::IsAttributeMapped(const nsAtom* aAttribute) const {
@@ -127,18 +127,18 @@ bool MathMLElement::IsAttributeMapped(const nsAtom* aAttribute) const {
return FindAttributeDependence(aAttribute, globalMap) ||
((!StaticPrefs::mathml_legacy_mathvariant_attribute_disabled() ||
mNodeInfo->Equals(nsGkAtoms::mi_)) &&
aAttribute == nsGkAtoms::mathvariant_) ||
(mNodeInfo->Equals(nsGkAtoms::mtable_) &&
mNodeInfo->Equals(nsGkAtoms::mi)) &&
aAttribute == nsGkAtoms::mathvariant) ||
(mNodeInfo->Equals(nsGkAtoms::mtable) &&
aAttribute == nsGkAtoms::width);
}
nsMapRuleToAttributesFunc MathMLElement::GetAttributeMappingFunction() const {
if (mNodeInfo->Equals(nsGkAtoms::mtable_)) {
if (mNodeInfo->Equals(nsGkAtoms::mtable)) {
return &MapMTableAttributesInto;
}
if (StaticPrefs::mathml_legacy_mathvariant_attribute_disabled() &&
mNodeInfo->Equals(nsGkAtoms::mi_)) {
mNodeInfo->Equals(nsGkAtoms::mi)) {
return &MapMiAttributesInto;
}
return &MapGlobalMathMLAttributesInto;
@@ -385,7 +385,7 @@ void MathMLElement::MapMiAttributesInto(MappedDeclarationsBuilder& aBuilder) {
// mathvariant
// https://w3c.github.io/mathml-core/#dfn-mathvariant
if (!aBuilder.PropertyIsSet(eCSSProperty_text_transform)) {
const nsAttrValue* value = aBuilder.GetAttr(nsGkAtoms::mathvariant_);
const nsAttrValue* value = aBuilder.GetAttr(nsGkAtoms::mathvariant);
if (value && value->Type() == nsAttrValue::eString) {
auto str = value->GetStringValue();
str.CompressWhitespace();
@@ -424,7 +424,7 @@ void MathMLElement::MapGlobalMathMLAttributesInto(
MappedDeclarationsBuilder& aBuilder) {
// scriptlevel
// https://w3c.github.io/mathml-core/#dfn-scriptlevel
const nsAttrValue* value = aBuilder.GetAttr(nsGkAtoms::scriptlevel_);
const nsAttrValue* value = aBuilder.GetAttr(nsGkAtoms::scriptlevel);
if (value && value->Type() == nsAttrValue::eString &&
!aBuilder.PropertyIsSet(eCSSProperty_math_depth)) {
auto str = value->GetStringValue();
@@ -452,15 +452,14 @@ void MathMLElement::MapGlobalMathMLAttributesInto(
}
}
if (reportParseError) {
ReportParseErrorNoTag(str, nsGkAtoms::scriptlevel_,
aBuilder.Document());
ReportParseErrorNoTag(str, nsGkAtoms::scriptlevel, aBuilder.Document());
}
}
}
// mathsize
// https://w3c.github.io/mathml-core/#dfn-mathsize
value = aBuilder.GetAttr(nsGkAtoms::mathsize_);
value = aBuilder.GetAttr(nsGkAtoms::mathsize);
if (value && value->Type() == nsAttrValue::eString &&
!aBuilder.PropertyIsSet(eCSSProperty_font_size)) {
auto str = value->GetStringValue();
@@ -486,7 +485,7 @@ void MathMLElement::MapGlobalMathMLAttributesInto(
// "monospace" | "initial" | "tailed" | "looped" | "stretched"
// default: normal (except on <mi>)
//
value = aBuilder.GetAttr(nsGkAtoms::mathvariant_);
value = aBuilder.GetAttr(nsGkAtoms::mathvariant);
if (value && value->Type() == nsAttrValue::eString &&
!aBuilder.PropertyIsSet(eCSSProperty__moz_math_variant)) {
auto str = value->GetStringValue();
@@ -571,7 +570,7 @@ void MathMLElement::MapGlobalMathMLAttributesInto(
// mathbackground
// https://w3c.github.io/mathml-core/#dfn-mathbackground
value = aBuilder.GetAttr(nsGkAtoms::mathbackground_);
value = aBuilder.GetAttr(nsGkAtoms::mathbackground);
if (value) {
nscolor color;
if (value->GetColorValue(color)) {
@@ -581,7 +580,7 @@ void MathMLElement::MapGlobalMathMLAttributesInto(
// mathcolor
// https://w3c.github.io/mathml-core/#dfn-mathcolor
value = aBuilder.GetAttr(nsGkAtoms::mathcolor_);
value = aBuilder.GetAttr(nsGkAtoms::mathcolor);
nscolor color;
if (value && value->GetColorValue(color)) {
aBuilder.SetColorValueIfUnset(eCSSProperty_color, color);
@@ -606,7 +605,7 @@ void MathMLElement::MapGlobalMathMLAttributesInto(
// displaystyle
// https://mathml-refresh.github.io/mathml-core/#dfn-displaystyle
value = aBuilder.GetAttr(nsGkAtoms::displaystyle_);
value = aBuilder.GetAttr(nsGkAtoms::displaystyle);
if (value && value->Type() == nsAttrValue::eString &&
!aBuilder.PropertyIsSet(eCSSProperty_math_style)) {
auto str = value->GetStringValue();

View File

@@ -55,7 +55,7 @@ SVGElement::EnumInfo SVGTextPathElement::sEnumInfo[4] = {
// from SVGTextPathElement:
{nsGkAtoms::method, sMethodMap, TEXTPATH_METHODTYPE_ALIGN},
{nsGkAtoms::spacing, sSpacingMap, TEXTPATH_SPACINGTYPE_EXACT},
{nsGkAtoms::side_, sSideMap, TEXTPATH_SIDETYPE_LEFT}};
{nsGkAtoms::side, sSideMap, TEXTPATH_SIDETYPE_LEFT}};
SVGElement::StringInfo SVGTextPathElement::sStringInfo[2] = {
{nsGkAtoms::href, kNameSpaceID_None, true},

View File

@@ -3435,7 +3435,7 @@ Element* HTMLEditor::GetInclusiveAncestorByTagNameInternal(
if (HTMLEditUtils::IsNamedAnchor(element)) {
return element;
}
} else if (&aTagName == nsGkAtoms::list_) {
} else if (&aTagName == nsGkAtoms::list) {
// Match "ol", "ul", or "dl" for lists
if (HTMLEditUtils::IsAnyListElement(element)) {
return element;

View File

@@ -4632,35 +4632,35 @@ nsCSSFrameConstructor::FindMathMLData(const Element& aElement,
}
static constexpr FrameConstructionDataByTag sMathMLData[] = {
SIMPLE_MATHML_CREATE(annotation_, NS_NewMathMLTokenFrame),
SIMPLE_MATHML_CREATE(annotation_xml_, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(mi_, NS_NewMathMLTokenFrame),
SIMPLE_MATHML_CREATE(mn_, NS_NewMathMLTokenFrame),
SIMPLE_MATHML_CREATE(ms_, NS_NewMathMLTokenFrame),
SIMPLE_MATHML_CREATE(mtext_, NS_NewMathMLTokenFrame),
SIMPLE_MATHML_CREATE(mo_, NS_NewMathMLmoFrame),
SIMPLE_MATHML_CREATE(mfrac_, NS_NewMathMLmfracFrame),
SIMPLE_MATHML_CREATE(msup_, NS_NewMathMLmmultiscriptsFrame),
SIMPLE_MATHML_CREATE(msub_, NS_NewMathMLmmultiscriptsFrame),
SIMPLE_MATHML_CREATE(msubsup_, NS_NewMathMLmmultiscriptsFrame),
SIMPLE_MATHML_CREATE(munder_, NS_NewMathMLmunderoverFrame),
SIMPLE_MATHML_CREATE(mover_, NS_NewMathMLmunderoverFrame),
SIMPLE_MATHML_CREATE(munderover_, NS_NewMathMLmunderoverFrame),
SIMPLE_MATHML_CREATE(mphantom_, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(mpadded_, NS_NewMathMLmpaddedFrame),
SIMPLE_MATHML_CREATE(mspace_, NS_NewMathMLmspaceFrame),
SIMPLE_MATHML_CREATE(annotation, NS_NewMathMLTokenFrame),
SIMPLE_MATHML_CREATE(annotation_xml, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(mi, NS_NewMathMLTokenFrame),
SIMPLE_MATHML_CREATE(mn, NS_NewMathMLTokenFrame),
SIMPLE_MATHML_CREATE(ms, NS_NewMathMLTokenFrame),
SIMPLE_MATHML_CREATE(mtext, NS_NewMathMLTokenFrame),
SIMPLE_MATHML_CREATE(mo, NS_NewMathMLmoFrame),
SIMPLE_MATHML_CREATE(mfrac, NS_NewMathMLmfracFrame),
SIMPLE_MATHML_CREATE(msup, NS_NewMathMLmmultiscriptsFrame),
SIMPLE_MATHML_CREATE(msub, NS_NewMathMLmmultiscriptsFrame),
SIMPLE_MATHML_CREATE(msubsup, NS_NewMathMLmmultiscriptsFrame),
SIMPLE_MATHML_CREATE(munder, NS_NewMathMLmunderoverFrame),
SIMPLE_MATHML_CREATE(mover, NS_NewMathMLmunderoverFrame),
SIMPLE_MATHML_CREATE(munderover, NS_NewMathMLmunderoverFrame),
SIMPLE_MATHML_CREATE(mphantom, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(mpadded, NS_NewMathMLmpaddedFrame),
SIMPLE_MATHML_CREATE(mspace, NS_NewMathMLmspaceFrame),
SIMPLE_MATHML_CREATE(none, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(mprescripts_, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(mfenced_, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(mmultiscripts_, NS_NewMathMLmmultiscriptsFrame),
SIMPLE_MATHML_CREATE(mstyle_, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(msqrt_, NS_NewMathMLmrootFrame),
SIMPLE_MATHML_CREATE(mroot_, NS_NewMathMLmrootFrame),
SIMPLE_MATHML_CREATE(maction_, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(mrow_, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(merror_, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(menclose_, NS_NewMathMLmencloseFrame),
SIMPLE_MATHML_CREATE(semantics_, NS_NewMathMLmrowFrame)};
SIMPLE_MATHML_CREATE(mprescripts, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(mfenced, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(mmultiscripts, NS_NewMathMLmmultiscriptsFrame),
SIMPLE_MATHML_CREATE(mstyle, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(msqrt, NS_NewMathMLmrootFrame),
SIMPLE_MATHML_CREATE(mroot, NS_NewMathMLmrootFrame),
SIMPLE_MATHML_CREATE(maction, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(mrow, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(merror, NS_NewMathMLmrowFrame),
SIMPLE_MATHML_CREATE(menclose, NS_NewMathMLmencloseFrame),
SIMPLE_MATHML_CREATE(semantics, NS_NewMathMLmrowFrame)};
return FindDataByTag(aElement, aStyle, sMathMLData, std::size(sMathMLData));
}

View File

@@ -15,7 +15,7 @@ ListMutationObserver::~ListMutationObserver() = default;
void ListMutationObserver::Attach(bool aRepaint) {
nsAutoString id;
if (InputElement().GetAttr(nsGkAtoms::list_, id)) {
if (InputElement().GetAttr(nsGkAtoms::list, id)) {
Unlink();
RefPtr<nsAtom> idAtom = NS_AtomizeMainThread(id);
ResetToID(InputElement(), idAtom);

View File

@@ -51,7 +51,7 @@ nsRangeFrame::nsRangeFrame(ComputedStyle* aStyle, nsPresContext* aPresContext)
void nsRangeFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) {
nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
if (InputElement().HasAttr(nsGkAtoms::list_)) {
if (InputElement().HasAttr(nsGkAtoms::list)) {
mListMutationObserver = new ListMutationObserver(*this);
}
}
@@ -595,7 +595,7 @@ nsresult nsRangeFrame::AttributeChanged(int32_t aNameSpaceID,
} else if (aAttribute == nsGkAtoms::orient) {
PresShell()->FrameNeedsReflow(this, IntrinsicDirty::None,
NS_FRAME_IS_DIRTY);
} else if (aAttribute == nsGkAtoms::list_) {
} else if (aAttribute == nsGkAtoms::list) {
const bool isRemoval = aModType == MutationEvent_Binding::REMOVAL;
if (mListMutationObserver) {
mListMutationObserver->Detach();

View File

@@ -5472,7 +5472,7 @@ already_AddRefed<Element> ScrollContainerFrame::MakeScrollbar(
if (mIsRoot) {
e->SetProperty(nsGkAtoms::docLevelNativeAnonymousContent,
reinterpret_cast<void*>(true));
e->SetAttr(kNameSpaceID_None, nsGkAtoms::root_, u"true"_ns, false);
e->SetAttr(kNameSpaceID_None, nsGkAtoms::root, u"true"_ns, false);
// Don't bother making style caching take [root="true"] styles into account.
aKey = AnonymousContentKey::None;
@@ -5632,7 +5632,7 @@ nsresult ScrollContainerFrame::CreateAnonymousContent(
mScrollCornerContent->SetProperty(
nsGkAtoms::docLevelNativeAnonymousContent,
reinterpret_cast<void*>(true));
mScrollCornerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::root_,
mScrollCornerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::root,
u"true"_ns, false);
// Don't bother making style caching take [root="true"] styles into

View File

@@ -2299,7 +2299,7 @@ already_AddRefed<gfxTextRun> BuildTextRunsScanner::BuildTextRunForFrames(
if (mLineContainer->HasAnyStateBits(TEXT_IS_IN_TOKEN_MATHML)) {
// All MathML tokens except <mtext> use 'math' script.
if (!(parent && parent->GetContent() &&
parent->GetContent()->IsMathMLElement(nsGkAtoms::mtext_))) {
parent->GetContent()->IsMathMLElement(nsGkAtoms::mtext))) {
flags |= gfx::ShapedTextFlags::TEXT_USE_MATH_SCRIPT;
}
nsIMathMLFrame* mathFrame = do_QueryFrame(parent);

View File

@@ -275,7 +275,7 @@ static LanguageSpecificCasingBehavior GetCasingFor(const nsAtom* aLang) {
if (aLang == nsGkAtoms::ga) {
return eLSCB_Irish;
}
if (aLang == nsGkAtoms::lt_) {
if (aLang == nsGkAtoms::lt) {
return eLSCB_Lithuanian;
}

View File

@@ -1194,7 +1194,7 @@ class nsMathMLContainerFrame::RowChildFrameIterator {
GetItalicCorrection(mReflowOutput.mBoundingMetrics, leftCorrection,
rightCorrection);
if (!mChildFrame->GetPrevSibling() &&
mParentFrame->GetContent()->IsMathMLElement(nsGkAtoms::msqrt_)) {
mParentFrame->GetContent()->IsMathMLElement(nsGkAtoms::msqrt)) {
// Remove leading correction in <msqrt> because the sqrt glyph itself is
// there first.
if (!mRTL) {
@@ -1335,7 +1335,7 @@ static nscoord AddInterFrameSpacingToSize(ReflowOutput& aDesiredSize,
if (MOZ_UNLIKELY(!parentContent)) {
return 0;
}
if (parentContent->IsAnyOfMathMLElements(nsGkAtoms::math, nsGkAtoms::mtd_)) {
if (parentContent->IsAnyOfMathMLElements(nsGkAtoms::math, nsGkAtoms::mtd)) {
gap = GetInterFrameSpacingFor(aFrame->StyleFont()->mMathDepth, parent,
aFrame);
// add our own italic correction

View File

@@ -35,7 +35,7 @@ nsMathMLTokenFrame::InheritAutomaticData(nsIFrame* aParent) {
eMathMLFrameType nsMathMLTokenFrame::GetMathMLFrameType() {
// treat everything other than <mi> as ordinary...
if (!mContent->IsMathMLElement(nsGkAtoms::mi_)) {
if (!mContent->IsMathMLElement(nsGkAtoms::mi)) {
return eMathMLFrameType_Ordinary;
}
@@ -71,7 +71,7 @@ void nsMathMLTokenFrame::MarkTextFramesAsTokenMathML() {
}
}
}
if (mContent->IsMathMLElement(nsGkAtoms::mi_) && childCount == 1) {
if (mContent->IsMathMLElement(nsGkAtoms::mi) && childCount == 1) {
nsAutoString data;
nsContentUtils::GetNodeTextContent(mContent, false, data);

View File

@@ -29,7 +29,7 @@ class nsMathMLTokenFrame : public nsMathMLContainerFrame {
TransmitAutomaticData() override {
// The REC defines the following elements to be space-like:
// * an mtext, mspace, maligngroup, or malignmark element;
if (mContent->IsMathMLElement(nsGkAtoms::mtext_)) {
if (mContent->IsMathMLElement(nsGkAtoms::mtext)) {
mPresentationData.flags |= NS_MATHML_SPACE_LIKE;
}
return NS_OK;

View File

@@ -148,7 +148,7 @@ void nsMathMLmencloseFrame::InitNotations() {
nsAutoString value;
if (mContent->AsElement()->GetAttr(nsGkAtoms::notation_, value)) {
if (mContent->AsElement()->GetAttr(nsGkAtoms::notation, value)) {
// parse the notation attribute
nsWhitespaceTokenizer tokenizer(value);
@@ -596,7 +596,7 @@ nscoord nsMathMLmencloseFrame::FixInterFrameSpacing(
nsresult nsMathMLmencloseFrame::AttributeChanged(int32_t aNameSpaceID,
nsAtom* aAttribute,
int32_t aModType) {
if (aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::notation_) {
if (aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::notation) {
InitNotations();
PresShell()->FrameNeedsReflow(this, IntrinsicDirty::FrameAndAncestors,
NS_FRAME_IS_DIRTY);

View File

@@ -122,7 +122,7 @@ nsresult nsMathMLmfracFrame::AttributeChanged(int32_t aNameSpaceID,
nsAtom* aAttribute,
int32_t aModType) {
if (aNameSpaceID == kNameSpaceID_None &&
nsGkAtoms::linethickness_ == aAttribute) {
nsGkAtoms::linethickness == aAttribute) {
// The thickness changes, so a repaint of the bar is needed.
InvalidateFrame();
// The thickness affects vertical offsets.
@@ -198,7 +198,7 @@ nsresult nsMathMLmfracFrame::Place(DrawTarget* aDrawTarget,
// see if the linethickness attribute is there
nsAutoString value;
mContent->AsElement()->GetAttr(nsGkAtoms::linethickness_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::linethickness, value);
mLineThickness =
CalcLineThickness(presContext, mComputedStyle, value, onePixel,
defaultRuleThickness, fontSizeInflation);

View File

@@ -42,7 +42,7 @@ uint8_t nsMathMLmmultiscriptsFrame::ScriptIncrement(nsIFrame* aFrame) {
}
if (mFrames.ContainsFrame(aFrame)) {
if (mFrames.FirstChild() == aFrame ||
aFrame->GetContent()->IsMathMLElement(nsGkAtoms::mprescripts_)) {
aFrame->GetContent()->IsMathMLElement(nsGkAtoms::mprescripts)) {
return 0; // No script increment for base frames or prescript markers
}
return 1;
@@ -61,12 +61,12 @@ nsMathMLmmultiscriptsFrame::TransmitAutomaticData() {
// the compression flag in them.
int32_t count = 0;
bool isSubScript = !mContent->IsMathMLElement(nsGkAtoms::msup_);
bool isSubScript = !mContent->IsMathMLElement(nsGkAtoms::msup);
AutoTArray<nsIFrame*, 8> subScriptFrames;
nsIFrame* childFrame = mFrames.FirstChild();
while (childFrame) {
if (childFrame->GetContent()->IsMathMLElement(nsGkAtoms::mprescripts_)) {
if (childFrame->GetContent()->IsMathMLElement(nsGkAtoms::mprescripts)) {
// mprescripts frame
} else if (0 == count) {
// base frame
@@ -118,12 +118,12 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
// This function deals with both munderover etc. as well as msubsup etc.
// As the former behaves identically to the later, we treat it as such
// to avoid additional checks later.
if (aFrame->GetContent()->IsMathMLElement(nsGkAtoms::mover_)) {
tag = nsGkAtoms::msup_;
} else if (aFrame->GetContent()->IsMathMLElement(nsGkAtoms::munder_)) {
tag = nsGkAtoms::msub_;
} else if (aFrame->GetContent()->IsMathMLElement(nsGkAtoms::munderover_)) {
tag = nsGkAtoms::msubsup_;
if (aFrame->GetContent()->IsMathMLElement(nsGkAtoms::mover)) {
tag = nsGkAtoms::msup;
} else if (aFrame->GetContent()->IsMathMLElement(nsGkAtoms::munder)) {
tag = nsGkAtoms::msub;
} else if (aFrame->GetContent()->IsMathMLElement(nsGkAtoms::munderover)) {
tag = nsGkAtoms::msubsup;
}
nsBoundingMetrics bmFrame;
@@ -138,7 +138,7 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
nsIFrame* baseFrame = aFrame->PrincipalChildList().FirstChild();
if (!baseFrame) {
if (tag == nsGkAtoms::mmultiscripts_) {
if (tag == nsGkAtoms::mmultiscripts) {
aFrame->ReportErrorToConsole("NoBase");
} else {
aFrame->ReportChildCountError();
@@ -194,7 +194,7 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
nscoord subScriptShift1, subScriptShift2;
// Get subScriptShift{1,2} default from font
GetSubScriptShifts(fm, subScriptShift1, subScriptShift2);
if (tag == nsGkAtoms::msub_) {
if (tag == nsGkAtoms::msub) {
subScriptShift = subScriptShift1;
} else {
subScriptShift = std::max(subScriptShift1, subScriptShift2);
@@ -289,14 +289,14 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
// Boolean to determine whether the current child is a subscript.
// Note that only msup starts with a superscript.
bool isSubScript = (tag != nsGkAtoms::msup_);
bool isSubScript = (tag != nsGkAtoms::msup);
nsIFrame* childFrame = aFrame->PrincipalChildList().FirstChild();
while (childFrame) {
if (childFrame->GetContent()->IsMathMLElement(nsGkAtoms::mprescripts_)) {
if (tag != nsGkAtoms::mmultiscripts_) {
if (childFrame->GetContent()->IsMathMLElement(nsGkAtoms::mprescripts)) {
if (tag != nsGkAtoms::mmultiscripts) {
if (!aFlags.contains(PlaceFlag::MeasureOnly)) {
aFrame->ReportInvalidChildError(nsGkAtoms::mprescripts_);
aFrame->ReportInvalidChildError(nsGkAtoms::mprescripts);
}
return aFrame->PlaceAsMrow(aDrawTarget, aFlags, aDesiredSize);
}
@@ -323,7 +323,7 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);
baseMargin = GetMarginForPlace(aFlags, baseFrame);
if (tag != nsGkAtoms::msub_) {
if (tag != nsGkAtoms::msub) {
// Apply italics correction if there is the potential for a
// postsupscript.
GetItalicCorrection(bmBase, italicCorrection);
@@ -372,7 +372,7 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
}
rightBearing = bmSubScript.rightBearing + subScriptMargin.LeftRight();
if (tag == nsGkAtoms::msub_) {
if (tag == nsGkAtoms::msub) {
boundingMetrics.rightBearing = boundingMetrics.width + rightBearing;
boundingMetrics.width += width;
@@ -454,7 +454,7 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
// negotiate between the various shifts so that
// there is enough gap between the sup and subscripts
// Rule 18e, App. G, TeXbook
if (tag == nsGkAtoms::mmultiscripts_ || tag == nsGkAtoms::msubsup_) {
if (tag == nsGkAtoms::mmultiscripts || tag == nsGkAtoms::msubsup) {
nscoord subSuperscriptGapMin;
if (mathFont) {
subSuperscriptGapMin = mathFont->MathTable()->Constant(
@@ -506,14 +506,13 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
}
// NoBase error may also have been reported above
if ((count != 2 && (tag == nsGkAtoms::msup_ || tag == nsGkAtoms::msub_)) ||
(count != 3 && tag == nsGkAtoms::msubsup_) || !baseFrame ||
(!isSubScript && tag == nsGkAtoms::mmultiscripts_)) {
if ((count != 2 && (tag == nsGkAtoms::msup || tag == nsGkAtoms::msub)) ||
(count != 3 && tag == nsGkAtoms::msubsup) || !baseFrame ||
(!isSubScript && tag == nsGkAtoms::mmultiscripts)) {
// report an error, encourage people to get their markups in order
if (!aFlags.contains(PlaceFlag::MeasureOnly)) {
if ((count != 2 &&
(tag == nsGkAtoms::msup_ || tag == nsGkAtoms::msub_)) ||
(count != 3 && tag == nsGkAtoms::msubsup_)) {
if ((count != 2 && (tag == nsGkAtoms::msup || tag == nsGkAtoms::msub)) ||
(count != 3 && tag == nsGkAtoms::msubsup)) {
aFrame->ReportChildCountError();
} else if (!baseFrame) {
aFrame->ReportErrorToConsole("NoBase");
@@ -538,14 +537,14 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
}
// we left out the base during our bounding box updates, so ...
if (tag == nsGkAtoms::msub_) {
if (tag == nsGkAtoms::msub) {
boundingMetrics.ascent = std::max(bmBase.ascent + baseMargin.top,
bmMultiSub.ascent - maxSubScriptShift);
} else {
boundingMetrics.ascent = std::max(bmBase.ascent + baseMargin.top,
(bmMultiSup.ascent + maxSupScriptShift));
}
if (tag == nsGkAtoms::msup_) {
if (tag == nsGkAtoms::msup) {
boundingMetrics.descent = std::max(bmBase.descent + baseMargin.bottom,
bmMultiSup.descent - maxSupScriptShift);
} else {
@@ -596,7 +595,7 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
// With msub and msup there is only one element and
// subscriptFrame/supScriptFrame have already been set above where
// relevant. In these cases we skip to the reflow part.
if (tag == nsGkAtoms::msub_ || tag == nsGkAtoms::msup_) {
if (tag == nsGkAtoms::msub || tag == nsGkAtoms::msup) {
count = 1;
} else {
count = 0;
@@ -640,7 +639,7 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
subScriptFrame = childFrame;
count = 1;
} else if (1 == count) {
if (tag != nsGkAtoms::msub_) {
if (tag != nsGkAtoms::msub) {
supScriptFrame = childFrame;
}
count = 0;

View File

@@ -239,7 +239,7 @@ void nsMathMLmoFrame::ProcessOperatorData() {
}
// see if the accent attribute is there
mContent->AsElement()->GetAttr(nsGkAtoms::accent_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::accent, value);
if (value.LowerCaseEqualsLiteral("true")) {
mEmbellishData.flags |= NS_MATHML_EMBELLISH_ACCENT;
} else if (value.LowerCaseEqualsLiteral("false")) {
@@ -247,7 +247,7 @@ void nsMathMLmoFrame::ProcessOperatorData() {
}
// see if the movablelimits attribute is there
mContent->AsElement()->GetAttr(nsGkAtoms::movablelimits_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::movablelimits, value);
if (value.LowerCaseEqualsLiteral("true")) {
mEmbellishData.flags |= NS_MATHML_EMBELLISH_MOVABLELIMITS;
} else if (value.LowerCaseEqualsLiteral("false")) {
@@ -388,7 +388,7 @@ void nsMathMLmoFrame::ProcessOperatorData() {
// which is not necessarily the default one.
//
nscoord leadingSpace = mEmbellishData.leadingSpace;
mContent->AsElement()->GetAttr(nsGkAtoms::lspace_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::lspace, value);
if (!value.IsEmpty()) {
nsCSSValue cssValue;
if (dom::MathMLElement::ParseNumericValue(value, cssValue, 0,
@@ -417,7 +417,7 @@ void nsMathMLmoFrame::ProcessOperatorData() {
// which is not necessarily the default one.
//
nscoord trailingSpace = mEmbellishData.trailingSpace;
mContent->AsElement()->GetAttr(nsGkAtoms::rspace_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::rspace, value);
if (!value.IsEmpty()) {
nsCSSValue cssValue;
if (dom::MathMLElement::ParseNumericValue(value, cssValue, 0,
@@ -459,35 +459,35 @@ void nsMathMLmoFrame::ProcessOperatorData() {
// special: accent and movablelimits are handled above,
// don't process them here
mContent->AsElement()->GetAttr(nsGkAtoms::stretchy_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::stretchy, value);
if (value.LowerCaseEqualsLiteral("false")) {
mFlags &= ~NS_MATHML_OPERATOR_STRETCHY;
} else if (value.LowerCaseEqualsLiteral("true")) {
mFlags |= NS_MATHML_OPERATOR_STRETCHY;
}
if (NS_MATHML_OPERATOR_IS_FENCE(mFlags)) {
mContent->AsElement()->GetAttr(nsGkAtoms::fence_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::fence, value);
if (value.LowerCaseEqualsLiteral("false")) {
mFlags &= ~NS_MATHML_OPERATOR_FENCE;
} else {
mEmbellishData.flags |= NS_MATHML_EMBELLISH_FENCE;
}
}
mContent->AsElement()->GetAttr(nsGkAtoms::largeop_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::largeop, value);
if (value.LowerCaseEqualsLiteral("false")) {
mFlags &= ~NS_MATHML_OPERATOR_LARGEOP;
} else if (value.LowerCaseEqualsLiteral("true")) {
mFlags |= NS_MATHML_OPERATOR_LARGEOP;
}
if (NS_MATHML_OPERATOR_IS_SEPARATOR(mFlags)) {
mContent->AsElement()->GetAttr(nsGkAtoms::separator_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::separator, value);
if (value.LowerCaseEqualsLiteral("false")) {
mFlags &= ~NS_MATHML_OPERATOR_SEPARATOR;
} else {
mEmbellishData.flags |= NS_MATHML_EMBELLISH_SEPARATOR;
}
}
mContent->AsElement()->GetAttr(nsGkAtoms::symmetric_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::symmetric, value);
if (value.LowerCaseEqualsLiteral("false")) {
mFlags &= ~NS_MATHML_OPERATOR_SYMMETRIC;
} else if (value.LowerCaseEqualsLiteral("true")) {
@@ -507,7 +507,7 @@ void nsMathMLmoFrame::ProcessOperatorData() {
// normal size.
//
mMinSize = 0;
mContent->AsElement()->GetAttr(nsGkAtoms::minsize_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::minsize, value);
if (!value.IsEmpty()) {
nsCSSValue cssValue;
if (dom::MathMLElement::ParseNumericValue(value, cssValue, 0,
@@ -538,7 +538,7 @@ void nsMathMLmoFrame::ProcessOperatorData() {
// normal size.
//
mMaxSize = NS_MATHML_OPERATOR_SIZE_INFINITY;
mContent->AsElement()->GetAttr(nsGkAtoms::maxsize_, value);
mContent->AsElement()->GetAttr(nsGkAtoms::maxsize, value);
if (!value.IsEmpty()) {
nsCSSValue cssValue;
if (dom::MathMLElement::ParseNumericValue(value, cssValue, 0,
@@ -1081,12 +1081,12 @@ nsresult nsMathMLmoFrame::AttributeChanged(int32_t aNameSpaceID,
// in a significant way and re-layout the entire hierarchy.
// This is not needed for the fence and separator
// attributes, since they have no visual effect.
if (aAttribute == nsGkAtoms::accent_ || aAttribute == nsGkAtoms::form ||
aAttribute == nsGkAtoms::largeop_ || aAttribute == nsGkAtoms::maxsize_ ||
aAttribute == nsGkAtoms::minsize_ ||
aAttribute == nsGkAtoms::movablelimits_ ||
aAttribute == nsGkAtoms::rspace_ || aAttribute == nsGkAtoms::stretchy_ ||
aAttribute == nsGkAtoms::symmetric_ || aAttribute == nsGkAtoms::lspace_) {
if (aAttribute == nsGkAtoms::accent || aAttribute == nsGkAtoms::form ||
aAttribute == nsGkAtoms::largeop || aAttribute == nsGkAtoms::maxsize ||
aAttribute == nsGkAtoms::minsize ||
aAttribute == nsGkAtoms::movablelimits ||
aAttribute == nsGkAtoms::rspace || aAttribute == nsGkAtoms::stretchy ||
aAttribute == nsGkAtoms::symmetric || aAttribute == nsGkAtoms::lspace) {
// set the target as the parent of our outermost embellished container
// (we ensure that we are the core, not just a sibling of the core)
nsIFrame* target = this;

View File

@@ -52,14 +52,14 @@ nsresult nsMathMLmpaddedFrame::AttributeChanged(int32_t aNameSpaceID,
} else if (aAttribute == nsGkAtoms::height) {
mHeight.mState = Attribute::ParsingState::Dirty;
hasDirtyAttributes = true;
} else if (aAttribute == nsGkAtoms::depth_) {
} else if (aAttribute == nsGkAtoms::depth) {
mDepth.mState = Attribute::ParsingState::Dirty;
hasDirtyAttributes = true;
} else if (aAttribute == nsGkAtoms::lspace_) {
} else if (aAttribute == nsGkAtoms::lspace) {
mLeadingSpace.mState = Attribute::ParsingState::Dirty;
hasDirtyAttributes = true;
intrinsicDirty = IntrinsicDirty::FrameAndAncestors;
} else if (aAttribute == nsGkAtoms::voffset_) {
} else if (aAttribute == nsGkAtoms::voffset) {
mVerticalOffset.mState = Attribute::ParsingState::Dirty;
hasDirtyAttributes = true;
}
@@ -346,20 +346,20 @@ nsresult nsMathMLmpaddedFrame::Place(DrawTarget* aDrawTarget,
height = std::max(0, height);
// update "depth" (this is the descent in the terminology of the REC)
ParseAttribute(nsGkAtoms::depth_, mDepth);
ParseAttribute(nsGkAtoms::depth, mDepth);
UpdateValue(mDepth, Attribute::PseudoUnit::Depth, aDesiredSize, depth,
fontSizeInflation);
depth = std::max(0, depth);
// update lspace
ParseAttribute(nsGkAtoms::lspace_, mLeadingSpace);
ParseAttribute(nsGkAtoms::lspace, mLeadingSpace);
if (mLeadingSpace.mPseudoUnit != Attribute::PseudoUnit::ItSelf) {
UpdateValue(mLeadingSpace, Attribute::PseudoUnit::Unspecified, aDesiredSize,
lspace, fontSizeInflation);
}
// update voffset
ParseAttribute(nsGkAtoms::voffset_, mVerticalOffset);
ParseAttribute(nsGkAtoms::voffset, mVerticalOffset);
if (mVerticalOffset.mPseudoUnit != Attribute::PseudoUnit::ItSelf) {
UpdateValue(mVerticalOffset, Attribute::PseudoUnit::Unspecified,
aDesiredSize, voffset, fontSizeInflation);

View File

@@ -45,7 +45,7 @@ void nsMathMLmrootFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
}
bool nsMathMLmrootFrame::ShouldUseRowFallback() {
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot_);
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot);
if (!isRootWithIndex) {
return false;
}
@@ -59,7 +59,7 @@ bool nsMathMLmrootFrame::ShouldUseRowFallback() {
}
bool nsMathMLmrootFrame::IsMrowLike() {
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot_);
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot);
if (isRootWithIndex) {
return false;
}
@@ -70,7 +70,7 @@ NS_IMETHODIMP
nsMathMLmrootFrame::InheritAutomaticData(nsIFrame* aParent) {
nsMathMLContainerFrame::InheritAutomaticData(aParent);
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot_);
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot);
if (!isRootWithIndex) {
mPresentationData.flags |= NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY;
}
@@ -80,7 +80,7 @@ nsMathMLmrootFrame::InheritAutomaticData(nsIFrame* aParent) {
NS_IMETHODIMP
nsMathMLmrootFrame::TransmitAutomaticData() {
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot_);
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot);
if (isRootWithIndex) {
// 1. The REC says:
// The <mroot> element increments scriptlevel by 2, and sets displaystyle
@@ -170,7 +170,7 @@ nsresult nsMathMLmrootFrame::Place(DrawTarget* aDrawTarget,
return PlaceAsMrow(aDrawTarget, aFlags, aDesiredSize);
}
const bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot_);
const bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot);
nsBoundingMetrics bmSqr, bmBase, bmIndex;
nsIFrame *baseFrame = nullptr, *indexFrame = nullptr;
nsMargin baseMargin, indexMargin;

View File

@@ -40,7 +40,7 @@ nsresult nsMathMLmrowFrame::AttributeChanged(int32_t aNameSpaceID,
// Special for <mtable>: In the frame construction code, we also use
// this frame class as a wrapper for mtable. Hence, we should pass the
// notification to the real mtable
if (mContent->IsMathMLElement(nsGkAtoms::mtable_)) {
if (mContent->IsMathMLElement(nsGkAtoms::mtable)) {
nsIFrame* frame = mFrames.FirstChild();
for (; frame; frame = frame->PrincipalChildList().FirstChild()) {
// drill down to the real mtable

View File

@@ -41,7 +41,7 @@ nsresult nsMathMLmspaceFrame::AttributeChanged(int32_t aNameSpaceID,
} else if (aAttribute == nsGkAtoms::height) {
mHeight.mState = Attribute::ParsingState::Dirty;
hasDirtyAttributes = true;
} else if (aAttribute == nsGkAtoms::depth_) {
} else if (aAttribute == nsGkAtoms::depth) {
mDepth.mState = Attribute::ParsingState::Dirty;
hasDirtyAttributes = true;
}
@@ -98,7 +98,7 @@ nsresult nsMathMLmspaceFrame::Place(DrawTarget* aDrawTarget,
nscoord height =
CalculateAttributeValue(nsGkAtoms::height, mHeight, 0, fontSizeInflation);
nscoord depth =
CalculateAttributeValue(nsGkAtoms::depth_, mDepth, 0, fontSizeInflation);
CalculateAttributeValue(nsGkAtoms::depth, mDepth, 0, fontSizeInflation);
mBoundingMetrics = nsBoundingMetrics();
mBoundingMetrics.width = width;

View File

@@ -35,7 +35,7 @@ using mozilla::dom::Element;
static int8_t ParseStyleValue(nsAtom* aAttribute,
const nsAString& aAttributeValue) {
if (aAttribute == nsGkAtoms::rowalign_) {
if (aAttribute == nsGkAtoms::rowalign) {
if (aAttributeValue.EqualsLiteral("top")) {
return static_cast<int8_t>(StyleVerticalAlignKeyword::Top);
}
@@ -48,7 +48,7 @@ static int8_t ParseStyleValue(nsAtom* aAttribute,
return static_cast<int8_t>(StyleVerticalAlignKeyword::Baseline);
}
if (aAttribute == nsGkAtoms::columnalign_) {
if (aAttribute == nsGkAtoms::columnalign) {
if (aAttributeValue.EqualsLiteral("left")) {
return int8_t(StyleTextAlign::Left);
}
@@ -58,8 +58,8 @@ static int8_t ParseStyleValue(nsAtom* aAttribute,
return int8_t(StyleTextAlign::Center);
}
if (aAttribute == nsGkAtoms::rowlines_ ||
aAttribute == nsGkAtoms::columnlines_) {
if (aAttribute == nsGkAtoms::rowlines ||
aAttribute == nsGkAtoms::columnlines) {
if (aAttributeValue.EqualsLiteral("solid")) {
return static_cast<int8_t>(StyleBorderStyle::Solid);
}
@@ -147,16 +147,16 @@ NS_DECLARE_FRAME_PROPERTY_DELETABLE(ColumnLinesProperty, nsTArray<int8_t>)
static const FramePropertyDescriptor<nsTArray<int8_t>>* AttributeToProperty(
nsAtom* aAttribute) {
if (aAttribute == nsGkAtoms::rowalign_) {
if (aAttribute == nsGkAtoms::rowalign) {
return RowAlignProperty();
}
if (aAttribute == nsGkAtoms::rowlines_) {
if (aAttribute == nsGkAtoms::rowlines) {
return RowLinesProperty();
}
if (aAttribute == nsGkAtoms::columnalign_) {
if (aAttribute == nsGkAtoms::columnalign) {
return ColumnAlignProperty();
}
NS_ASSERTION(aAttribute == nsGkAtoms::columnlines_, "Invalid attribute");
NS_ASSERTION(aAttribute == nsGkAtoms::columnlines, "Invalid attribute");
return ColumnLinesProperty();
}
@@ -445,7 +445,7 @@ static void ExtractSpacingValues(const nsAString& aString, nsAtom* aAttribute,
nsAutoString valueString;
valueString.Assign(str);
nscoord newValue;
if (aAttribute == nsGkAtoms::framespacing_ && elementNum) {
if (aAttribute == nsGkAtoms::framespacing && elementNum) {
newValue = aDefaultValue1;
} else {
newValue = aDefaultValue0;
@@ -463,16 +463,16 @@ static void ExtractSpacingValues(const nsAString& aString, nsAtom* aAttribute,
static void ParseSpacingAttribute(nsMathMLmtableFrame* aFrame,
nsAtom* aAttribute) {
NS_ASSERTION(aAttribute == nsGkAtoms::rowspacing_ ||
aAttribute == nsGkAtoms::columnspacing_ ||
aAttribute == nsGkAtoms::framespacing_,
NS_ASSERTION(aAttribute == nsGkAtoms::rowspacing ||
aAttribute == nsGkAtoms::columnspacing ||
aAttribute == nsGkAtoms::framespacing,
"Non spacing attribute passed");
nsAutoString attrValue;
Element* frameElement = aFrame->GetContent()->AsElement();
frameElement->GetAttr(aAttribute, attrValue);
if (nsGkAtoms::framespacing_ == aAttribute) {
if (nsGkAtoms::framespacing == aAttribute) {
nsAutoString frame;
frameElement->GetAttr(nsGkAtoms::frame, frame);
if (frame.IsEmpty() || frame.EqualsLiteral("none")) {
@@ -487,10 +487,10 @@ static void ParseSpacingAttribute(nsMathMLmtableFrame* aFrame,
float fontSizeInflation = nsLayoutUtils::FontSizeInflationFor(aFrame);
RefPtr<nsFontMetrics> fm =
nsLayoutUtils::GetFontMetricsForFrame(aFrame, fontSizeInflation);
if (nsGkAtoms::rowspacing_ == aAttribute) {
if (nsGkAtoms::rowspacing == aAttribute) {
value = kDefaultRowspacingEx * fm->XHeight();
value2 = 0;
} else if (nsGkAtoms::columnspacing_ == aAttribute) {
} else if (nsGkAtoms::columnspacing == aAttribute) {
value = kDefaultColumnspacingEm * fm->EmHeight();
value2 = 0;
} else {
@@ -507,7 +507,7 @@ static void ParseSpacingAttribute(nsMathMLmtableFrame* aFrame,
}
valueList.AppendElement(value);
}
if (aAttribute == nsGkAtoms::framespacing_) {
if (aAttribute == nsGkAtoms::framespacing) {
if (valueList.Length() == 1) {
if (frameElement->HasAttr(aAttribute)) {
ReportParseError(aFrame, aAttribute->GetUTF16String(), attrValue.get());
@@ -518,9 +518,9 @@ static void ParseSpacingAttribute(nsMathMLmtableFrame* aFrame,
}
}
if (aAttribute == nsGkAtoms::rowspacing_) {
if (aAttribute == nsGkAtoms::rowspacing) {
aFrame->SetRowSpacingArray(valueList);
} else if (aAttribute == nsGkAtoms::columnspacing_) {
} else if (aAttribute == nsGkAtoms::columnspacing) {
aFrame->SetColSpacingArray(valueList);
} else {
aFrame->SetFrameSpacing(valueList.ElementAt(0), valueList.ElementAt(1));
@@ -528,9 +528,9 @@ static void ParseSpacingAttribute(nsMathMLmtableFrame* aFrame,
}
static void ParseSpacingAttributes(nsMathMLmtableFrame* aTableFrame) {
ParseSpacingAttribute(aTableFrame, nsGkAtoms::rowspacing_);
ParseSpacingAttribute(aTableFrame, nsGkAtoms::columnspacing_);
ParseSpacingAttribute(aTableFrame, nsGkAtoms::framespacing_);
ParseSpacingAttribute(aTableFrame, nsGkAtoms::rowspacing);
ParseSpacingAttribute(aTableFrame, nsGkAtoms::columnspacing);
ParseSpacingAttribute(aTableFrame, nsGkAtoms::framespacing);
aTableFrame->SetUseCSSSpacing();
}
@@ -538,12 +538,12 @@ static void ParseSpacingAttributes(nsMathMLmtableFrame* aTableFrame) {
// so it can only happen after they are made ready by the table base class.
static void MapAllAttributesIntoCSS(nsMathMLmtableFrame* aTableFrame) {
// Map mtable rowalign & rowlines.
ParseFrameAttribute(aTableFrame, nsGkAtoms::rowalign_, true);
ParseFrameAttribute(aTableFrame, nsGkAtoms::rowlines_, true);
ParseFrameAttribute(aTableFrame, nsGkAtoms::rowalign, true);
ParseFrameAttribute(aTableFrame, nsGkAtoms::rowlines, true);
// Map mtable columnalign & columnlines.
ParseFrameAttribute(aTableFrame, nsGkAtoms::columnalign_, true);
ParseFrameAttribute(aTableFrame, nsGkAtoms::columnlines_, true);
ParseFrameAttribute(aTableFrame, nsGkAtoms::columnalign, true);
ParseFrameAttribute(aTableFrame, nsGkAtoms::columnlines, true);
// Map mtable rowspacing, columnspacing & framespacing
ParseSpacingAttributes(aTableFrame);
@@ -558,17 +558,17 @@ static void MapAllAttributesIntoCSS(nsMathMLmtableFrame* aTableFrame) {
DEBUG_VERIFY_THAT_FRAME_IS(rowFrame, TableRow);
if (rowFrame->IsTableRowFrame()) {
// Map row rowalign.
ParseFrameAttribute(rowFrame, nsGkAtoms::rowalign_, false);
ParseFrameAttribute(rowFrame, nsGkAtoms::rowalign, false);
// Map row columnalign.
ParseFrameAttribute(rowFrame, nsGkAtoms::columnalign_, true);
ParseFrameAttribute(rowFrame, nsGkAtoms::columnalign, true);
for (nsIFrame* cellFrame : rowFrame->PrincipalChildList()) {
DEBUG_VERIFY_THAT_FRAME_IS(cellFrame, TableCell);
if (cellFrame->IsTableCellFrame()) {
// Map cell rowalign.
ParseFrameAttribute(cellFrame, nsGkAtoms::rowalign_, false);
ParseFrameAttribute(cellFrame, nsGkAtoms::rowalign, false);
// Map row columnalign.
ParseFrameAttribute(cellFrame, nsGkAtoms::columnalign_, false);
ParseFrameAttribute(cellFrame, nsGkAtoms::columnalign, false);
}
}
}
@@ -685,9 +685,9 @@ nsresult nsMathMLmtableWrapperFrame::AttributeChanged(int32_t aNameSpaceID,
// ...and the other attributes affect rows or columns in one way or another
if (aNameSpaceID == kNameSpaceID_None &&
(aAttribute == nsGkAtoms::rowspacing_ ||
aAttribute == nsGkAtoms::columnspacing_ ||
aAttribute == nsGkAtoms::framespacing_)) {
(aAttribute == nsGkAtoms::rowspacing ||
aAttribute == nsGkAtoms::columnspacing ||
aAttribute == nsGkAtoms::framespacing)) {
nsMathMLmtableFrame* mathMLmtableFrame = do_QueryFrame(tableFrame);
if (mathMLmtableFrame) {
ParseSpacingAttribute(mathMLmtableFrame, aAttribute);
@@ -699,10 +699,9 @@ nsresult nsMathMLmtableWrapperFrame::AttributeChanged(int32_t aNameSpaceID,
}
if (aNameSpaceID == kNameSpaceID_None &&
(aAttribute == nsGkAtoms::rowalign_ ||
aAttribute == nsGkAtoms::rowlines_ ||
aAttribute == nsGkAtoms::columnalign_ ||
aAttribute == nsGkAtoms::columnlines_)) {
(aAttribute == nsGkAtoms::rowalign || aAttribute == nsGkAtoms::rowlines ||
aAttribute == nsGkAtoms::columnalign ||
aAttribute == nsGkAtoms::columnlines)) {
// clear any cached property list for this table
tableFrame->RemoveProperty(AttributeToProperty(aAttribute));
// Reparse the new attribute on the table.
@@ -1000,10 +999,10 @@ nscoord nsMathMLmtableFrame::GetRowSpacing(int32_t aStartRowIndex,
}
void nsMathMLmtableFrame::SetUseCSSSpacing() {
mUseCSSSpacing = !(mContent->AsElement()->HasAttr(nsGkAtoms::rowspacing_) ||
mContent->AsElement()->HasAttr(
kNameSpaceID_None, nsGkAtoms::columnspacing_) ||
mContent->AsElement()->HasAttr(nsGkAtoms::framespacing_));
mUseCSSSpacing = !(mContent->AsElement()->HasAttr(nsGkAtoms::rowspacing) ||
mContent->AsElement()->HasAttr(kNameSpaceID_None,
nsGkAtoms::columnspacing) ||
mContent->AsElement()->HasAttr(nsGkAtoms::framespacing));
}
NS_QUERYFRAME_HEAD(nsMathMLmtableFrame)
@@ -1032,8 +1031,8 @@ nsresult nsMathMLmtrFrame::AttributeChanged(int32_t aNameSpaceID,
// columnalign : Here
if (aNameSpaceID != kNameSpaceID_None ||
(aAttribute != nsGkAtoms::rowalign_ &&
aAttribute != nsGkAtoms::columnalign_)) {
(aAttribute != nsGkAtoms::rowalign &&
aAttribute != nsGkAtoms::columnalign)) {
// Skip nsTableCellFrame::AttributeChanged, mtr does not share any attribute
// with tr.
return nsContainerFrame::AttributeChanged(aNameSpaceID, aAttribute,
@@ -1042,7 +1041,7 @@ nsresult nsMathMLmtrFrame::AttributeChanged(int32_t aNameSpaceID,
RemoveProperty(AttributeToProperty(aAttribute));
bool allowMultiValues = (aAttribute == nsGkAtoms::columnalign_);
bool allowMultiValues = (aAttribute == nsGkAtoms::columnalign);
// Reparse the new attribute.
ParseFrameAttribute(this, aAttribute, allowMultiValues);
@@ -1087,8 +1086,8 @@ nsresult nsMathMLmtdFrame::AttributeChanged(int32_t aNameSpaceID,
// columnspan : here
if (aNameSpaceID == kNameSpaceID_None &&
(aAttribute == nsGkAtoms::rowalign_ ||
aAttribute == nsGkAtoms::columnalign_)) {
(aAttribute == nsGkAtoms::rowalign ||
aAttribute == nsGkAtoms::columnalign)) {
RemoveProperty(AttributeToProperty(aAttribute));
// Reparse the attribute.
@@ -1098,7 +1097,7 @@ nsresult nsMathMLmtdFrame::AttributeChanged(int32_t aNameSpaceID,
if (aNameSpaceID == kNameSpaceID_None &&
(aAttribute == nsGkAtoms::rowspan ||
aAttribute == nsGkAtoms::columnspan_)) {
aAttribute == nsGkAtoms::columnspan)) {
// nsTableCellFrame takes care of renaming columnspan to colspan.
return nsTableCellFrame::AttributeChanged(aNameSpaceID, aAttribute,
aModType);

View File

@@ -40,8 +40,8 @@ nsresult nsMathMLmunderoverFrame::AttributeChanged(int32_t aNameSpaceID,
nsAtom* aAttribute,
int32_t aModType) {
if (aNameSpaceID == kNameSpaceID_None &&
(nsGkAtoms::accent_ == aAttribute ||
nsGkAtoms::accentunder_ == aAttribute)) {
(nsGkAtoms::accent == aAttribute ||
nsGkAtoms::accentunder == aAttribute)) {
// When we have automatic data to update within ourselves, we ask our
// parent to re-layout its children
return ReLayoutChildren(GetParent());
@@ -90,7 +90,7 @@ uint8_t nsMathMLmunderoverFrame::ScriptIncrement(nsIFrame* aFrame) {
}
child = child->GetNextSibling();
if (aFrame == child) {
if (mContent->IsMathMLElement(nsGkAtoms::mover_)) {
if (mContent->IsMathMLElement(nsGkAtoms::mover)) {
return mIncrementOver ? 1 : 0;
}
return mIncrementUnder ? 1 : 0;
@@ -188,16 +188,16 @@ XXX The winner is the outermost setting in conflicting settings like these:
nsIFrame* baseFrame = mFrames.FirstChild();
if (baseFrame) {
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::munder_,
nsGkAtoms::munderover_)) {
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::munder,
nsGkAtoms::munderover)) {
underscriptFrame = baseFrame->GetNextSibling();
} else {
NS_ASSERTION(mContent->IsMathMLElement(nsGkAtoms::mover_),
NS_ASSERTION(mContent->IsMathMLElement(nsGkAtoms::mover),
"mContent->NodeInfo()->NameAtom() not recognized");
overscriptFrame = baseFrame->GetNextSibling();
}
}
if (underscriptFrame && mContent->IsMathMLElement(nsGkAtoms::munderover_)) {
if (underscriptFrame && mContent->IsMathMLElement(nsGkAtoms::munderover)) {
overscriptFrame = underscriptFrame->GetNextSibling();
}
@@ -212,8 +212,8 @@ XXX The winner is the outermost setting in conflicting settings like these:
// embellished and its core <mo> is an accent
nsEmbellishData embellishData;
nsAutoString value;
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::munder_,
nsGkAtoms::munderover_)) {
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::munder,
nsGkAtoms::munderover)) {
GetEmbellishDataFrom(underscriptFrame, embellishData);
if (NS_MATHML_EMBELLISH_IS_ACCENT(embellishData.flags)) {
mEmbellishData.flags |= NS_MATHML_EMBELLISH_ACCENTUNDER;
@@ -223,7 +223,7 @@ XXX The winner is the outermost setting in conflicting settings like these:
// if we have an accentunder attribute, it overrides what the underscript
// said
if (mContent->AsElement()->GetAttr(nsGkAtoms::accentunder_, value)) {
if (mContent->AsElement()->GetAttr(nsGkAtoms::accentunder, value)) {
if (value.LowerCaseEqualsLiteral("true")) {
mEmbellishData.flags |= NS_MATHML_EMBELLISH_ACCENTUNDER;
} else if (value.LowerCaseEqualsLiteral("false")) {
@@ -234,8 +234,8 @@ XXX The winner is the outermost setting in conflicting settings like these:
// The default value of accent is false, unless the overscript is embellished
// and its core <mo> is an accent
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::mover_,
nsGkAtoms::munderover_)) {
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::mover,
nsGkAtoms::munderover)) {
GetEmbellishDataFrom(overscriptFrame, embellishData);
if (NS_MATHML_EMBELLISH_IS_ACCENT(embellishData.flags)) {
mEmbellishData.flags |= NS_MATHML_EMBELLISH_ACCENTOVER;
@@ -244,7 +244,7 @@ XXX The winner is the outermost setting in conflicting settings like these:
}
// if we have an accent attribute, it overrides what the overscript said
if (mContent->AsElement()->GetAttr(nsGkAtoms::accent_, value)) {
if (mContent->AsElement()->GetAttr(nsGkAtoms::accent, value)) {
if (value.LowerCaseEqualsLiteral("true")) {
mEmbellishData.flags |= NS_MATHML_EMBELLISH_ACCENTOVER;
} else if (value.LowerCaseEqualsLiteral("false")) {
@@ -282,15 +282,15 @@ XXX The winner is the outermost setting in conflicting settings like these:
that math accents and \overline change uncramped styles to their
cramped counterparts.
*/
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::mover_,
nsGkAtoms::munderover_)) {
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::mover,
nsGkAtoms::munderover)) {
uint32_t compress = NS_MATHML_EMBELLISH_IS_ACCENTOVER(mEmbellishData.flags)
? NS_MATHML_COMPRESSED
: 0;
mIncrementOver = !NS_MATHML_EMBELLISH_IS_ACCENTOVER(mEmbellishData.flags) ||
subsupDisplay;
SetIncrementScriptLevel(
mContent->IsMathMLElement(nsGkAtoms::mover_) ? 1 : 2, mIncrementOver);
SetIncrementScriptLevel(mContent->IsMathMLElement(nsGkAtoms::mover) ? 1 : 2,
mIncrementOver);
if (mIncrementOver) {
PropagateFrameFlagFor(overscriptFrame, NS_FRAME_MATHML_SCRIPT_DESCENDANT);
}
@@ -300,8 +300,8 @@ XXX The winner is the outermost setting in conflicting settings like these:
The TeXBook treats 'under' like a subscript, so p.141 or Rule 13a
say it should be compressed
*/
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::munder_,
nsGkAtoms::munderover_)) {
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::munder,
nsGkAtoms::munderover)) {
mIncrementUnder =
!NS_MATHML_EMBELLISH_IS_ACCENTUNDER(mEmbellishData.flags) ||
subsupDisplay;
@@ -365,16 +365,16 @@ nsresult nsMathMLmunderoverFrame::Place(DrawTarget* aDrawTarget,
if (NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(mEmbellishData.flags) &&
StyleFont()->mMathStyle == StyleMathStyle::Compact) {
// place like sub sup or subsup
if (mContent->IsMathMLElement(nsGkAtoms::munderover_)) {
if (mContent->IsMathMLElement(nsGkAtoms::munderover)) {
return nsMathMLmmultiscriptsFrame::PlaceMultiScript(
PresContext(), aDrawTarget, aFlags, aDesiredSize, this, 0, 0,
fontSizeInflation);
} else if (mContent->IsMathMLElement(nsGkAtoms::munder_)) {
} else if (mContent->IsMathMLElement(nsGkAtoms::munder)) {
return nsMathMLmmultiscriptsFrame::PlaceMultiScript(
PresContext(), aDrawTarget, aFlags, aDesiredSize, this, 0, 0,
fontSizeInflation);
} else {
NS_ASSERTION(mContent->IsMathMLElement(nsGkAtoms::mover_),
NS_ASSERTION(mContent->IsMathMLElement(nsGkAtoms::mover),
"mContent->NodeInfo()->NameAtom() not recognized");
return nsMathMLmmultiscriptsFrame::PlaceMultiScript(
PresContext(), aDrawTarget, aFlags, aDesiredSize, this, 0, 0,
@@ -396,30 +396,30 @@ nsresult nsMathMLmunderoverFrame::Place(DrawTarget* aDrawTarget,
overSize.SetBlockStartAscent(0);
bool haveError = false;
if (baseFrame) {
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::munder_,
nsGkAtoms::munderover_)) {
if (mContent->IsAnyOfMathMLElements(nsGkAtoms::munder,
nsGkAtoms::munderover)) {
underFrame = baseFrame->GetNextSibling();
} else if (mContent->IsMathMLElement(nsGkAtoms::mover_)) {
} else if (mContent->IsMathMLElement(nsGkAtoms::mover)) {
overFrame = baseFrame->GetNextSibling();
}
}
if (underFrame && mContent->IsMathMLElement(nsGkAtoms::munderover_)) {
if (underFrame && mContent->IsMathMLElement(nsGkAtoms::munderover)) {
overFrame = underFrame->GetNextSibling();
}
if (mContent->IsMathMLElement(nsGkAtoms::munder_)) {
if (mContent->IsMathMLElement(nsGkAtoms::munder)) {
if (!baseFrame || !underFrame || underFrame->GetNextSibling()) {
// report an error, encourage people to get their markups in order
haveError = true;
}
}
if (mContent->IsMathMLElement(nsGkAtoms::mover_)) {
if (mContent->IsMathMLElement(nsGkAtoms::mover)) {
if (!baseFrame || !overFrame || overFrame->GetNextSibling()) {
// report an error, encourage people to get their markups in order
haveError = true;
}
}
if (mContent->IsMathMLElement(nsGkAtoms::munderover_)) {
if (mContent->IsMathMLElement(nsGkAtoms::munderover)) {
if (!baseFrame || !underFrame || !overFrame ||
overFrame->GetNextSibling()) {
// report an error, encourage people to get their markups in order

View File

@@ -2928,7 +2928,7 @@ void SVGTextFrame::HandleAttributeChangeInDescendant(Element* aElement,
if (aElement->IsSVGElement(nsGkAtoms::textPath)) {
if (aNameSpaceID == kNameSpaceID_None &&
(aAttribute == nsGkAtoms::startOffset ||
aAttribute == nsGkAtoms::path || aAttribute == nsGkAtoms::side_)) {
aAttribute == nsGkAtoms::path || aAttribute == nsGkAtoms::side)) {
NotifyGlyphMetricsChange(false);
} else if ((aNameSpaceID == kNameSpaceID_XLink ||
aNameSpaceID == kNameSpaceID_None) &&

View File

@@ -172,7 +172,7 @@ nsresult nsTableCellFrame::AttributeChanged(int32_t aNameSpaceID,
const nsAtom* colSpanAttribute =
MOZ_UNLIKELY(mContent->AsElement()->IsMathMLElement())
? nsGkAtoms::columnspan_
? nsGkAtoms::columnspan
: nsGkAtoms::colspan;
if (aAttribute == nsGkAtoms::rowspan || aAttribute == colSpanAttribute) {
nsLayoutUtils::PostRestyleEvent(mContent->AsElement(), RestyleHint{0},
@@ -587,7 +587,7 @@ int32_t nsTableCellFrame::GetColSpan() {
if (!Style()->IsPseudoOrAnonBox()) {
dom::Element* elem = mContent->AsElement();
const nsAttrValue* attr = elem->GetParsedAttr(
MOZ_UNLIKELY(elem->IsMathMLElement()) ? nsGkAtoms::columnspan_
MOZ_UNLIKELY(elem->IsMathMLElement()) ? nsGkAtoms::columnspan
: nsGkAtoms::colspan);
// Note that we don't need to check the tag name, because only table cells
// (including MathML <mtd>) and table headers parse the "colspan" attribute

View File

@@ -1659,266 +1659,266 @@ STATIC_ATOMS = [
Atom("repeatEvent", "repeatEvent"),
Atom("restart", "restart"),
Atom("to", "to"),
Atom("abs_", "abs"),
Atom("accent_", "accent"),
Atom("accentunder_", "accentunder"),
Atom("actiontype_", "actiontype"),
Atom("alignmentscope_", "alignmentscope"),
Atom("altimg_", "altimg"),
Atom("altimg_height_", "altimg-height"),
Atom("altimg_valign_", "altimg-valign"),
Atom("altimg_width_", "altimg-width"),
Atom("annotation_", "annotation"),
Atom("annotation_xml_", "annotation-xml"),
Atom("apply_", "apply"),
Atom("approx_", "approx"),
Atom("arccos_", "arccos"),
Atom("arccosh_", "arccosh"),
Atom("arccot_", "arccot"),
Atom("arccoth_", "arccoth"),
Atom("arccsc_", "arccsc"),
Atom("arccsch_", "arccsch"),
Atom("arcsec_", "arcsec"),
Atom("arcsech_", "arcsech"),
Atom("arcsin_", "arcsin"),
Atom("arcsinh_", "arcsinh"),
Atom("arctan_", "arctan"),
Atom("arctanh_", "arctanh"),
Atom("arg_", "arg"),
Atom("bevelled_", "bevelled"),
Atom("bind_", "bind"),
Atom("bvar_", "bvar"),
Atom("card_", "card"),
Atom("cartesianproduct_", "cartesianproduct"),
Atom("cbytes_", "cbytes"),
Atom("cd_", "cd"),
Atom("cdgroup_", "cdgroup"),
Atom("cerror_", "cerror"),
Atom("charalign_", "charalign"),
Atom("ci_", "ci"),
Atom("closure_", "closure"),
Atom("cn_", "cn"),
Atom("codomain_", "codomain"),
Atom("columnalign_", "columnalign"),
Atom("columnalignment_", "columnalignment"),
Atom("columnlines_", "columnlines"),
Atom("columnspacing_", "columnspacing"),
Atom("columnspan_", "columnspan"),
Atom("columnwidth_", "columnwidth"),
Atom("complexes_", "complexes"),
Atom("compose_", "compose"),
Atom("condition_", "condition"),
Atom("conjugate_", "conjugate"),
Atom("cos_", "cos"),
Atom("cosh_", "cosh"),
Atom("cot_", "cot"),
Atom("coth_", "coth"),
Atom("crossout_", "crossout"),
Atom("csc_", "csc"),
Atom("csch_", "csch"),
Atom("cs_", "cs"),
Atom("csymbol_", "csymbol"),
Atom("abs", "abs"),
Atom("accent", "accent"),
Atom("accentunder", "accentunder"),
Atom("actiontype", "actiontype"),
Atom("alignmentscope", "alignmentscope"),
Atom("altimg", "altimg"),
Atom("altimg_height", "altimg-height"),
Atom("altimg_valign", "altimg-valign"),
Atom("altimg_width", "altimg-width"),
Atom("annotation", "annotation"),
Atom("annotation_xml", "annotation-xml"),
Atom("apply", "apply"),
Atom("approx", "approx"),
Atom("arccos", "arccos"),
Atom("arccosh", "arccosh"),
Atom("arccot", "arccot"),
Atom("arccoth", "arccoth"),
Atom("arccsc", "arccsc"),
Atom("arccsch", "arccsch"),
Atom("arcsec", "arcsec"),
Atom("arcsech", "arcsech"),
Atom("arcsin", "arcsin"),
Atom("arcsinh", "arcsinh"),
Atom("arctan", "arctan"),
Atom("arctanh", "arctanh"),
Atom("arg", "arg"),
Atom("bevelled", "bevelled"),
Atom("bind", "bind"),
Atom("bvar", "bvar"),
Atom("card", "card"),
Atom("cartesianproduct", "cartesianproduct"),
Atom("cbytes", "cbytes"),
Atom("cd", "cd"),
Atom("cdgroup", "cdgroup"),
Atom("cerror", "cerror"),
Atom("charalign", "charalign"),
Atom("ci", "ci"),
Atom("closure", "closure"),
Atom("cn", "cn"),
Atom("codomain", "codomain"),
Atom("columnalign", "columnalign"),
Atom("columnalignment", "columnalignment"),
Atom("columnlines", "columnlines"),
Atom("columnspacing", "columnspacing"),
Atom("columnspan", "columnspan"),
Atom("columnwidth", "columnwidth"),
Atom("complexes", "complexes"),
Atom("compose", "compose"),
Atom("condition", "condition"),
Atom("conjugate", "conjugate"),
Atom("cos", "cos"),
Atom("cosh", "cosh"),
Atom("cot", "cot"),
Atom("coth", "coth"),
Atom("crossout", "crossout"),
Atom("csc", "csc"),
Atom("csch", "csch"),
Atom("cs", "cs"),
Atom("csymbol", "csymbol"),
Atom("csp", "csp"),
Atom("cspViolation", "csp-violation"),
Atom("curl_", "curl"),
Atom("decimalpoint_", "decimalpoint"),
Atom("curl", "curl"),
Atom("decimalpoint", "decimalpoint"),
Atom("definition", "definition"),
Atom("definitionURL_", "definitionURL"),
Atom("degree_", "degree"),
Atom("denomalign_", "denomalign"),
Atom("depth_", "depth"),
Atom("determinant_", "determinant"),
Atom("diff_", "diff"),
Atom("displaystyle_", "displaystyle"),
Atom("divergence_", "divergence"),
Atom("divide_", "divide"),
Atom("definitionURL", "definitionURL"),
Atom("degree", "degree"),
Atom("denomalign", "denomalign"),
Atom("depth", "depth"),
Atom("determinant", "determinant"),
Atom("diff", "diff"),
Atom("displaystyle", "displaystyle"),
Atom("divergence", "divergence"),
Atom("divide", "divide"),
Atom("dom_viewTransitions_enabled", "dom.viewTransitions.enabled"),
Atom("domain_", "domain"),
Atom("domainofapplication_", "domainofapplication"),
Atom("edge_", "edge"),
Atom("domain", "domain"),
Atom("domainofapplication", "domainofapplication"),
Atom("edge", "edge"),
Atom("el", "el"),
Atom("emptyset_", "emptyset"),
Atom("eq_", "eq"),
Atom("equalcolumns_", "equalcolumns"),
Atom("equalrows_", "equalrows"),
Atom("equivalent_", "equivalent"),
Atom("eulergamma_", "eulergamma"),
Atom("exists_", "exists"),
Atom("exp_", "exp"),
Atom("exponentiale_", "exponentiale"),
Atom("factorial_", "factorial"),
Atom("factorof_", "factorof"),
Atom("fence_", "fence"),
Atom("fn_", "fn"),
Atom("fontfamily_", "fontfamily"),
Atom("fontsize_", "fontsize"),
Atom("fontstyle_", "fontstyle"),
Atom("fontweight_", "fontweight"),
Atom("forall_", "forall"),
Atom("framespacing_", "framespacing"),
Atom("gcd_", "gcd"),
Atom("geq_", "geq"),
Atom("groupalign_", "groupalign"),
Atom("gt_", "gt"),
Atom("ident_", "ident"),
Atom("imaginaryi_", "imaginaryi"),
Atom("imaginary_", "imaginary"),
Atom("implies_", "implies"),
Atom("indentalignfirst_", "indentalignfirst"),
Atom("indentalign_", "indentalign"),
Atom("indentalignlast_", "indentalignlast"),
Atom("indentshiftfirst_", "indentshiftfirst"),
Atom("indentshift_", "indentshift"),
Atom("indenttarget_", "indenttarget"),
Atom("integers_", "integers"),
Atom("intersect_", "intersect"),
Atom("interval_", "interval"),
Atom("emptyset", "emptyset"),
Atom("eq", "eq"),
Atom("equalcolumns", "equalcolumns"),
Atom("equalrows", "equalrows"),
Atom("equivalent", "equivalent"),
Atom("eulergamma", "eulergamma"),
Atom("exists", "exists"),
Atom("exp", "exp"),
Atom("exponentiale", "exponentiale"),
Atom("factorial", "factorial"),
Atom("factorof", "factorof"),
Atom("fence", "fence"),
Atom("fn", "fn"),
Atom("fontfamily", "fontfamily"),
Atom("fontsize", "fontsize"),
Atom("fontstyle", "fontstyle"),
Atom("fontweight", "fontweight"),
Atom("forall", "forall"),
Atom("framespacing", "framespacing"),
Atom("gcd", "gcd"),
Atom("geq", "geq"),
Atom("groupalign", "groupalign"),
Atom("gt", "gt"),
Atom("ident", "ident"),
Atom("imaginaryi", "imaginaryi"),
Atom("imaginary", "imaginary"),
Atom("implies", "implies"),
Atom("indentalignfirst", "indentalignfirst"),
Atom("indentalign", "indentalign"),
Atom("indentalignlast", "indentalignlast"),
Atom("indentshiftfirst", "indentshiftfirst"),
Atom("indentshift", "indentshift"),
Atom("indenttarget", "indenttarget"),
Atom("integers", "integers"),
Atom("intersect", "intersect"),
Atom("interval", "interval"),
Atom("int_", "int"),
Atom("inverse_", "inverse"),
Atom("lambda_", "lambda"),
Atom("laplacian_", "laplacian"),
Atom("largeop_", "largeop"),
Atom("lcm_", "lcm"),
Atom("leq_", "leq"),
Atom("limit_", "limit"),
Atom("linebreak_", "linebreak"),
Atom("linebreakmultchar_", "linebreakmultchar"),
Atom("linebreakstyle_", "linebreakstyle"),
Atom("linethickness_", "linethickness"),
Atom("list_", "list"),
Atom("ln_", "ln"),
Atom("location_", "location"),
Atom("logbase_", "logbase"),
Atom("log_", "log"),
Atom("longdivstyle_", "longdivstyle"),
Atom("lowlimit_", "lowlimit"),
Atom("lquote_", "lquote"),
Atom("lspace_", "lspace"),
Atom("lt_", "lt"),
Atom("maction_", "maction"),
Atom("maligngroup_", "maligngroup"),
Atom("malignmark_", "malignmark"),
Atom("mathbackground_", "mathbackground"),
Atom("mathcolor_", "mathcolor"),
Atom("mathsize_", "mathsize"),
Atom("mathvariant_", "mathvariant"),
Atom("matrixrow_", "matrixrow"),
Atom("maxsize_", "maxsize"),
Atom("mean_", "mean"),
Atom("median_", "median"),
Atom("menclose_", "menclose"),
Atom("merror_", "merror"),
Atom("mfenced_", "mfenced"),
Atom("mfrac_", "mfrac"),
Atom("mglyph_", "mglyph"),
Atom("mi_", "mi"),
Atom("minlabelspacing_", "minlabelspacing"),
Atom("minsize_", "minsize"),
Atom("minus_", "minus"),
Atom("mlabeledtr_", "mlabeledtr"),
Atom("mlongdiv_", "mlongdiv"),
Atom("mmultiscripts_", "mmultiscripts"),
Atom("mn_", "mn"),
Atom("momentabout_", "momentabout"),
Atom("moment_", "moment"),
Atom("mo_", "mo"),
Atom("movablelimits_", "movablelimits"),
Atom("mover_", "mover"),
Atom("mpadded_", "mpadded"),
Atom("mphantom_", "mphantom"),
Atom("mprescripts_", "mprescripts"),
Atom("mroot_", "mroot"),
Atom("mrow_", "mrow"),
Atom("mscarries_", "mscarries"),
Atom("mscarry_", "mscarry"),
Atom("msgroup_", "msgroup"),
Atom("msline_", "msline"),
Atom("ms_", "ms"),
Atom("mspace_", "mspace"),
Atom("msqrt_", "msqrt"),
Atom("msrow_", "msrow"),
Atom("mstack_", "mstack"),
Atom("mstyle_", "mstyle"),
Atom("msub_", "msub"),
Atom("msubsup_", "msubsup"),
Atom("msup_", "msup"),
Atom("mtable_", "mtable"),
Atom("mtd_", "mtd"),
Atom("mtext_", "mtext"),
Atom("mtr_", "mtr"),
Atom("munder_", "munder"),
Atom("munderover_", "munderover"),
Atom("naturalnumbers_", "naturalnumbers"),
Atom("neq_", "neq"),
Atom("notanumber_", "notanumber"),
Atom("notation_", "notation"),
Atom("note_", "note"),
Atom("notin_", "notin"),
Atom("notprsubset_", "notprsubset"),
Atom("notsubset_", "notsubset"),
Atom("numalign_", "numalign"),
Atom("inverse", "inverse"),
Atom("lambda", "lambda"),
Atom("laplacian", "laplacian"),
Atom("largeop", "largeop"),
Atom("lcm", "lcm"),
Atom("leq", "leq"),
Atom("limit", "limit"),
Atom("linebreak", "linebreak"),
Atom("linebreakmultchar", "linebreakmultchar"),
Atom("linebreakstyle", "linebreakstyle"),
Atom("linethickness", "linethickness"),
Atom("list", "list"),
Atom("ln", "ln"),
Atom("location", "location"),
Atom("logbase", "logbase"),
Atom("log", "log"),
Atom("longdivstyle", "longdivstyle"),
Atom("lowlimit", "lowlimit"),
Atom("lquote", "lquote"),
Atom("lspace", "lspace"),
Atom("lt", "lt"),
Atom("maction", "maction"),
Atom("maligngroup", "maligngroup"),
Atom("malignmark", "malignmark"),
Atom("mathbackground", "mathbackground"),
Atom("mathcolor", "mathcolor"),
Atom("mathsize", "mathsize"),
Atom("mathvariant", "mathvariant"),
Atom("matrixrow", "matrixrow"),
Atom("maxsize", "maxsize"),
Atom("mean", "mean"),
Atom("median", "median"),
Atom("menclose", "menclose"),
Atom("merror", "merror"),
Atom("mfenced", "mfenced"),
Atom("mfrac", "mfrac"),
Atom("mglyph", "mglyph"),
Atom("mi", "mi"),
Atom("minlabelspacing", "minlabelspacing"),
Atom("minsize", "minsize"),
Atom("minus", "minus"),
Atom("mlabeledtr", "mlabeledtr"),
Atom("mlongdiv", "mlongdiv"),
Atom("mmultiscripts", "mmultiscripts"),
Atom("mn", "mn"),
Atom("momentabout", "momentabout"),
Atom("moment", "moment"),
Atom("mo", "mo"),
Atom("movablelimits", "movablelimits"),
Atom("mover", "mover"),
Atom("mpadded", "mpadded"),
Atom("mphantom", "mphantom"),
Atom("mprescripts", "mprescripts"),
Atom("mroot", "mroot"),
Atom("mrow", "mrow"),
Atom("mscarries", "mscarries"),
Atom("mscarry", "mscarry"),
Atom("msgroup", "msgroup"),
Atom("msline", "msline"),
Atom("ms", "ms"),
Atom("mspace", "mspace"),
Atom("msqrt", "msqrt"),
Atom("msrow", "msrow"),
Atom("mstack", "mstack"),
Atom("mstyle", "mstyle"),
Atom("msub", "msub"),
Atom("msubsup", "msubsup"),
Atom("msup", "msup"),
Atom("mtable", "mtable"),
Atom("mtd", "mtd"),
Atom("mtext", "mtext"),
Atom("mtr", "mtr"),
Atom("munder", "munder"),
Atom("munderover", "munderover"),
Atom("naturalnumbers", "naturalnumbers"),
Atom("neq", "neq"),
Atom("notanumber", "notanumber"),
Atom("notation", "notation"),
Atom("note", "note"),
Atom("notin", "notin"),
Atom("notprsubset", "notprsubset"),
Atom("notsubset", "notsubset"),
Atom("numalign", "numalign"),
Atom("other", "other"),
Atom("outerproduct_", "outerproduct"),
Atom("partialdiff_", "partialdiff"),
Atom("piece_", "piece"),
Atom("piecewise_", "piecewise"),
Atom("pi_", "pi"),
Atom("plus_", "plus"),
Atom("power_", "power"),
Atom("primes_", "primes"),
Atom("product_", "product"),
Atom("prsubset_", "prsubset"),
Atom("quotient_", "quotient"),
Atom("rationals_", "rationals"),
Atom("real_", "real"),
Atom("reals_", "reals"),
Atom("reln_", "reln"),
Atom("root_", "root"),
Atom("rowalign_", "rowalign"),
Atom("rowlines_", "rowlines"),
Atom("rowspacing_", "rowspacing"),
Atom("rquote_", "rquote"),
Atom("rspace_", "rspace"),
Atom("scalarproduct_", "scalarproduct"),
Atom("schemaLocation_", "schemaLocation"),
Atom("scriptlevel_", "scriptlevel"),
Atom("scriptminsize_", "scriptminsize"),
Atom("scriptsizemultiplier_", "scriptsizemultiplier"),
Atom("scriptsize_", "scriptsize"),
Atom("sdev_", "sdev"),
Atom("sech_", "sech"),
Atom("sec_", "sec"),
Atom("selection_", "selection"),
Atom("selector_", "selector"),
Atom("semantics_", "semantics"),
Atom("separator_", "separator"),
Atom("separators_", "separators"),
Atom("sep_", "sep"),
Atom("setdiff_", "setdiff"),
# Atom("set_", "set"), # "set" is present above
Atom("share_", "share"),
Atom("shift_", "shift"),
Atom("side_", "side"),
Atom("sinh_", "sinh"),
Atom("sin_", "sin"),
Atom("stackalign_", "stackalign"),
Atom("stretchy_", "stretchy"),
Atom("subscriptshift_", "subscriptshift"),
Atom("subset_", "subset"),
Atom("superscriptshift_", "superscriptshift"),
Atom("symmetric_", "symmetric"),
Atom("tanh_", "tanh"),
Atom("tan_", "tan"),
Atom("tendsto_", "tendsto"),
Atom("times_", "times"),
Atom("transpose_", "transpose"),
Atom("outerproduct", "outerproduct"),
Atom("partialdiff", "partialdiff"),
Atom("piece", "piece"),
Atom("piecewise", "piecewise"),
Atom("pi", "pi"),
Atom("plus", "plus"),
Atom("power", "power"),
Atom("primes", "primes"),
Atom("product", "product"),
Atom("prsubset", "prsubset"),
Atom("quotient", "quotient"),
Atom("rationals", "rationals"),
Atom("real", "real"),
Atom("reals", "reals"),
Atom("reln", "reln"),
Atom("root", "root"),
Atom("rowalign", "rowalign"),
Atom("rowlines", "rowlines"),
Atom("rowspacing", "rowspacing"),
Atom("rquote", "rquote"),
Atom("rspace", "rspace"),
Atom("scalarproduct", "scalarproduct"),
Atom("schemaLocation", "schemaLocation"),
Atom("scriptlevel", "scriptlevel"),
Atom("scriptminsize", "scriptminsize"),
Atom("scriptsizemultiplier", "scriptsizemultiplier"),
Atom("scriptsize", "scriptsize"),
Atom("sdev", "sdev"),
Atom("sech", "sech"),
Atom("sec", "sec"),
Atom("selection", "selection"),
Atom("selector", "selector"),
Atom("semantics", "semantics"),
Atom("separator", "separator"),
Atom("separators", "separators"),
Atom("sep", "sep"),
Atom("setdiff", "setdiff"),
# Atom("set", "set"), # "set" is present above
Atom("share", "share"),
Atom("shift", "shift"),
Atom("side", "side"),
Atom("sinh", "sinh"),
Atom("sin", "sin"),
Atom("stackalign", "stackalign"),
Atom("stretchy", "stretchy"),
Atom("subscriptshift", "subscriptshift"),
Atom("subset", "subset"),
Atom("superscriptshift", "superscriptshift"),
Atom("symmetric", "symmetric"),
Atom("tanh", "tanh"),
Atom("tan", "tan"),
Atom("tendsto", "tendsto"),
Atom("times", "times"),
Atom("transpose", "transpose"),
Atom("union_", "union"),
Atom("uplimit_", "uplimit"),
Atom("variance_", "variance"),
Atom("vectorproduct_", "vectorproduct"),
Atom("vector_", "vector"),
Atom("voffset_", "voffset"),
Atom("xref_", "xref"),
Atom("uplimit", "uplimit"),
Atom("variance", "variance"),
Atom("vectorproduct", "vectorproduct"),
Atom("vector", "vector"),
Atom("voffset", "voffset"),
Atom("xref", "xref"),
Atom("math", "math"), # the only one without an underscore
Atom("booleanFromString", "boolean-from-string"),
Atom("countNonEmpty", "count-non-empty"),