Bug 1445117 - Remove duplicates from nsGkAtoms. r=froydnj

In each case, the atom had an obvious name and a weird name. Where possible, I
kept the obvious name and commented out the weird name, viz:

- `mixed` over `_mixed` for "mixed"
- `el` over `el_` for "el"
- `other` over `other_` for "other"
- `remote` over `Remote` for "remote"

But for several of them I didn't do that, because the weird name is used
within the HTML5 parser -- which is a huge pain to modify because it involves
code generated by code from another repo -- so I kept the weird name and
commented out the obvious name, viz:

- `list_` over `list` for "list"
- `svgSwitch` over `_switch` for "switch"
- `set_` over `set` for "set"

MozReview-Commit-ID: Jp3CpdWXNDm

--HG--
extra : rebase_source : 421ce5316772f1951488307e81f2ceee696d363d
This commit is contained in:
Nicholas Nethercote 2018-03-14 10:27:25 +11:00
parent 7eb67f46be
commit d41188c796
11 changed files with 24 additions and 24 deletions

View File

@ -725,7 +725,7 @@ static const nsRoleMapEntry sWAIRoleMaps[] =
states::LINKED
},
{ // list
&nsGkAtoms::list,
&nsGkAtoms::list_,
roles::LIST,
kUseMapRole,
eNoValue,
@ -1064,7 +1064,7 @@ static const nsRoleMapEntry sWAIRoleMaps[] =
kNoReqStates
},
{ // switch
&nsGkAtoms::_switch,
&nsGkAtoms::svgSwitch,
roles::SWITCH,
kUseMapRole,
eNoValue,

View File

@ -90,7 +90,7 @@ aria::MapToState(EStateRule aRule, dom::Element* aElement, uint64_t* aState)
static const EnumTypeData data = {
nsGkAtoms::aria_autocomplete,
{ &nsGkAtoms::inlinevalue,
&nsGkAtoms::list,
&nsGkAtoms::list_,
&nsGkAtoms::both, nullptr },
{ states::SUPPORTS_AUTOCOMPLETION,
states::HASPOPUP | states::SUPPORTS_AUTOCOMPLETION,

View File

@ -406,7 +406,7 @@ HTMLTextFieldAccessible::NativeState()
}
// Expose autocomplete state if it has associated autocomplete list.
if (mContent->AsElement()->HasAttr(kNameSpaceID_None, nsGkAtoms::list))
if (mContent->AsElement()->HasAttr(kNameSpaceID_None, nsGkAtoms::list_))
return state | states::SUPPORTS_AUTOCOMPLETION | states::HASPOPUP;
// Ordinal XUL textboxes don't support autocomplete.

View File

@ -2033,7 +2033,7 @@ nsFrameLoader::ShouldUseRemoteProcess()
// If we're an <iframe mozbrowser> and we don't have a "remote" attribute,
// fall back to the default.
if (OwnerIsMozBrowserFrame() &&
!mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::Remote)) {
!mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::remote)) {
return Preferences::GetBool("dom.ipc.browser_frames.oop_by_default", false);
}
@ -2043,7 +2043,7 @@ nsFrameLoader::ShouldUseRemoteProcess()
return (OwnerIsMozBrowserFrame() ||
mOwnerContent->GetNameSpaceID() == kNameSpaceID_XUL) &&
mOwnerContent->AttrValueIs(kNameSpaceID_None,
nsGkAtoms::Remote,
nsGkAtoms::remote,
nsGkAtoms::_true,
eCaseMatters);
}

View File

