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

View File

@@ -84,7 +84,7 @@ bool aria::MapToState(EStateRule aRule, dom::Element* aElement,
case eARIAAutoComplete: { case eARIAAutoComplete: {
static const EnumTypeData data = { static const EnumTypeData data = {
nsGkAtoms::aria_autocomplete, nsGkAtoms::aria_autocomplete,
{nsGkAtoms::inlinevalue, nsGkAtoms::list_, nsGkAtoms::both, nullptr}, {nsGkAtoms::inlinevalue, nsGkAtoms::list, nsGkAtoms::both, nullptr},
{states::SUPPORTS_AUTOCOMPLETION, {states::SUPPORTS_AUTOCOMPLETION,
states::HASPOPUP | states::SUPPORTS_AUTOCOMPLETION, states::HASPOPUP | 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 // 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 // units. This is stored as a two-element (x, y) array and is unscaled by zoom
// or resolution. // or resolution.
static constexpr nsStaticAtom* VisualViewportOffset = nsGkAtoms::voffset_; static constexpr nsStaticAtom* VisualViewportOffset = nsGkAtoms::voffset;
// AccAttributes, CacheDomain::ARIA // AccAttributes, CacheDomain::ARIA
// ARIA attributes that are exposed as object attributes; i.e. returned in // ARIA attributes that are exposed as object attributes; i.e. returned in
// Accessible::Attributes. // Accessible::Attributes.

View File

@@ -7,107 +7,107 @@
MARKUPMAP(math, New_HyperText, roles::MATHML_MATH) 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, MARKUPMAP(mo, New_HyperText, roles::MATHML_OPERATOR,
AttrFromDOM(accent_, accent_), AttrFromDOM(fence_, fence_), AttrFromDOM(accent, accent), AttrFromDOM(fence, fence),
AttrFromDOM(separator_, separator_), AttrFromDOM(largeop_, largeop_)) 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, MARKUPMAP(mfrac, New_HyperText, roles::MATHML_FRACTION,
AttrFromDOM(bevelled_, bevelled_), AttrFromDOM(bevelled, bevelled),
AttrFromDOM(linethickness_, linethickness_)) 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, MARKUPMAP(menclose, New_HyperText, roles::MATHML_ENCLOSED,
AttrFromDOM(notation_, notation_)) 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, MARKUPMAP(munder, New_HyperText, roles::MATHML_UNDER,
AttrFromDOM(accentunder_, accentunder_), AttrFromDOM(align, align)) AttrFromDOM(accentunder, accentunder), AttrFromDOM(align, align))
MARKUPMAP(mover_, New_HyperText, roles::MATHML_OVER, MARKUPMAP(mover, New_HyperText, roles::MATHML_OVER, AttrFromDOM(accent, accent),
AttrFromDOM(accent_, accent_), AttrFromDOM(align, align)) AttrFromDOM(align, align))
MARKUPMAP(munderover_, New_HyperText, roles::MATHML_UNDER_OVER, MARKUPMAP(munderover, New_HyperText, roles::MATHML_UNDER_OVER,
AttrFromDOM(accent_, accent_), AttrFromDOM(accent, accent), AttrFromDOM(accentunder, accentunder),
AttrFromDOM(accentunder_, accentunder_), AttrFromDOM(align, align)) AttrFromDOM(align, align))
MARKUPMAP(mmultiscripts_, New_HyperText, roles::MATHML_MULTISCRIPTS) MARKUPMAP(mmultiscripts, New_HyperText, roles::MATHML_MULTISCRIPTS)
MARKUPMAP( MARKUPMAP(
mtable_, mtable,
[](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* { [](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* {
return new HTMLTableAccessible(aElement, aContext->Document()); return new HTMLTableAccessible(aElement, aContext->Document());
}, },
roles::MATHML_TABLE, AttrFromDOM(align, align), roles::MATHML_TABLE, AttrFromDOM(align, align),
AttrFromDOM(columnlines_, columnlines_), AttrFromDOM(rowlines_, rowlines_)) AttrFromDOM(columnlines, columnlines), AttrFromDOM(rowlines, rowlines))
MARKUPMAP( MARKUPMAP(
mlabeledtr_, mlabeledtr,
[](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* { [](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* {
return new HTMLTableRowAccessible(aElement, aContext->Document()); return new HTMLTableRowAccessible(aElement, aContext->Document());
}, },
roles::MATHML_LABELED_ROW) roles::MATHML_LABELED_ROW)
MARKUPMAP( MARKUPMAP(
mtr_, mtr,
[](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* { [](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* {
return new HTMLTableRowAccessible(aElement, aContext->Document()); return new HTMLTableRowAccessible(aElement, aContext->Document());
}, },
roles::MATHML_TABLE_ROW) roles::MATHML_TABLE_ROW)
MARKUPMAP( MARKUPMAP(
mtd_, mtd,
[](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* { [](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* {
return new HTMLTableCellAccessible(aElement, aContext->Document()); return new HTMLTableCellAccessible(aElement, aContext->Document());
}, },
0) 0)
MARKUPMAP(maction_, New_HyperText, roles::MATHML_ACTION, MARKUPMAP(maction, New_HyperText, roles::MATHML_ACTION,
AttrFromDOM(actiontype_, actiontype_), AttrFromDOM(actiontype, actiontype),
AttrFromDOM(selection_, selection_)) AttrFromDOM(selection, selection))
MARKUPMAP(merror_, New_HyperText, roles::MATHML_ERROR) MARKUPMAP(merror, New_HyperText, roles::MATHML_ERROR)
MARKUPMAP(mstack_, New_HyperText, roles::MATHML_STACK, MARKUPMAP(mstack, New_HyperText, roles::MATHML_STACK, AttrFromDOM(align, align),
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,
AttrFromDOM(position, position)) AttrFromDOM(position, position))
MARKUPMAP(mscarries_, New_HyperText, roles::MATHML_STACK_CARRIES, MARKUPMAP(mlongdiv, New_HyperText, roles::MATHML_LONG_DIVISION,
AttrFromDOM(location_, location_), AttrFromDOM(position, position)) AttrFromDOM(longdivstyle, longdivstyle))
MARKUPMAP(mscarry_, New_HyperText, roles::MATHML_STACK_CARRY, MARKUPMAP(msgroup, New_HyperText, roles::MATHML_STACK_GROUP,
AttrFromDOM(crossout_, crossout_)) 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)) AttrFromDOM(position, position))

View File

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

View File

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

View File

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

View File

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

View File

@@ -54,7 +54,7 @@ void HTMLFormAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
for (uint32_t i = 0; i < length; i++) { for (uint32_t i = 0; i < length; i++) {
if (LocalAccessible* acc = mDoc->GetAccessible(controls->Item(i))) { if (LocalAccessible* acc = mDoc->GetAccessible(controls->Item(i))) {
if (acc->IsTextField() && !acc->IsPassword()) { if (acc->IsTextField() && !acc->IsPassword()) {
if (!acc->Elm()->HasAttr(nsGkAtoms::list_) && if (!acc->Elm()->HasAttr(nsGkAtoms::list) &&
!acc->Elm()->AttrValueIs(kNameSpaceID_None, !acc->Elm()->AttrValueIs(kNameSpaceID_None,
nsGkAtoms::autocomplete, nsGkAtoms::OFF, nsGkAtoms::autocomplete, nsGkAtoms::OFF,
eIgnoreCase)) { eIgnoreCase)) {
@@ -290,7 +290,7 @@ role HTMLTextFieldAccessible::NativeRole() const {
return roles::PASSWORD_TEXT; return roles::PASSWORD_TEXT;
} }
dom::Element* el = mContent->AsElement(); dom::Element* el = mContent->AsElement();
if (el->HasAttr(nsGkAtoms::list_)) { if (el->HasAttr(nsGkAtoms::list)) {
return roles::EDITCOMBOBOX; return roles::EDITCOMBOBOX;
} }
if (const nsAttrValue* attr = el->GetParsedAttr(nsGkAtoms::type)) { if (const nsAttrValue* attr = el->GetParsedAttr(nsGkAtoms::type)) {
@@ -367,7 +367,7 @@ void HTMLTextFieldAccessible::Value(nsString& aValue) const {
} }
bool HTMLTextFieldAccessible::AttributeChangesState(nsAtom* aAttribute) { bool HTMLTextFieldAccessible::AttributeChangesState(nsAtom* aAttribute) {
if (aAttribute == nsGkAtoms::readonly || aAttribute == nsGkAtoms::list_ || if (aAttribute == nsGkAtoms::readonly || aAttribute == nsGkAtoms::list ||
aAttribute == nsGkAtoms::autocomplete) { aAttribute == nsGkAtoms::autocomplete) {
return true; return true;
} }
@@ -409,7 +409,7 @@ uint64_t HTMLTextFieldAccessible::NativeState() const {
} }
// Expose autocomplete state if it has associated autocomplete list. // 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; 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 // 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 // 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. // 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::MATHML_CELL;
} }
return roles::CELL; return roles::CELL;
@@ -369,7 +369,7 @@ void HTMLTableAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
already_AddRefed<AccAttributes> HTMLTableAccessible::NativeAttributes() { already_AddRefed<AccAttributes> HTMLTableAccessible::NativeAttributes() {
RefPtr<AccAttributes> attributes = AccessibleWrap::NativeAttributes(); RefPtr<AccAttributes> attributes = AccessibleWrap::NativeAttributes();
if (mContent->IsMathMLElement(nsGkAtoms::mtable_)) { if (mContent->IsMathMLElement(nsGkAtoms::mtable)) {
GetAccService()->MarkupAttributes(this, attributes); GetAccService()->MarkupAttributes(this, attributes);
} }
@@ -440,7 +440,9 @@ bool HTMLTableAccessible::IsProbablyLayoutTable() {
} }
#else #else
# define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \ # define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \
{ return isLayout; } { \
return isLayout; \
}
#endif #endif
MOZ_ASSERT(!IsDefunct(), "Table accessible should not be defunct"); MOZ_ASSERT(!IsDefunct(), "Table accessible should not be defunct");
@@ -457,7 +459,7 @@ bool HTMLTableAccessible::IsProbablyLayoutTable() {
} }
dom::Element* el = Elm(); dom::Element* el = Elm();
if (el->IsMathMLElement(nsGkAtoms::mtable_)) { if (el->IsMathMLElement(nsGkAtoms::mtable)) {
RETURN_LAYOUT_ANSWER(false, "MathML matrix"); 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 // Per the MathML 3 spec, the latter happens iff the linethickness
// attribute is of the form [zero-float][optional-unit]. In that case we // 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. // set line thickness to zero and in the other cases we set it to one.
if (NSString* thickness = if (NSString* thickness = utils::GetAccAttr(self, nsGkAtoms::linethickness)) {
utils::GetAccAttr(self, nsGkAtoms::linethickness_)) {
NSNumberFormatter* formatter = NSNumberFormatter* formatter =
[[[NSNumberFormatter alloc] init] autorelease]; [[[NSNumberFormatter alloc] init] autorelease];
NSNumber* value = [formatter numberFromString:thickness]; 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. // and are instructed by the ARIA map to use the native host role.
roleAtom = [self ARIARole]; roleAtom = [self ARIARole];
if (roleAtom == nsGkAtoms::log_) { if (roleAtom == nsGkAtoms::log) {
return @"AXApplicationLog"; return @"AXApplicationLog";
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -5472,7 +5472,7 @@ already_AddRefed<Element> ScrollContainerFrame::MakeScrollbar(
if (mIsRoot) { if (mIsRoot) {
e->SetProperty(nsGkAtoms::docLevelNativeAnonymousContent, e->SetProperty(nsGkAtoms::docLevelNativeAnonymousContent,
reinterpret_cast<void*>(true)); 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. // Don't bother making style caching take [root="true"] styles into account.
aKey = AnonymousContentKey::None; aKey = AnonymousContentKey::None;
@@ -5632,7 +5632,7 @@ nsresult ScrollContainerFrame::CreateAnonymousContent(
mScrollCornerContent->SetProperty( mScrollCornerContent->SetProperty(
nsGkAtoms::docLevelNativeAnonymousContent, nsGkAtoms::docLevelNativeAnonymousContent,
reinterpret_cast<void*>(true)); reinterpret_cast<void*>(true));
mScrollCornerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::root_, mScrollCornerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::root,
u"true"_ns, false); u"true"_ns, false);
// Don't bother making style caching take [root="true"] styles into // 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)) { if (mLineContainer->HasAnyStateBits(TEXT_IS_IN_TOKEN_MATHML)) {
// All MathML tokens except <mtext> use 'math' script. // All MathML tokens except <mtext> use 'math' script.
if (!(parent && parent->GetContent() && if (!(parent && parent->GetContent() &&
parent->GetContent()->IsMathMLElement(nsGkAtoms::mtext_))) { parent->GetContent()->IsMathMLElement(nsGkAtoms::mtext))) {
flags |= gfx::ShapedTextFlags::TEXT_USE_MATH_SCRIPT; flags |= gfx::ShapedTextFlags::TEXT_USE_MATH_SCRIPT;
} }
nsIMathMLFrame* mathFrame = do_QueryFrame(parent); nsIMathMLFrame* mathFrame = do_QueryFrame(parent);

View File

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

View File

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

View File

@@ -35,7 +35,7 @@ nsMathMLTokenFrame::InheritAutomaticData(nsIFrame* aParent) {
eMathMLFrameType nsMathMLTokenFrame::GetMathMLFrameType() { eMathMLFrameType nsMathMLTokenFrame::GetMathMLFrameType() {
// treat everything other than <mi> as ordinary... // treat everything other than <mi> as ordinary...
if (!mContent->IsMathMLElement(nsGkAtoms::mi_)) { if (!mContent->IsMathMLElement(nsGkAtoms::mi)) {
return eMathMLFrameType_Ordinary; 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; nsAutoString data;
nsContentUtils::GetNodeTextContent(mContent, false, data); nsContentUtils::GetNodeTextContent(mContent, false, data);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -45,7 +45,7 @@ void nsMathMLmrootFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
} }
bool nsMathMLmrootFrame::ShouldUseRowFallback() { bool nsMathMLmrootFrame::ShouldUseRowFallback() {
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot_); bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot);
if (!isRootWithIndex) { if (!isRootWithIndex) {
return false; return false;
} }
@@ -59,7 +59,7 @@ bool nsMathMLmrootFrame::ShouldUseRowFallback() {
} }
bool nsMathMLmrootFrame::IsMrowLike() { bool nsMathMLmrootFrame::IsMrowLike() {
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot_); bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot);
if (isRootWithIndex) { if (isRootWithIndex) {
return false; return false;
} }
@@ -70,7 +70,7 @@ NS_IMETHODIMP
nsMathMLmrootFrame::InheritAutomaticData(nsIFrame* aParent) { nsMathMLmrootFrame::InheritAutomaticData(nsIFrame* aParent) {
nsMathMLContainerFrame::InheritAutomaticData(aParent); nsMathMLContainerFrame::InheritAutomaticData(aParent);
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot_); bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot);
if (!isRootWithIndex) { if (!isRootWithIndex) {
mPresentationData.flags |= NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY; mPresentationData.flags |= NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY;
} }
@@ -80,7 +80,7 @@ nsMathMLmrootFrame::InheritAutomaticData(nsIFrame* aParent) {
NS_IMETHODIMP NS_IMETHODIMP
nsMathMLmrootFrame::TransmitAutomaticData() { nsMathMLmrootFrame::TransmitAutomaticData() {
bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot_); bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot);
if (isRootWithIndex) { if (isRootWithIndex) {
// 1. The REC says: // 1. The REC says:
// The <mroot> element increments scriptlevel by 2, and sets displaystyle // The <mroot> element increments scriptlevel by 2, and sets displaystyle
@@ -170,7 +170,7 @@ nsresult nsMathMLmrootFrame::Place(DrawTarget* aDrawTarget,
return PlaceAsMrow(aDrawTarget, aFlags, aDesiredSize); return PlaceAsMrow(aDrawTarget, aFlags, aDesiredSize);
} }
const bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot_); const bool isRootWithIndex = GetContent()->IsMathMLElement(nsGkAtoms::mroot);
nsBoundingMetrics bmSqr, bmBase, bmIndex; nsBoundingMetrics bmSqr, bmBase, bmIndex;
nsIFrame *baseFrame = nullptr, *indexFrame = nullptr; nsIFrame *baseFrame = nullptr, *indexFrame = nullptr;
nsMargin baseMargin, indexMargin; 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 // Special for <mtable>: In the frame construction code, we also use
// this frame class as a wrapper for mtable. Hence, we should pass the // this frame class as a wrapper for mtable. Hence, we should pass the
// notification to the real mtable // notification to the real mtable
if (mContent->IsMathMLElement(nsGkAtoms::mtable_)) { if (mContent->IsMathMLElement(nsGkAtoms::mtable)) {
nsIFrame* frame = mFrames.FirstChild(); nsIFrame* frame = mFrames.FirstChild();
for (; frame; frame = frame->PrincipalChildList().FirstChild()) { for (; frame; frame = frame->PrincipalChildList().FirstChild()) {
// drill down to the real mtable // drill down to the real mtable

View File

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

View File

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

View File

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

View File

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

View File

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