Bug 1451169 - Use nsStaticAtom* instead of nsStaticAtom** in Element.h. r=baku

This commit is contained in:
Nicholas Nethercote
2018-04-03 13:21:06 +10:00
parent eea84a4bb9
commit 325d491a33
56 changed files with 241 additions and 240 deletions

View File

@@ -2228,7 +2228,7 @@ Element::FindAttributeDependence(const nsAtom* aAttribute,
for (uint32_t mapindex = 0; mapindex < aMapCount; ++mapindex) {
for (const MappedAttributeEntry* map = aMaps[mapindex];
map->attribute; ++map) {
if (aAttribute == *map->attribute) {
if (aAttribute == map->attribute) {
return true;
}
}
@@ -2957,7 +2957,7 @@ Element::FindAttrValueIn(int32_t aNameSpaceID,
const nsAttrValue* val = mAttrs.GetAttr(aName, aNameSpaceID);
if (val) {
for (int32_t i = 0; aValues[i]; ++i) {
if (val->Equals(*aValues[i], aCaseSensitive)) {
if (val->Equals(aValues[i], aCaseSensitive)) {
return i;
}
}
@@ -3469,16 +3469,16 @@ nsDOMTokenListPropertyDestructor(void *aObject, nsAtom *aProperty,
NS_RELEASE(list);
}
static nsStaticAtom** sPropertiesToTraverseAndUnlink[] =
static nsStaticAtom* const sPropertiesToTraverseAndUnlink[] =
{
&nsGkAtoms::sandbox,
&nsGkAtoms::sizes,
&nsGkAtoms::dirAutoSetBy,
nsGkAtoms::sandbox,
nsGkAtoms::sizes,
nsGkAtoms::dirAutoSetBy,
nullptr
};
// static
nsStaticAtom***
nsStaticAtom* const*
Element::HTMLSVGPropertiesToTraverseAndUnlink()
{
return sPropertiesToTraverseAndUnlink;
@@ -3489,10 +3489,10 @@ Element::GetTokenList(nsAtom* aAtom,
const DOMTokenListSupportedTokenArray aSupportedTokens)
{
#ifdef DEBUG
nsStaticAtom*** props = HTMLSVGPropertiesToTraverseAndUnlink();
const nsStaticAtom* const* props = HTMLSVGPropertiesToTraverseAndUnlink();
bool found = false;
for (uint32_t i = 0; props[i]; ++i) {
if (*props[i] == aAtom) {
if (props[i] == aAtom) {
found = true;
break;
}