@ -640,7 +640,7 @@ GK_ATOM(level, "level")
GK_ATOM(li, "li")
GK_ATOM(line, "line")
GK_ATOM(link, "link")
GK_ATOM(list, "list")
//GK_ATOM(list, "list") # "list" is present below
GK_ATOM(listbox, "listbox")
GK_ATOM(listboxbody, "listboxbody")
GK_ATOM(listcell, "listcell")
@ -714,7 +714,7 @@ GK_ATOM(minlength, "minlength")
GK_ATOM(minpos, "minpos")
GK_ATOM(minusSign, "minus-sign")
GK_ATOM(minwidth, "minwidth")
GK_ATOM(_mixed, "mixed")
GK_ATOM(mixed, "mixed")
GK_ATOM(messagemanagergroup, "messagemanagergroup")
GK_ATOM(mod, "mod")
GK_ATOM(mode, "mode")
@ -1319,7 +1319,7 @@ GK_ATOM(sub, "sub")
GK_ATOM(sum, "sum")
GK_ATOM(sup, "sup")
GK_ATOM(summary, "summary")
GK_ATOM(_switch, "switch")
//GK_ATOM(_switch, "switch") # "switch" is present below
GK_ATOM(systemProperty, "system-property")
GK_ATOM(tab, "tab")
GK_ATOM(tabbox, "tabbox")
@ -1669,7 +1669,7 @@ GK_ATOM(rx, "rx")
GK_ATOM(ry, "ry")
GK_ATOM(saturate, "saturate")
GK_ATOM(saturation, "saturation")
GK_ATOM(set, "set")
//GK_ATOM(set, "set") # "set" is present below
GK_ATOM(seed, "seed")
GK_ATOM(shape_rendering, "shape-rendering")
GK_ATOM(skewX, "skewX")
@ -1837,7 +1837,7 @@ GK_ATOM(divide_, "divide")
GK_ATOM(domain_, "domain")
GK_ATOM(domainofapplication_, "domainofapplication")
GK_ATOM(edge_, "edge")
GK_ATOM(el_, "el")
GK_ATOM(el, "el")
GK_ATOM(emptyset_, "emptyset")
GK_ATOM(eq_, "eq")
GK_ATOM(equalcolumns_, "equalcolumns")
@ -1958,7 +1958,7 @@ GK_ATOM(notin_, "notin")
GK_ATOM(notprsubset_, "notprsubset")
GK_ATOM(notsubset_, "notsubset")
GK_ATOM(numalign_, "numalign")
GK_ATOM(other_, "other")
GK_ATOM(other, "other")
GK_ATOM(outerproduct_, "outerproduct")
GK_ATOM(partialdiff_, "partialdiff")
GK_ATOM(piece_, "piece")
@ -2232,7 +2232,7 @@ GK_ATOM(x_tibt, "x-tibt")
GK_ATOM(az, "az")
GK_ATOM(ba, "ba")
GK_ATOM(crh, "crh")
GK_ATOM(el, "el")
//GK_ATOM(el, "el") # "el" is present above
GK_ATOM(ga, "ga")
GK_ATOM(nl, "nl")
@ -2253,7 +2253,7 @@ GK_ATOM(monospace, "monospace")
GK_ATOM(mozfixed, "-moz-fixed")
// IPC stuff
GK_ATOM(Remote, "remote")
//GK_ATOM(Remote, "remote") # "remote" is present above
GK_ATOM(RemoteId, "_remote_id")
GK_ATOM(RemoteType, "remoteType")
GK_ATOM(DisplayPort, "_displayport")
@ -2371,7 +2371,7 @@ GK_ATOM(pixels, "pixels")
GK_ATOM(lines, "lines")
GK_ATOM(pages, "pages")
GK_ATOM(scrollbars, "scrollbars")
GK_ATOM(other, "other")
//GK_ATOM(other, "other") # "other" is present above
// Scroll origins without smooth-scrolling prefs
GK_ATOM(apz, "apz")
GK_ATOM(restore, "restore")
@ -2420,7 +2420,7 @@ GK_ATOM(linkedPanel, "linkedpanel")
GK_ATOM(live, "live")
GK_ATOM(menuitemcheckbox, "menuitemcheckbox")
GK_ATOM(menuitemradio, "menuitemradio")
GK_ATOM(mixed, "mixed")
//GK_ATOM(mixed, "mixed") # "mixed" is present above
GK_ATOM(multiline, "multiline")
GK_ATOM(navigation, "navigation")
GK_ATOM(polite, "polite")

View File

@ -205,7 +205,7 @@ nsStaticAtom** const kAttributesHTML[] = {
&nsGkAtoms::kind,
&nsGkAtoms::label,
&nsGkAtoms::lang,
&nsGkAtoms::list,
&nsGkAtoms::list_,
&nsGkAtoms::longdesc,
&nsGkAtoms::loop,
&nsGkAtoms::low,
@ -659,7 +659,7 @@ nsStaticAtom** const kElementsMathML[] = {
&nsGkAtoms::divide_, // divide
&nsGkAtoms::domain_, // domain
&nsGkAtoms::domainofapplication_, // domainofapplication
&nsGkAtoms::el_, // el
&nsGkAtoms::el, // el
&nsGkAtoms::emptyset_, // emptyset
&nsGkAtoms::eq_, // eq
&nsGkAtoms::equivalent_, // equivalent
@ -892,7 +892,7 @@ nsStaticAtom** const kAttributesMathML[] = {
&nsGkAtoms::number, // number
&nsGkAtoms::open, // open
&nsGkAtoms::order, // order
&nsGkAtoms::other_, // other
&nsGkAtoms::other, // other
&nsGkAtoms::overflow, // overflow
&nsGkAtoms::position, // position
&nsGkAtoms::role, // role

View File

@ -59,7 +59,7 @@ CreateIframe(Element* aOpenerFrameElement, const nsAString& aName, bool aRemote)
aName, /* aNotify = */ false);
// Indicate whether the iframe is should be remote.
popupFrameElement->SetAttr(kNameSpaceID_None, nsGkAtoms::Remote,
popupFrameElement->SetAttr(kNameSpaceID_None, nsGkAtoms::remote,
aRemote ? NS_LITERAL_STRING("true") :
NS_LITERAL_STRING("false"),
/* aNotify = */ false);

View File

@ -1843,7 +1843,7 @@ nsGenericHTMLElement*
HTMLInputElement::GetList() const
{
nsAutoString dataListId;
GetAttr(kNameSpaceID_None, nsGkAtoms::list, dataListId);
GetAttr(kNameSpaceID_None, nsGkAtoms::list_, dataListId);
if (dataListId.IsEmpty()) {
return nullptr;
}

View File

@ -86,7 +86,7 @@ SVG_TAG(polyline, Polyline)
SVG_TAG(radialGradient, RadialGradient)
SVG_TAG(rect, Rect)
SVG_FROM_PARSER_TAG(script, Script)
SVG_TAG(set, Set)
SVG_TAG(set_, Set)
SVG_TAG(stop, Stop)
SVG_TAG(style, Style)
SVG_FROM_PARSER_TAG(svg, SVG)

View File

@ -282,7 +282,7 @@ protected:
bit = GB2312_CHARSET;
} else if (aLangGroup == nsGkAtoms::zh_tw) {
bit = CHINESEBIG5_CHARSET;
} else if (aLangGroup == nsGkAtoms::el_) {
} else if (aLangGroup == nsGkAtoms::el) {
bit = GREEK_CHARSET;
} else if (aLangGroup == nsGkAtoms::he) {
bit = HEBREW_CHARSET;

View File

@ -226,7 +226,7 @@ GetClickableAncestor(nsIFrame* aFrame, nsAtom* stopAt = nullptr, nsAutoString* a
if (content->IsHTMLElement(nsGkAtoms::iframe) &&
content->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::mozbrowser,
nsGkAtoms::_true, eIgnoreCase) &&
content->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::Remote,
content->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::remote,
nsGkAtoms::_true, eIgnoreCase)) {
return content;
}