--- a/accessible/base/ARIAStateMap.cpp
+++ b/accessible/base/ARIAStateMap.cpp
@@ -19,17 +19,17 @@ using namespace mozilla::a11y::aria;
*/
struct EnumTypeData
{
// ARIA attribute name.
nsStaticAtom* const mAttrName;
// States if the attribute value is matched to the enum value. Used as
// Element::AttrValuesArray, last item must be nullptr.
- nsStaticAtom* const* const mValues[4];
+ nsStaticAtom* const mValues[4];
// States applied if corresponding enum values are matched.
const uint64_t mStates[3];
// States to clear in case of match.
const uint64_t mClearState;
};
@@ -84,34 +84,34 @@ static void MapTokenType(dom::Element* a
bool
aria::MapToState(EStateRule aRule, dom::Element* aElement, uint64_t* aState)
{
switch (aRule) {
case eARIAAutoComplete:
{
static const EnumTypeData data = {
nsGkAtoms::aria_autocomplete,
- { &nsGkAtoms::inlinevalue,
- &nsGkAtoms::list_,
- &nsGkAtoms::both, nullptr },
+ { nsGkAtoms::inlinevalue,
+ nsGkAtoms::list_,
+ nsGkAtoms::both, nullptr },
{ states::SUPPORTS_AUTOCOMPLETION,
states::HASPOPUP | states::SUPPORTS_AUTOCOMPLETION,
states::HASPOPUP | states::SUPPORTS_AUTOCOMPLETION }, 0
};
MapEnumType(aElement, aState, data);
return true;
}
case eARIABusy:
{
static const EnumTypeData data = {
nsGkAtoms::aria_busy,
- { &nsGkAtoms::_true,
- &nsGkAtoms::error, nullptr },
+ { nsGkAtoms::_true,
+ nsGkAtoms::error, nullptr },
{ states::BUSY,
states::INVALID }, 0
};
MapEnumType(aElement, aState, data);
return true;
}
@@ -224,18 +224,18 @@ aria::MapToState(EStateRule aRule, dom::
MapTokenType(aElement, aState, data);
return true;
}
case eARIAOrientation:
{
static const EnumTypeData data = {
nsGkAtoms::aria_orientation,
- { &nsGkAtoms::horizontal,
- &nsGkAtoms::vertical, nullptr },
+ { nsGkAtoms::horizontal,
+ nsGkAtoms::vertical, nullptr },
{ states::HORIZONTAL,
states::VERTICAL },
states::HORIZONTAL | states::VERTICAL
};
MapEnumType(aElement, aState, data);
return true;
}
--- a/accessible/base/TextAttrs.cpp
+++ b/accessible/base/TextAttrs.cpp
@@ -297,17 +297,17 @@ TextAttrsMgr::InvalidTextAttr::
bool
TextAttrsMgr::InvalidTextAttr::
GetValue(nsIContent* aElm, uint32_t* aValue)
{
nsIContent* elm = aElm;
do {
if (nsAccUtils::HasDefinedARIAToken(elm, nsGkAtoms::aria_invalid)) {
static Element::AttrValuesArray tokens[] =
- { &nsGkAtoms::_false, &nsGkAtoms::grammar, &nsGkAtoms::spelling,
+ { nsGkAtoms::_false, nsGkAtoms::grammar, nsGkAtoms::spelling,
nullptr };
int32_t idx = elm->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::aria_invalid,
tokens, eCaseMatters);
switch (idx) {
case 0:
*aValue = eFalse;
--- a/accessible/base/XULMap.h
+++ b/accessible/base/XULMap.h
@@ -115,17 +115,17 @@ XULMAP(
return CreateMenupopupAccessible(aContent, aContext);
}
)
XULMAP(
panel,
[](nsIContent* aContent, Accessible* aContext) -> Accessible* {
static const Element::AttrValuesArray sIgnoreTypeVals[] =
- { &nsGkAtoms::autocomplete_richlistbox, &nsGkAtoms::autocomplete, nullptr };
+ { nsGkAtoms::autocomplete_richlistbox, nsGkAtoms::autocomplete, nullptr };
if (!aContent->IsElement() ||
aContent->AsElement()->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::type,
sIgnoreTypeVals, eIgnoreCase) >= 0) {
return nullptr;
}
if (aContent->AsElement()->AttrValueIs(kNameSpaceID_None,
--- a/accessible/base/nsAccUtils.cpp
+++ b/accessible/base/nsAccUtils.cpp
@@ -203,30 +203,29 @@ nsAccUtils::HasDefinedARIAToken(nsIConte
eCaseMatters) ||
element->AttrValueIs(kNameSpaceID_None, aAtom, nsGkAtoms::_undefined,
eCaseMatters)) {
return false;
}
return true;
}
-nsAtom*
+nsStaticAtom*
nsAccUtils::GetARIAToken(dom::Element* aElement, nsAtom* aAttr)
{
if (!HasDefinedARIAToken(aElement, aAttr))
return nsGkAtoms::_empty;
static Element::AttrValuesArray tokens[] =
- { &nsGkAtoms::_false, &nsGkAtoms::_true,
- &nsGkAtoms::mixed, nullptr};
+ { nsGkAtoms::_false, nsGkAtoms::_true, nsGkAtoms::mixed, nullptr};
int32_t idx = aElement->FindAttrValueIn(kNameSpaceID_None,
aAttr, tokens, eCaseMatters);
if (idx >= 0)
- return *(tokens[idx]);
+ return tokens[idx];
return nullptr;
}
Accessible*
nsAccUtils::GetSelectableContainer(Accessible* aAccessible, uint64_t aState)
{
if (!aAccessible)
--- a/accessible/base/nsAccUtils.h
+++ b/accessible/base/nsAccUtils.h
@@ -96,17 +96,18 @@ public:
*
* Return true if the ARIA property is defined, otherwise false
*/
static bool HasDefinedARIAToken(nsIContent *aContent, nsAtom *aAtom);
/**
* Return atomic value of ARIA attribute of boolean or NMTOKEN type.
*/
- static nsAtom* GetARIAToken(mozilla::dom::Element* aElement, nsAtom* aAttr);
+ static nsStaticAtom* GetARIAToken(mozilla::dom::Element* aElement,
+ nsAtom* aAttr);
/**
* Return document accessible for the given DOM node.
*/
static DocAccessible* GetDocAccessibleFor(nsINode* aNode)
{
nsIPresShell *presShell = nsCoreUtils::GetPresShellFor(aNode);
return GetAccService()->GetDocAccessible(presShell);
--- a/accessible/html/HTMLTableAccessible.cpp
+++ b/accessible/html/HTMLTableAccessible.cpp
@@ -306,18 +306,18 @@ HTMLTableHeaderCellAccessible::
////////////////////////////////////////////////////////////////////////////////
// HTMLTableHeaderCellAccessible: Accessible implementation
role
HTMLTableHeaderCellAccessible::NativeRole()
{
// Check value of @scope attribute.
static Element::AttrValuesArray scopeValues[] =
- { &nsGkAtoms::col, &nsGkAtoms::colgroup,
- &nsGkAtoms::row, &nsGkAtoms::rowgroup, nullptr };
+ { nsGkAtoms::col, nsGkAtoms::colgroup,
+ nsGkAtoms::row, nsGkAtoms::rowgroup, nullptr };
int32_t valueIdx =
mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::scope,
scopeValues, eCaseMatters);
switch (valueIdx) {
case 0:
case 1:
return roles::COLUMNHEADER;
--- a/accessible/xul/XULFormControlAccessible.cpp
+++ b/accessible/xul/XULFormControlAccessible.cpp
@@ -188,17 +188,17 @@ XULButtonAccessible::IsAcceptableChild(n
////////////////////////////////////////////////////////////////////////////////
// XULButtonAccessible protected
bool
XULButtonAccessible::ContainsMenu() const
{
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::menu, &nsGkAtoms::menuButton, nullptr};
+ {nsGkAtoms::menu, nsGkAtoms::menuButton, nullptr};
return mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::type,
strings, eCaseMatters) >= 0;
}
////////////////////////////////////////////////////////////////////////////////
// XULDropmarkerAccessible
--- a/accessible/xul/XULMenuAccessible.cpp
+++ b/accessible/xul/XULMenuAccessible.cpp
@@ -55,17 +55,17 @@ XULMenuitemAccessible::NativeState()
if (mContent->AsElement()->HasAttr(kNameSpaceID_None, nsGkAtoms::open))
state |= states::EXPANDED;
else
state |= states::COLLAPSED;
}
// Checkable/checked?
static Element::AttrValuesArray strings[] =
- { &nsGkAtoms::radio, &nsGkAtoms::checkbox, nullptr };
+ { nsGkAtoms::radio, nsGkAtoms::checkbox, nullptr };
if (mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::type,
strings, eCaseMatters) >= 0) {
// Checkable?
state |= states::CHECKABLE;
// Checked?
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -2165,17 +2165,17 @@ Element::GetAttributeChangeHint(const ns
bool
Element::FindAttributeDependence(const nsAtom* aAttribute,
const MappedAttributeEntry* const aMaps[],
uint32_t aMapCount)
{
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;
}
}
}
return false;
}
@@ -2907,17 +2907,17 @@ Element::FindAttrValueIn(int32_t aNameSp
{
NS_ASSERTION(aName, "Must have attr name");
NS_ASSERTION(aNameSpaceID != kNameSpaceID_Unknown, "Must have namespace");
NS_ASSERTION(aValues, "Null value array");
const nsAttrValue* val = mAttrsAndChildren.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;
}
}
return ATTR_VALUE_NO_MATCH;
}
return ATTR_MISSING;
}
@@ -3422,40 +3422,40 @@ static void
nsDOMTokenListPropertyDestructor(void *aObject, nsAtom *aProperty,
void *aPropertyValue, void *aData)
{
nsDOMTokenList* list =
static_cast<nsDOMTokenList*>(aPropertyValue);
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;
}
nsDOMTokenList*
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;
}
}
MOZ_ASSERT(found, "Trying to use an unknown tokenlist!");
#endif
nsDOMTokenList* list = nullptr;
--- a/dom/base/Element.h
+++ b/dom/base/Element.h
@@ -785,17 +785,17 @@ public:
* be kNameSpaceID_Unknown.
* @param aName The name atom of the attribute. Must not be null.
* @param aValues a nullptr-terminated array of pointers to atom values to test
* against.
* @param aCaseSensitive Whether to do a case-sensitive compare on the values.
* @return ATTR_MISSING, ATTR_VALUE_NO_MATCH or the non-negative index
* indicating the first value of aValues that matched
*/
- typedef nsStaticAtom* const* const AttrValuesArray;
+ typedef nsStaticAtom* const AttrValuesArray;
int32_t FindAttrValueIn(int32_t aNameSpaceID,
nsAtom* aName,
AttrValuesArray* aValues,
nsCaseTreatment aCaseSensitive) const;
/**
* Set attribute values. All attribute values are assumed to have a
* canonical string representation that can be used for these
@@ -946,34 +946,34 @@ public:
* describing the element.
*/
void Describe(nsAString& aOutDescription) const;
/*
* Attribute Mapping Helpers
*/
struct MappedAttributeEntry {
- nsStaticAtom** attribute;
+ const nsStaticAtom* const attribute;
};
/**
* A common method where you can just pass in a list of maps to check
* for attribute dependence. Most implementations of
* IsAttributeMapped should use this function as a default
* handler.
*/
template<size_t N>
static bool
FindAttributeDependence(const nsAtom* aAttribute,
const MappedAttributeEntry* const (&aMaps)[N])
{
return FindAttributeDependence(aAttribute, aMaps, N);
}
- static nsStaticAtom*** HTMLSVGPropertiesToTraverseAndUnlink();
+ static nsStaticAtom* const* HTMLSVGPropertiesToTraverseAndUnlink();
private:
void DescribeAttribute(uint32_t index, nsAString& aOutDescription) const;
static bool
FindAttributeDependence(const nsAtom* aAttribute,
const MappedAttributeEntry* const aMaps[],
uint32_t aMapCount);
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -1464,19 +1464,20 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Fr
if (tmp->HasProperties()) {
if (tmp->IsElement()) {
Element* elem = tmp->AsElement();
elem->UnlinkIntersectionObservers();
}
if (tmp->IsHTMLElement() || tmp->IsSVGElement()) {
- nsStaticAtom*** props = Element::HTMLSVGPropertiesToTraverseAndUnlink();
+ nsStaticAtom* const* props =
+ Element::HTMLSVGPropertiesToTraverseAndUnlink();
for (uint32_t i = 0; props[i]; ++i) {
- tmp->DeleteProperty(*props[i]);
+ tmp->DeleteProperty(props[i]);
}
if (tmp->MayHaveAnimations()) {
nsAtom** effectProps = EffectSet::GetEffectSetPropertyAtoms();
for (uint32_t i = 0; effectProps[i]; ++i) {
tmp->DeleteProperty(effectProps[i]);
}
}
}
@@ -2029,20 +2030,21 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
if (observers) {
for (auto iter = observers->Iter(); !iter.Done(); iter.Next()) {
DOMIntersectionObserver* observer = iter.Key();
cb.NoteXPCOMChild(observer);
}
}
}
if (tmp->IsHTMLElement() || tmp->IsSVGElement()) {
- nsStaticAtom*** props = Element::HTMLSVGPropertiesToTraverseAndUnlink();
+ nsStaticAtom* const* props =
+ Element::HTMLSVGPropertiesToTraverseAndUnlink();
for (uint32_t i = 0; props[i]; ++i) {
nsISupports* property =
- static_cast<nsISupports*>(tmp->GetProperty(*props[i]));
+ static_cast<nsISupports*>(tmp->GetProperty(props[i]));
cb.NoteXPCOMChild(property);
}
if (tmp->MayHaveAnimations()) {
nsAtom** effectProps = EffectSet::GetEffectSetPropertyAtoms();
for (uint32_t i = 0; effectProps[i]; ++i) {
EffectSet* effectSet =
static_cast<EffectSet*>(tmp->GetProperty(effectProps[i]));
if (effectSet) {
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -4654,17 +4654,17 @@ nsContentUtils::UnregisterShutdownObserv
}
/* static */
bool
nsContentUtils::HasNonEmptyAttr(const nsIContent* aContent,
int32_t aNameSpaceID,
nsAtom* aName)
{
- static Element::AttrValuesArray strings[] = {&nsGkAtoms::_empty, nullptr};
+ static Element::AttrValuesArray strings[] = {nsGkAtoms::_empty, nullptr};
return aContent->IsElement() &&
aContent->AsElement()->FindAttrValueIn(aNameSpaceID, aName, strings, eCaseMatters)
== Element::ATTR_VALUE_NO_MATCH;
}
/* static */
bool
nsContentUtils::HasMutationListeners(nsINode* aNode,
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -2958,17 +2958,17 @@ EventStateManager::DecideGestureEvent(Wi
#ifdef XP_MACOSX
static bool
NodeAllowsClickThrough(nsINode* aNode)
{
while (aNode) {
if (aNode->IsXULElement()) {
mozilla::dom::Element* element = aNode->AsElement();
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::always, &nsGkAtoms::never, nullptr};
+ {nsGkAtoms::always, nsGkAtoms::never, nullptr};
switch (element->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::clickthrough,
strings, eCaseMatters)) {
case 0:
return true;
case 1:
return false;
}
}
--- a/dom/html/HTMLBRElement.cpp
+++ b/dom/html/HTMLBRElement.cpp
@@ -62,17 +62,17 @@ HTMLBRElement::MapAttributesIntoRule(con
}
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLBRElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::clear },
+ { nsGkAtoms::clear },
{ nullptr }
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
};
--- a/dom/html/HTMLBodyElement.cpp
+++ b/dom/html/HTMLBodyElement.cpp
@@ -227,26 +227,26 @@ HTMLBodyElement::GetAttributeMappingFunc
{
return &MapAttributesIntoRule;
}
NS_IMETHODIMP_(bool)
HTMLBodyElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::link },
- { &nsGkAtoms::vlink },
- { &nsGkAtoms::alink },
- { &nsGkAtoms::text },
- { &nsGkAtoms::marginwidth },
- { &nsGkAtoms::marginheight },
- { &nsGkAtoms::topmargin },
- { &nsGkAtoms::rightmargin },
- { &nsGkAtoms::bottommargin },
- { &nsGkAtoms::leftmargin },
+ { nsGkAtoms::link },
+ { nsGkAtoms::vlink },
+ { nsGkAtoms::alink },
+ { nsGkAtoms::text },
+ { nsGkAtoms::marginwidth },
+ { nsGkAtoms::marginheight },
+ { nsGkAtoms::topmargin },
+ { nsGkAtoms::rightmargin },
+ { nsGkAtoms::bottommargin },
+ { nsGkAtoms::leftmargin },
{ nullptr },
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
sBackgroundAttributeMap,
};
--- a/dom/html/HTMLFontElement.cpp
+++ b/dom/html/HTMLFontElement.cpp
@@ -93,19 +93,19 @@ HTMLFontElement::MapAttributesIntoRule(c
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLFontElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::face },
- { &nsGkAtoms::size },
- { &nsGkAtoms::color },
+ { nsGkAtoms::face },
+ { nsGkAtoms::size },
+ { nsGkAtoms::color },
{ nullptr }
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
};
--- a/dom/html/HTMLHRElement.cpp
+++ b/dom/html/HTMLHRElement.cpp
@@ -166,21 +166,21 @@ HTMLHRElement::MapAttributesIntoRule(con
nsGenericHTMLElement::MapWidthAttributeInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLHRElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::align },
- { &nsGkAtoms::width },
- { &nsGkAtoms::size },
- { &nsGkAtoms::color },
- { &nsGkAtoms::noshade },
+ { nsGkAtoms::align },
+ { nsGkAtoms::width },
+ { nsGkAtoms::size },
+ { nsGkAtoms::color },
+ { nsGkAtoms::noshade },
{ nullptr },
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
};
--- a/dom/html/HTMLIFrameElement.cpp
+++ b/dom/html/HTMLIFrameElement.cpp
@@ -104,19 +104,19 @@ HTMLIFrameElement::MapAttributesIntoRule
nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLIFrameElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::width },
- { &nsGkAtoms::height },
- { &nsGkAtoms::frameborder },
+ { nsGkAtoms::width },
+ { nsGkAtoms::height },
+ { nsGkAtoms::frameborder },
{ nullptr },
};
static const MappedAttributeEntry* const map[] = {
attributes,
sImageAlignAttributeMap,
sCommonAttributeMap,
};
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -5814,18 +5814,18 @@ HTMLInputElement::GetAttributeChangeHint
}
return retval;
}
NS_IMETHODIMP_(bool)
HTMLInputElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::align },
- { &nsGkAtoms::type },
+ { nsGkAtoms::align },
+ { nsGkAtoms::type },
{ nullptr },
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
sImageMarginSizeAttributeMap,
sImageBorderAttributeMap,
--- a/dom/html/HTMLLIElement.cpp
+++ b/dom/html/HTMLLIElement.cpp
@@ -78,17 +78,17 @@ HTMLLIElement::MapAttributesIntoRule(con
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLLIElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::type },
+ { nsGkAtoms::type },
{ nullptr },
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
};
--- a/dom/html/HTMLLinkElement.cpp
+++ b/dom/html/HTMLLinkElement.cpp
@@ -230,17 +230,17 @@ HTMLLinkElement::CreateAndDispatchEvent(
// In the unlikely case that both rev is specified *and* rel=stylesheet,
// this code will cause the event to fire, on the principle that maybe the
// page really does want to specify that its author is a stylesheet. Since
// this should never actually happen and the performance hit is minimal,
// doing the "right" thing costs virtually nothing here, even if it doesn't
// make much sense.
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::_empty, &nsGkAtoms::stylesheet, nullptr};
+ {nsGkAtoms::_empty, nsGkAtoms::stylesheet, nullptr};
if (!nsContentUtils::HasNonEmptyAttr(this, kNameSpaceID_None,
nsGkAtoms::rev) &&
FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::rel,
strings, eIgnoreCase) != ATTR_VALUE_NO_MATCH)
return;
RefPtr<AsyncEventDispatcher> asyncDispatcher =
--- a/dom/html/HTMLPreElement.cpp
+++ b/dom/html/HTMLPreElement.cpp
@@ -57,17 +57,17 @@ HTMLPreElement::MapAttributesIntoRule(co
NS_IMETHODIMP_(bool)
HTMLPreElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
if (!mNodeInfo->Equals(nsGkAtoms::pre)) {
return nsGenericHTMLElement::IsAttributeMapped(aAttribute);
}
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::wrap },
+ { nsGkAtoms::wrap },
{ nullptr },
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
};
--- a/dom/html/HTMLSharedElement.cpp
+++ b/dom/html/HTMLSharedElement.cpp
@@ -96,18 +96,18 @@ DirectoryMapAttributesIntoRule(const nsM
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLSharedElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
if (mNodeInfo->Equals(nsGkAtoms::dir)) {
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::type },
- // { &nsGkAtoms::compact }, // XXX
+ { nsGkAtoms::type },
+ // { nsGkAtoms::compact }, // XXX
{ nullptr}
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
};
--- a/dom/html/HTMLSharedListElement.cpp
+++ b/dom/html/HTMLSharedListElement.cpp
@@ -95,17 +95,17 @@ HTMLSharedListElement::MapAttributesInto
}
NS_IMETHODIMP_(bool)
HTMLSharedListElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
if (mNodeInfo->Equals(nsGkAtoms::ol) ||
mNodeInfo->Equals(nsGkAtoms::ul)) {
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::type },
+ { nsGkAtoms::type },
{ nullptr }
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
};
--- a/dom/html/HTMLTableCaptionElement.cpp
+++ b/dom/html/HTMLTableCaptionElement.cpp
@@ -63,17 +63,17 @@ HTMLTableCaptionElement::MapAttributesIn
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLTableCaptionElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::align },
+ { nsGkAtoms::align },
{ nullptr }
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
};
--- a/dom/html/HTMLTableCellElement.cpp
+++ b/dom/html/HTMLTableCellElement.cpp
@@ -232,29 +232,29 @@ HTMLTableCellElement::MapAttributesIntoR
nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLTableCellElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::align },
- { &nsGkAtoms::valign },
- { &nsGkAtoms::nowrap },
+ { nsGkAtoms::align },
+ { nsGkAtoms::valign },
+ { nsGkAtoms::nowrap },
#if 0
// XXXldb If these are implemented, they might need to move to
// GetAttributeChangeHint (depending on how, and preferably not).
- { &nsGkAtoms::abbr },
- { &nsGkAtoms::axis },
- { &nsGkAtoms::headers },
- { &nsGkAtoms::scope },
+ { nsGkAtoms::abbr },
+ { nsGkAtoms::axis },
+ { nsGkAtoms::headers },
+ { nsGkAtoms::scope },
#endif
- { &nsGkAtoms::width },
- { &nsGkAtoms::height },
+ { nsGkAtoms::width },
+ { nsGkAtoms::height },
{ nullptr }
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
sBackgroundAttributeMap,
};
--- a/dom/html/HTMLTableColElement.cpp
+++ b/dom/html/HTMLTableColElement.cpp
@@ -86,20 +86,20 @@ HTMLTableColElement::MapAttributesIntoRu
nsGenericHTMLElement::MapVAlignAttributeInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLTableColElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::width },
- { &nsGkAtoms::align },
- { &nsGkAtoms::valign },
- { &nsGkAtoms::span },
+ { nsGkAtoms::width },
+ { nsGkAtoms::align },
+ { nsGkAtoms::valign },
+ { nsGkAtoms::span },
{ nullptr }
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
};
--- a/dom/html/HTMLTableElement.cpp
+++ b/dom/html/HTMLTableElement.cpp
@@ -1011,27 +1011,27 @@ HTMLTableElement::MapAttributesIntoRule(
nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLTableElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::cellpadding },
- { &nsGkAtoms::cellspacing },
- { &nsGkAtoms::border },
- { &nsGkAtoms::width },
- { &nsGkAtoms::height },
- { &nsGkAtoms::hspace },
- { &nsGkAtoms::vspace },
+ { nsGkAtoms::cellpadding },
+ { nsGkAtoms::cellspacing },
+ { nsGkAtoms::border },
+ { nsGkAtoms::width },
+ { nsGkAtoms::height },
+ { nsGkAtoms::hspace },
+ { nsGkAtoms::vspace },
- { &nsGkAtoms::bordercolor },
+ { nsGkAtoms::bordercolor },
- { &nsGkAtoms::align },
+ { nsGkAtoms::align },
{ nullptr }
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
sBackgroundAttributeMap,
};
--- a/dom/html/HTMLTableRowElement.cpp
+++ b/dom/html/HTMLTableRowElement.cpp
@@ -268,19 +268,19 @@ HTMLTableRowElement::MapAttributesIntoRu
nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLTableRowElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::align },
- { &nsGkAtoms::valign },
- { &nsGkAtoms::height },
+ { nsGkAtoms::align },
+ { nsGkAtoms::valign },
+ { nsGkAtoms::height },
{ nullptr }
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
sBackgroundAttributeMap,
};
--- a/dom/html/HTMLTableSectionElement.cpp
+++ b/dom/html/HTMLTableSectionElement.cpp
@@ -176,19 +176,19 @@ HTMLTableSectionElement::MapAttributesIn
nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLTableSectionElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::align },
- { &nsGkAtoms::valign },
- { &nsGkAtoms::height },
+ { nsGkAtoms::align },
+ { nsGkAtoms::valign },
+ { nsGkAtoms::height },
{ nullptr }
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap,
sBackgroundAttributeMap,
};
--- a/dom/html/HTMLTextAreaElement.cpp
+++ b/dom/html/HTMLTextAreaElement.cpp
@@ -479,17 +479,17 @@ HTMLTextAreaElement::GetAttributeChangeH
}
return retval;
}
NS_IMETHODIMP_(bool)
HTMLTextAreaElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::wrap },
+ { nsGkAtoms::wrap },
{ nullptr }
};
static const MappedAttributeEntry* const map[] = {
attributes,
sDivAlignAttributeMap,
sCommonAttributeMap,
};
--- a/dom/html/HTMLVideoElement.cpp
+++ b/dom/html/HTMLVideoElement.cpp
@@ -106,18 +106,18 @@ HTMLVideoElement::MapAttributesIntoRule(
nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)
HTMLVideoElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
- { &nsGkAtoms::width },
- { &nsGkAtoms::height },
+ { nsGkAtoms::width },
+ { nsGkAtoms::height },
{ nullptr }
};
static const MappedAttributeEntry* const map[] = {
attributes,
sCommonAttributeMap
};
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -310,17 +310,17 @@ nsGenericHTMLElement::GetOffsetRect(CSSI
bool
nsGenericHTMLElement::Spellcheck()
{
// Has the state has been explicitly set?
nsIContent* node;
for (node = this; node; node = node->GetParent()) {
if (node->IsHTMLElement()) {
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::_true, &nsGkAtoms::_false, nullptr};
+ {nsGkAtoms::_true, nsGkAtoms::_false, nullptr};
switch (node->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::spellcheck, strings,
eCaseMatters)) {
case 0: // spellcheck = "true"
return true;
case 1: // spellcheck = "false"
return false;
}
@@ -1217,59 +1217,59 @@ nsGenericHTMLElement::MapCommonAttribute
if (aAttributes->IndexOfAttr(nsGkAtoms::hidden) >= 0) {
aData->SetKeywordValue(eCSSProperty_display, StyleDisplay::None);
}
}
}
/* static */ const nsGenericHTMLElement::MappedAttributeEntry
nsGenericHTMLElement::sCommonAttributeMap[] = {
- { &nsGkAtoms::contenteditable },
- { &nsGkAtoms::lang },
- { &nsGkAtoms::hidden },
+ { nsGkAtoms::contenteditable },
+ { nsGkAtoms::lang },
+ { nsGkAtoms::hidden },
{ nullptr }
};
/* static */ const Element::MappedAttributeEntry
nsGenericHTMLElement::sImageMarginSizeAttributeMap[] = {
- { &nsGkAtoms::width },
- { &nsGkAtoms::height },
- { &nsGkAtoms::hspace },
- { &nsGkAtoms::vspace },
+ { nsGkAtoms::width },
+ { nsGkAtoms::height },
+ { nsGkAtoms::hspace },
+ { nsGkAtoms::vspace },
{ nullptr }
};
/* static */ const Element::MappedAttributeEntry
nsGenericHTMLElement::sImageAlignAttributeMap[] = {
- { &nsGkAtoms::align },
+ { nsGkAtoms::align },
{ nullptr }
};
/* static */ const Element::MappedAttributeEntry
nsGenericHTMLElement::sDivAlignAttributeMap[] = {
- { &nsGkAtoms::align },
+ { nsGkAtoms::align },
{ nullptr }
};
/* static */ const Element::MappedAttributeEntry
nsGenericHTMLElement::sImageBorderAttributeMap[] = {
- { &nsGkAtoms::border },
+ { nsGkAtoms::border },
{ nullptr }
};
/* static */ const Element::MappedAttributeEntry
nsGenericHTMLElement::sBackgroundAttributeMap[] = {
- { &nsGkAtoms::background },
- { &nsGkAtoms::bgcolor },
+ { nsGkAtoms::background },
+ { nsGkAtoms::bgcolor },
{ nullptr }
};
/* static */ const Element::MappedAttributeEntry
nsGenericHTMLElement::sBackgroundColorAttributeMap[] = {
- { &nsGkAtoms::bgcolor },
+ { nsGkAtoms::bgcolor },
{ nullptr }
};
void
nsGenericHTMLElement::MapImageAlignAttributeInto(const nsMappedAttributes* aAttributes,
GenericSpecifiedValues* aData)
{
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::align);
--- a/dom/html/nsGenericHTMLElement.h
+++ b/dom/html/nsGenericHTMLElement.h
@@ -916,17 +916,17 @@ protected:
* Returns eTrue if the element has a contentEditable attribute and its value
* is "true" or an empty string. Returns eFalse if the element has a
* contentEditable attribute and its value is "false". Otherwise returns
* eInherit.
*/
ContentEditableTristate GetContentEditableValue() const
{
static const Element::AttrValuesArray values[] =
- { &nsGkAtoms::_false, &nsGkAtoms::_true, &nsGkAtoms::_empty, nullptr };
+ { nsGkAtoms::_false, nsGkAtoms::_true, nsGkAtoms::_empty, nullptr };
if (!MayHaveContentEditableAttr())
return eInherit;
int32_t value = FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::contenteditable, values,
eIgnoreCase);
--- a/dom/html/nsTextEditorState.cpp
+++ b/dom/html/nsTextEditorState.cpp
@@ -207,17 +207,17 @@ nsITextControlElement::GetWrapPropertyEn
// browsers treat it that way and there is no real reason to maintain physical
// and virtual as separate entities if no one else does. Only hard and off
// do anything different.
aWrapProp = eHTMLTextWrap_Soft; // the default
nsAutoString wrap;
if (aContent->IsHTMLElement()) {
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::HARD, &nsGkAtoms::OFF, nullptr};
+ {nsGkAtoms::HARD, nsGkAtoms::OFF, nullptr};
switch (aContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::wrap, strings,
eIgnoreCase)) {
case 0: aWrapProp = eHTMLTextWrap_Hard; break;
case 1: aWrapProp = eHTMLTextWrap_Off; break;
}
--- a/dom/mathml/nsMathMLElement.cpp
+++ b/dom/mathml/nsMathMLElement.cpp
@@ -178,47 +178,47 @@ nsMathMLElement::ParseAttribute(int32_t
return nsMathMLElementBase::ParseAttribute(aNamespaceID, aAttribute,
aValue,
aMaybeScriptedPrincipal,
aResult);
}
static Element::MappedAttributeEntry sMtableStyles[] = {
- { &nsGkAtoms::width },
+ { nsGkAtoms::width },
{ nullptr }
};
static Element::MappedAttributeEntry sTokenStyles[] = {
- { &nsGkAtoms::mathsize_ },
- { &nsGkAtoms::fontsize_ },
- { &nsGkAtoms::color },
- { &nsGkAtoms::fontfamily_ },
- { &nsGkAtoms::fontstyle_ },
- { &nsGkAtoms::fontweight_ },
- { &nsGkAtoms::mathvariant_},
+ { nsGkAtoms::mathsize_ },
+ { nsGkAtoms::fontsize_ },
+ { nsGkAtoms::color },
+ { nsGkAtoms::fontfamily_ },
+ { nsGkAtoms::fontstyle_ },
+ { nsGkAtoms::fontweight_ },
+ { nsGkAtoms::mathvariant_},
{ nullptr }
};
static Element::MappedAttributeEntry sEnvironmentStyles[] = {
- { &nsGkAtoms::scriptlevel_ },
- { &nsGkAtoms::scriptminsize_ },
- { &nsGkAtoms::scriptsizemultiplier_ },
- { &nsGkAtoms::background },
+ { nsGkAtoms::scriptlevel_ },
+ { nsGkAtoms::scriptminsize_ },
+ { nsGkAtoms::scriptsizemultiplier_ },
+ { nsGkAtoms::background },
{ nullptr }
};
static Element::MappedAttributeEntry sCommonPresStyles[] = {
- { &nsGkAtoms::mathcolor_ },
- { &nsGkAtoms::mathbackground_ },
+ { nsGkAtoms::mathcolor_ },
+ { nsGkAtoms::mathbackground_ },
{ nullptr }
};
static Element::MappedAttributeEntry sDirStyles[] = {
- { &nsGkAtoms::dir },
+ { nsGkAtoms::dir },
{ nullptr }
};
bool
nsMathMLElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
MOZ_ASSERT(IsMathMLElement());
@@ -994,23 +994,23 @@ nsMathMLElement::IsLink(nsIURI** aURI) c
// xlink:type - must be unset or set to "" or set to "simple"
// xlink:show - must be unset or set to "", "new" or "replace"
// xlink:actuate - must be unset or set to "" or "onRequest"
//
// For any other values, we're either not a *clickable* XLink, or the end
// result is poorly specified. Either way, we return false.
static Element::AttrValuesArray sTypeVals[] =
- { &nsGkAtoms::_empty, &nsGkAtoms::simple, nullptr };
+ { nsGkAtoms::_empty, nsGkAtoms::simple, nullptr };
static Element::AttrValuesArray sShowVals[] =
- { &nsGkAtoms::_empty, &nsGkAtoms::_new, &nsGkAtoms::replace, nullptr };
+ { nsGkAtoms::_empty, nsGkAtoms::_new, nsGkAtoms::replace, nullptr };
static Element::AttrValuesArray sActuateVals[] =
- { &nsGkAtoms::_empty, &nsGkAtoms::onRequest, nullptr };
+ { nsGkAtoms::_empty, nsGkAtoms::onRequest, nullptr };
// Optimization: check for href first for early return
href = mAttrsAndChildren.GetAttr(nsGkAtoms::href,
kNameSpaceID_XLink);
if (href &&
FindAttrValueIn(kNameSpaceID_XLink, nsGkAtoms::type,
sTypeVals, eCaseMatters) !=
Element::ATTR_VALUE_NO_MATCH &&
@@ -1046,17 +1046,17 @@ nsMathMLElement::GetLinkTarget(nsAString
kNameSpaceID_XLink);
if (target) {
target->ToString(aTarget);
}
if (aTarget.IsEmpty()) {
static Element::AttrValuesArray sShowVals[] =
- { &nsGkAtoms::_new, &nsGkAtoms::replace, nullptr };
+ { nsGkAtoms::_new, nsGkAtoms::replace, nullptr };
switch (FindAttrValueIn(kNameSpaceID_XLink, nsGkAtoms::show,
sShowVals, eCaseMatters)) {
case 0:
aTarget.AssignLiteral("_blank");
return;
case 1:
return;
--- a/dom/svg/SVGAElement.cpp
+++ b/dom/svg/SVGAElement.cpp
@@ -258,23 +258,23 @@ SVGAElement::IsLink(nsIURI** aURI) const
// xlink:type - must be unset or set to "" or set to "simple"
// xlink:show - must be unset or set to "", "new" or "replace"
// xlink:actuate - must be unset or set to "" or "onRequest"
//
// For any other values, we're either not a *clickable* XLink, or the end
// result is poorly specified. Either way, we return false.
static Element::AttrValuesArray sTypeVals[] =
- { &nsGkAtoms::_empty, &nsGkAtoms::simple, nullptr };
+ { nsGkAtoms::_empty, nsGkAtoms::simple, nullptr };
static Element::AttrValuesArray sShowVals[] =
- { &nsGkAtoms::_empty, &nsGkAtoms::_new, &nsGkAtoms::replace, nullptr };
+ { nsGkAtoms::_empty, nsGkAtoms::_new, nsGkAtoms::replace, nullptr };
static Element::AttrValuesArray sActuateVals[] =
- { &nsGkAtoms::_empty, &nsGkAtoms::onRequest, nullptr };
+ { nsGkAtoms::_empty, nsGkAtoms::onRequest, nullptr };
// Optimization: check for href first for early return
bool useBareHref = mStringAttributes[HREF].IsExplicitlySet();
if ((useBareHref || mStringAttributes[XLINK_HREF].IsExplicitlySet()) &&
FindAttrValueIn(kNameSpaceID_XLink, nsGkAtoms::type,
sTypeVals, eCaseMatters) !=
Element::ATTR_VALUE_NO_MATCH &&
@@ -300,17 +300,17 @@ SVGAElement::IsLink(nsIURI** aURI) const
void
SVGAElement::GetLinkTarget(nsAString& aTarget)
{
mStringAttributes[TARGET].GetAnimValue(aTarget, this);
if (aTarget.IsEmpty()) {
static Element::AttrValuesArray sShowVals[] =
- { &nsGkAtoms::_new, &nsGkAtoms::replace, nullptr };
+ { nsGkAtoms::_new, nsGkAtoms::replace, nullptr };
switch (FindAttrValueIn(kNameSpaceID_XLink, nsGkAtoms::show,
sShowVals, eCaseMatters)) {
case 0:
aTarget.AssignLiteral("_blank");
return;
case 1:
return;
--- a/dom/svg/nsSVGElement.cpp
+++ b/dom/svg/nsSVGElement.cpp
@@ -927,139 +927,139 @@ nsSVGElement::IsAttributeMapped(const ns
return true;
}
return nsSVGElementBase::IsAttributeMapped(name);
}
// PresentationAttributes-FillStroke
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sFillStrokeMap[] = {
- { &nsGkAtoms::fill },
- { &nsGkAtoms::fill_opacity },
- { &nsGkAtoms::fill_rule },
- { &nsGkAtoms::paint_order },
- { &nsGkAtoms::stroke },
- { &nsGkAtoms::stroke_dasharray },
- { &nsGkAtoms::stroke_dashoffset },
- { &nsGkAtoms::stroke_linecap },
- { &nsGkAtoms::stroke_linejoin },
- { &nsGkAtoms::stroke_miterlimit },
- { &nsGkAtoms::stroke_opacity },
- { &nsGkAtoms::stroke_width },
- { &nsGkAtoms::vector_effect },
+ { nsGkAtoms::fill },
+ { nsGkAtoms::fill_opacity },
+ { nsGkAtoms::fill_rule },
+ { nsGkAtoms::paint_order },
+ { nsGkAtoms::stroke },
+ { nsGkAtoms::stroke_dasharray },
+ { nsGkAtoms::stroke_dashoffset },
+ { nsGkAtoms::stroke_linecap },
+ { nsGkAtoms::stroke_linejoin },
+ { nsGkAtoms::stroke_miterlimit },
+ { nsGkAtoms::stroke_opacity },
+ { nsGkAtoms::stroke_width },
+ { nsGkAtoms::vector_effect },
{ nullptr }
};
// PresentationAttributes-Graphics
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sGraphicsMap[] = {
- { &nsGkAtoms::clip_path },
- { &nsGkAtoms::clip_rule },
- { &nsGkAtoms::colorInterpolation },
- { &nsGkAtoms::cursor },
- { &nsGkAtoms::display },
- { &nsGkAtoms::filter },
- { &nsGkAtoms::image_rendering },
- { &nsGkAtoms::mask },
- { &nsGkAtoms::opacity },
- { &nsGkAtoms::pointer_events },
- { &nsGkAtoms::shape_rendering },
- { &nsGkAtoms::text_rendering },
- { &nsGkAtoms::visibility },
+ { nsGkAtoms::clip_path },
+ { nsGkAtoms::clip_rule },
+ { nsGkAtoms::colorInterpolation },
+ { nsGkAtoms::cursor },
+ { nsGkAtoms::display },
+ { nsGkAtoms::filter },
+ { nsGkAtoms::image_rendering },
+ { nsGkAtoms::mask },
+ { nsGkAtoms::opacity },
+ { nsGkAtoms::pointer_events },
+ { nsGkAtoms::shape_rendering },
+ { nsGkAtoms::text_rendering },
+ { nsGkAtoms::visibility },
{ nullptr }
};
// PresentationAttributes-TextContentElements
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sTextContentElementsMap[] = {
// Properties that we don't support are commented out.
- // { &nsGkAtoms::alignment_baseline },
- // { &nsGkAtoms::baseline_shift },
- { &nsGkAtoms::direction },
- { &nsGkAtoms::dominant_baseline },
- { &nsGkAtoms::letter_spacing },
- { &nsGkAtoms::text_anchor },
- { &nsGkAtoms::text_decoration },
- { &nsGkAtoms::unicode_bidi },
- { &nsGkAtoms::word_spacing },
- { &nsGkAtoms::writing_mode },
+ // { nsGkAtoms::alignment_baseline },
+ // { nsGkAtoms::baseline_shift },
+ { nsGkAtoms::direction },
+ { nsGkAtoms::dominant_baseline },
+ { nsGkAtoms::letter_spacing },
+ { nsGkAtoms::text_anchor },
+ { nsGkAtoms::text_decoration },
+ { nsGkAtoms::unicode_bidi },
+ { nsGkAtoms::word_spacing },
+ { nsGkAtoms::writing_mode },
{ nullptr }
};
// PresentationAttributes-FontSpecification
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sFontSpecificationMap[] = {
- { &nsGkAtoms::font_family },
- { &nsGkAtoms::font_size },
- { &nsGkAtoms::font_size_adjust },
- { &nsGkAtoms::font_stretch },
- { &nsGkAtoms::font_style },
- { &nsGkAtoms::font_variant },
- { &nsGkAtoms::fontWeight },
+ { nsGkAtoms::font_family },
+ { nsGkAtoms::font_size },
+ { nsGkAtoms::font_size_adjust },
+ { nsGkAtoms::font_stretch },
+ { nsGkAtoms::font_style },
+ { nsGkAtoms::font_variant },
+ { nsGkAtoms::fontWeight },
{ nullptr }
};
// PresentationAttributes-GradientStop
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sGradientStopMap[] = {
- { &nsGkAtoms::stop_color },
- { &nsGkAtoms::stop_opacity },
+ { nsGkAtoms::stop_color },
+ { nsGkAtoms::stop_opacity },
{ nullptr }
};
// PresentationAttributes-Viewports
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sViewportsMap[] = {
- { &nsGkAtoms::overflow },
- { &nsGkAtoms::clip },
+ { nsGkAtoms::overflow },
+ { nsGkAtoms::clip },
{ nullptr }
};
// PresentationAttributes-Makers
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sMarkersMap[] = {
- { &nsGkAtoms::marker_end },
- { &nsGkAtoms::marker_mid },
- { &nsGkAtoms::marker_start },
+ { nsGkAtoms::marker_end },
+ { nsGkAtoms::marker_mid },
+ { nsGkAtoms::marker_start },
{ nullptr }
};
// PresentationAttributes-Color
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sColorMap[] = {
- { &nsGkAtoms::color },
+ { nsGkAtoms::color },
{ nullptr }
};
// PresentationAttributes-Filters
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sFiltersMap[] = {
- { &nsGkAtoms::colorInterpolationFilters },
+ { nsGkAtoms::colorInterpolationFilters },
{ nullptr }
};
// PresentationAttributes-feFlood
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sFEFloodMap[] = {
- { &nsGkAtoms::flood_color },
- { &nsGkAtoms::flood_opacity },
+ { nsGkAtoms::flood_color },
+ { nsGkAtoms::flood_opacity },
{ nullptr }
};
// PresentationAttributes-LightingEffects
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sLightingEffectsMap[] = {
- { &nsGkAtoms::lighting_color },
+ { nsGkAtoms::lighting_color },
{ nullptr }
};
// PresentationAttributes-mask
/* static */ const Element::MappedAttributeEntry
nsSVGElement::sMaskMap[] = {
- { &nsGkAtoms::mask_type },
+ { nsGkAtoms::mask_type },
{ nullptr }
};
//----------------------------------------------------------------------
// nsIDOMElement methods
// forwarded to Element implementations
--- a/dom/xbl/nsXBLPrototypeBinding.cpp
+++ b/dom/xbl/nsXBLPrototypeBinding.cpp
@@ -1552,26 +1552,26 @@ nsXBLPrototypeBinding::WriteNamespace(ns
return NS_OK;
}
bool CheckTagNameWhiteList(int32_t aNameSpaceID, nsAtom *aTagName)
{
static Element::AttrValuesArray kValidXULTagNames[] = {
- &nsGkAtoms::autorepeatbutton, &nsGkAtoms::box, &nsGkAtoms::browser,
- &nsGkAtoms::button, &nsGkAtoms::hbox, &nsGkAtoms::image, &nsGkAtoms::menu,
- &nsGkAtoms::menubar, &nsGkAtoms::menuitem, &nsGkAtoms::menupopup,
- &nsGkAtoms::row, &nsGkAtoms::slider, &nsGkAtoms::spacer,
- &nsGkAtoms::splitter, &nsGkAtoms::text, &nsGkAtoms::tree, nullptr};
+ nsGkAtoms::autorepeatbutton, nsGkAtoms::box, nsGkAtoms::browser,
+ nsGkAtoms::button, nsGkAtoms::hbox, nsGkAtoms::image, nsGkAtoms::menu,
+ nsGkAtoms::menubar, nsGkAtoms::menuitem, nsGkAtoms::menupopup,
+ nsGkAtoms::row, nsGkAtoms::slider, nsGkAtoms::spacer,
+ nsGkAtoms::splitter, nsGkAtoms::text, nsGkAtoms::tree, nullptr};
uint32_t i;
if (aNameSpaceID == kNameSpaceID_XUL) {
for (i = 0; kValidXULTagNames[i]; ++i) {
- if (aTagName == *(kValidXULTagNames[i])) {
+ if (aTagName == kValidXULTagNames[i]) {
return true;
}
}
}
else if (aNameSpaceID == kNameSpaceID_SVG &&
aTagName == nsGkAtoms::generic_) {
return true;
}
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -4112,17 +4112,17 @@ XULDocument::GetWindowRoot()
bool
XULDocument::IsDocumentRightToLeft()
{
// setting the localedir attribute on the root element forces a
// specific direction for the document.
Element* element = GetRootElement();
if (element) {
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::ltr, &nsGkAtoms::rtl, nullptr};
+ {nsGkAtoms::ltr, nsGkAtoms::rtl, nullptr};
switch (element->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::localedir,
strings, eCaseMatters)) {
case 0: return false;
case 1: return true;
default: break; // otherwise, not a valid value, so fall through
}
}
--- a/layout/base/PositionedEventTargeting.cpp
+++ b/layout/base/PositionedEventTargeting.cpp
@@ -243,17 +243,17 @@ GetClickableAncestor(nsIFrame* aFrame, n
nsGkAtoms::menuitem,
nsGkAtoms::menulist,
nsGkAtoms::scrollbarbutton,
nsGkAtoms::resizer)) {
return content;
}
static Element::AttrValuesArray clickableRoles[] =
- { &nsGkAtoms::button, &nsGkAtoms::key, nullptr };
+ { nsGkAtoms::button, nsGkAtoms::key, nullptr };
if (content->IsElement() &&
content->AsElement()->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::role,
clickableRoles, eIgnoreCase) >= 0) {
return content;
}
if (content->IsEditable()) {
return content;
}
--- a/layout/generic/nsImageMap.cpp
+++ b/layout/generic/nsImageMap.cpp
@@ -788,20 +788,20 @@ nsImageMap::UpdateAreas()
}
#endif
}
void
nsImageMap::AddArea(HTMLAreaElement* aArea)
{
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::rect, &nsGkAtoms::rectangle,
- &nsGkAtoms::circle, &nsGkAtoms::circ,
- &nsGkAtoms::_default,
- &nsGkAtoms::poly, &nsGkAtoms::polygon,
+ {nsGkAtoms::rect, nsGkAtoms::rectangle,
+ nsGkAtoms::circle, nsGkAtoms::circ,
+ nsGkAtoms::_default,
+ nsGkAtoms::poly, nsGkAtoms::polygon,
nullptr};
UniquePtr<Area> area;
switch (aArea->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::shape,
strings, eIgnoreCase)) {
case Element::ATTR_VALUE_NO_MATCH:
case Element::ATTR_MISSING:
case 0:
--- a/layout/xul/nsBoxFrame.cpp
+++ b/layout/xul/nsBoxFrame.cpp
@@ -199,17 +199,17 @@ nsBoxFrame::Init(nsIContent* aCont
// register access key
RegUnregAccessKey(true);
}
void nsBoxFrame::UpdateMouseThrough()
{
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::never, &nsGkAtoms::always, nullptr};
+ {nsGkAtoms::never, nsGkAtoms::always, nullptr};
switch (mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::mousethrough, strings, eCaseMatters)) {
case 0: AddStateBits(NS_FRAME_MOUSE_THROUGH_NEVER); break;
case 1: AddStateBits(NS_FRAME_MOUSE_THROUGH_ALWAYS); break;
case 2: {
RemoveStateBits(NS_FRAME_MOUSE_THROUGH_ALWAYS);
RemoveStateBits(NS_FRAME_MOUSE_THROUGH_NEVER);
break;
@@ -279,17 +279,17 @@ nsBoxFrame::CacheAttributes()
#ifdef DEBUG_LAYOUT
bool
nsBoxFrame::GetInitialDebug(bool& aDebug)
{
if (!GetContent() || !GetContent()->IsElement())
return false;
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::_false, &nsGkAtoms::_true, nullptr};
+ {nsGkAtoms::_false, nsGkAtoms::_true, nullptr};
int32_t index = GetContent()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::debug, strings, eCaseMatters);
if (index >= 0) {
aDebug = index == 1;
return true;
}
return false;
@@ -300,31 +300,31 @@ bool
nsBoxFrame::GetInitialHAlignment(nsBoxFrame::Halignment& aHalign)
{
if (!GetContent() || !GetContent()->IsElement())
return false;
Element* element = GetContent()->AsElement();
// XXXdwh Everything inside this if statement is deprecated code.
static Element::AttrValuesArray alignStrings[] =
- {&nsGkAtoms::left, &nsGkAtoms::right, nullptr};
+ {nsGkAtoms::left, nsGkAtoms::right, nullptr};
static const Halignment alignValues[] = {hAlign_Left, hAlign_Right};
int32_t index = element->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::align,
alignStrings, eCaseMatters);
if (index >= 0) {
aHalign = alignValues[index];
return true;
}
// Now that the deprecated stuff is out of the way, we move on to check the appropriate
// attribute. For horizontal boxes, we are checking the PACK attribute. For vertical boxes
// we are checking the ALIGN attribute.
nsAtom* attrName = IsXULHorizontal() ? nsGkAtoms::pack : nsGkAtoms::align;
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::_empty, &nsGkAtoms::start, &nsGkAtoms::center, &nsGkAtoms::end, nullptr};
+ {nsGkAtoms::_empty, nsGkAtoms::start, nsGkAtoms::center, nsGkAtoms::end, nullptr};
static const Halignment values[] =
{hAlign_Left/*not used*/, hAlign_Left, hAlign_Center, hAlign_Right};
index = element->FindAttrValueIn(kNameSpaceID_None, attrName,
strings, eCaseMatters);
if (index == Element::ATTR_VALUE_NO_MATCH) {
// The attr was present but had a nonsensical value. Revert to the default.
return false;
@@ -376,33 +376,33 @@ bool
nsBoxFrame::GetInitialVAlignment(nsBoxFrame::Valignment& aValign)
{
if (!GetContent() || !GetContent()->IsElement())
return false;
Element* element = GetContent()->AsElement();
static Element::AttrValuesArray valignStrings[] =
- {&nsGkAtoms::top, &nsGkAtoms::baseline, &nsGkAtoms::middle, &nsGkAtoms::bottom, nullptr};
+ {nsGkAtoms::top, nsGkAtoms::baseline, nsGkAtoms::middle, nsGkAtoms::bottom, nullptr};
static const Valignment valignValues[] =
{vAlign_Top, vAlign_BaseLine, vAlign_Middle, vAlign_Bottom};
int32_t index = element->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::valign,
valignStrings, eCaseMatters);
if (index >= 0) {
aValign = valignValues[index];
return true;
}
// Now that the deprecated stuff is out of the way, we move on to check the appropriate
// attribute. For horizontal boxes, we are checking the ALIGN attribute. For vertical boxes
// we are checking the PACK attribute.
nsAtom* attrName = IsXULHorizontal() ? nsGkAtoms::align : nsGkAtoms::pack;
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::_empty, &nsGkAtoms::start, &nsGkAtoms::center,
- &nsGkAtoms::baseline, &nsGkAtoms::end, nullptr};
+ {nsGkAtoms::_empty, nsGkAtoms::start, nsGkAtoms::center,
+ nsGkAtoms::baseline, nsGkAtoms::end, nullptr};
static const Valignment values[] =
{vAlign_Top/*not used*/, vAlign_Top, vAlign_Middle, vAlign_BaseLine, vAlign_Bottom};
index = element->FindAttrValueIn(kNameSpaceID_None, attrName,
strings, eCaseMatters);
if (index == Element::ATTR_VALUE_NO_MATCH) {
// The attr was present but had a nonsensical value. Revert to the default.
return false;
}
@@ -468,17 +468,17 @@ nsBoxFrame::GetInitialOrientation(bool&
}
// Now see if we have an attribute. The attribute overrides
// the style system value.
if (!GetContent()->IsElement())
return;
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::vertical, &nsGkAtoms::horizontal, nullptr};
+ {nsGkAtoms::vertical, nsGkAtoms::horizontal, nullptr};
int32_t index =
GetContent()->AsElement()->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::orient,
strings, eCaseMatters);
if (index >= 0) {
aIsHorizontal = index == 1;
}
}
@@ -507,17 +507,17 @@ nsBoxFrame::GetInitialDirection(bool& aI
}
Element* element = GetContent()->AsElement();
// Now see if we have an attribute. The attribute overrides
// the style system value.
if (IsXULHorizontal()) {
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::reverse, &nsGkAtoms::ltr, &nsGkAtoms::rtl, nullptr};
+ {nsGkAtoms::reverse, nsGkAtoms::ltr, nsGkAtoms::rtl, nullptr};
int32_t index = element->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::dir,
strings, eCaseMatters);
if (index >= 0) {
bool values[] = {!aIsNormal, true, false};
aIsNormal = values[index];
}
} else if (element->AttrValueIs(kNameSpaceID_None, nsGkAtoms::dir,
nsGkAtoms::reverse, eCaseMatters)) {
@@ -550,17 +550,17 @@ bool
nsBoxFrame::GetInitialAutoStretch(bool& aStretch)
{
if (!GetContent())
return false;
// Check the align attribute.
if (GetContent()->IsElement()) {
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::_empty, &nsGkAtoms::stretch, nullptr};
+ {nsGkAtoms::_empty, nsGkAtoms::stretch, nullptr};
int32_t index =
GetContent()->AsElement()->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::align,
strings, eCaseMatters);
if (index != Element::ATTR_MISSING && index != 0) {
aStretch = index == 1;
return true;
}
}
--- a/layout/xul/nsImageBoxFrame.cpp
+++ b/layout/xul/nsImageBoxFrame.cpp
@@ -295,17 +295,17 @@ nsImageBoxFrame::UpdateImage()
oldImageRequest->UnlockImage();
}
}
void
nsImageBoxFrame::UpdateLoadFlags()
{
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::always, &nsGkAtoms::never, nullptr};
+ {nsGkAtoms::always, nsGkAtoms::never, nullptr};
switch (mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::validate, strings,
eCaseMatters)) {
case 0:
mLoadFlags = nsIRequest::VALIDATE_ALWAYS;
break;
case 1:
mLoadFlags = nsIRequest::VALIDATE_NEVER|nsIRequest::LOAD_FROM_CACHE;
--- a/layout/xul/nsLeafBoxFrame.cpp
+++ b/layout/xul/nsLeafBoxFrame.cpp
@@ -79,17 +79,17 @@ nsLeafBoxFrame::AttributeChanged(int32_t
UpdateMouseThrough();
return rv;
}
void nsLeafBoxFrame::UpdateMouseThrough()
{
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::never, &nsGkAtoms::always, nullptr};
+ {nsGkAtoms::never, nsGkAtoms::always, nullptr};
switch (mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::mousethrough,
strings, eCaseMatters)) {
case 0: AddStateBits(NS_FRAME_MOUSE_THROUGH_NEVER); break;
case 1: AddStateBits(NS_FRAME_MOUSE_THROUGH_ALWAYS); break;
case 2: {
RemoveStateBits(NS_FRAME_MOUSE_THROUGH_ALWAYS);
RemoveStateBits(NS_FRAME_MOUSE_THROUGH_NEVER);
--- a/layout/xul/nsMenuFrame.cpp
+++ b/layout/xul/nsMenuFrame.cpp
@@ -939,17 +939,17 @@ nsMenuFrame::IsDisabled()
nsGkAtoms::disabled,
nsGkAtoms::_true, eCaseMatters);
}
void
nsMenuFrame::UpdateMenuType()
{
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::checkbox, &nsGkAtoms::radio, nullptr};
+ {nsGkAtoms::checkbox, nsGkAtoms::radio, nullptr};
switch (mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::type,
strings, eCaseMatters)) {
case 0: mType = eMenuType_Checkbox; break;
case 1:
mType = eMenuType_Radio;
mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::name, mGroupName);
break;
--- a/layout/xul/nsMenuPopupFrame.cpp
+++ b/layout/xul/nsMenuPopupFrame.cpp
@@ -225,17 +225,17 @@ nsMenuPopupFrame::PopupLevel(bool aIsNoA
// 5. use the platform-specific default level
// If this is not a panel, this is always a top-most popup.
if (mPopupType != ePopupTypePanel)
return ePopupLevelTop;
// If the level attribute has been set, use that.
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::top, &nsGkAtoms::parent, &nsGkAtoms::floating, nullptr};
+ {nsGkAtoms::top, nsGkAtoms::parent, nsGkAtoms::floating, nullptr};
switch (mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::level, strings,
eCaseMatters)) {
case 0:
return ePopupLevelTop;
case 1:
return ePopupLevelParent;
case 2:
--- a/layout/xul/nsResizerFrame.cpp
+++ b/layout/xul/nsResizerFrame.cpp
@@ -489,20 +489,20 @@ nsResizerFrame::RestoreOriginalSize(nsIC
}
/* returns a Direction struct containing the horizontal and vertical direction
*/
nsResizerFrame::Direction
nsResizerFrame::GetDirection()
{
static const Element::AttrValuesArray strings[] =
- {&nsGkAtoms::topleft, &nsGkAtoms::top, &nsGkAtoms::topright,
- &nsGkAtoms::left, &nsGkAtoms::right,
- &nsGkAtoms::bottomleft, &nsGkAtoms::bottom, &nsGkAtoms::bottomright,
- &nsGkAtoms::bottomstart, &nsGkAtoms::bottomend,
+ {nsGkAtoms::topleft, nsGkAtoms::top, nsGkAtoms::topright,
+ nsGkAtoms::left, nsGkAtoms::right,
+ nsGkAtoms::bottomleft, nsGkAtoms::bottom, nsGkAtoms::bottomright,
+ nsGkAtoms::bottomstart, nsGkAtoms::bottomend,
nullptr};
static const Direction directions[] =
{{-1, -1}, {0, -1}, {1, -1},
{-1, 0}, {1, 0},
{-1, 1}, {0, 1}, {1, 1},
{-1, 1}, {1, 1}
};
--- a/layout/xul/nsScrollbarButtonFrame.cpp
+++ b/layout/xul/nsScrollbarButtonFrame.cpp
@@ -108,18 +108,18 @@ nsScrollbarButtonFrame::HandleButtonPres
// get the scrollbar control
nsIFrame* scrollbar;
GetParentWithTag(nsGkAtoms::scrollbar, this, scrollbar);
if (scrollbar == nullptr)
return false;
- static Element::AttrValuesArray strings[] = { &nsGkAtoms::increment,
- &nsGkAtoms::decrement,
+ static Element::AttrValuesArray strings[] = { nsGkAtoms::increment,
+ nsGkAtoms::decrement,
nullptr };
int32_t index = mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::type,
strings, eCaseMatters);
int32_t direction;
if (index == 0)
direction = 1;
else if (index == 1)
--- a/layout/xul/nsSplitterFrame.cpp
+++ b/layout/xul/nsSplitterFrame.cpp
@@ -131,17 +131,17 @@ public:
};
NS_IMPL_ISUPPORTS(nsSplitterFrameInner, nsIDOMEventListener)
nsSplitterFrameInner::ResizeType
nsSplitterFrameInner::GetResizeBefore()
{
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::farthest, &nsGkAtoms::flex, nullptr};
+ {nsGkAtoms::farthest, nsGkAtoms::flex, nullptr};
switch (SplitterElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::resizebefore,
strings, eCaseMatters)) {
case 0: return Farthest;
case 1: return Flex;
}
return Closest;
}
@@ -149,34 +149,34 @@ nsSplitterFrameInner::GetResizeBefore()
nsSplitterFrameInner::~nsSplitterFrameInner()
{
}
nsSplitterFrameInner::ResizeType
nsSplitterFrameInner::GetResizeAfter()
{
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::farthest, &nsGkAtoms::flex, &nsGkAtoms::grow, nullptr};
+ {nsGkAtoms::farthest, nsGkAtoms::flex, nsGkAtoms::grow, nullptr};
switch (SplitterElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::resizeafter,
strings, eCaseMatters)) {
case 0: return Farthest;
case 1: return Flex;
case 2: return Grow;
}
return Closest;
}
nsSplitterFrameInner::State
nsSplitterFrameInner::GetState()
{
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::dragging, &nsGkAtoms::collapsed, nullptr};
+ {nsGkAtoms::dragging, nsGkAtoms::collapsed, nullptr};
static Element::AttrValuesArray strings_substate[] =
- {&nsGkAtoms::before, &nsGkAtoms::after, nullptr};
+ {nsGkAtoms::before, nsGkAtoms::after, nullptr};
switch (SplitterElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::state,
strings, eCaseMatters)) {
case 0: return Dragging;
case 1:
switch (SplitterElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::substate,
strings_substate,
@@ -794,17 +794,17 @@ nsSplitterFrameInner::Reverse(UniquePtr<
bool
nsSplitterFrameInner::SupportsCollapseDirection
(
nsSplitterFrameInner::CollapseDirection aDirection
)
{
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::before, &nsGkAtoms::after, &nsGkAtoms::both, nullptr};
+ {nsGkAtoms::before, nsGkAtoms::after, nsGkAtoms::both, nullptr};
switch (SplitterElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::collapse,
strings, eCaseMatters)) {
case 0:
return (aDirection == Before);
case 1:
return (aDirection == After);
--- a/layout/xul/nsTextBoxFrame.cpp
+++ b/layout/xul/nsTextBoxFrame.cpp
@@ -230,18 +230,18 @@ nsTextBoxFrame::UpdateAttributes(nsAtom*
bool& aRedraw)
{
bool doUpdateTitle = false;
aResize = false;
aRedraw = false;
if (aAttribute == nullptr || aAttribute == nsGkAtoms::crop) {
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::left, &nsGkAtoms::start, &nsGkAtoms::center,
- &nsGkAtoms::right, &nsGkAtoms::end, &nsGkAtoms::none, nullptr};
+ {nsGkAtoms::left, nsGkAtoms::start, nsGkAtoms::center,
+ nsGkAtoms::right, nsGkAtoms::end, nsGkAtoms::none, nullptr};
CroppingStyle cropType;
switch (mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::crop, strings,
eCaseMatters)) {
case 0:
case 1:
cropType = CropLeft;
break;
--- a/layout/xul/nsXULPopupManager.cpp
+++ b/layout/xul/nsXULPopupManager.cpp
@@ -1370,17 +1370,17 @@ nsXULPopupManager::UpdateFollowAnchor(ns
}
void
nsXULPopupManager::ExecuteMenu(nsIContent* aMenu, nsXULMenuCommandEvent* aEvent)
{
CloseMenuMode cmm = CloseMenuMode_Auto;
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::none, &nsGkAtoms::single, nullptr};
+ {nsGkAtoms::none, nsGkAtoms::single, nullptr};
if (aMenu->IsElement()) {
switch (aMenu->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::closemenu,
strings,
eCaseMatters)) {
case 0:
cmm = CloseMenuMode_None;
--- a/layout/xul/tree/nsTreeColumns.cpp
+++ b/layout/xul/tree/nsTreeColumns.cpp
@@ -314,30 +314,29 @@ nsTreeColumn::Invalidate()
mOverflow =
mContent->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::overflow,
nsGkAtoms::_true, eCaseMatters);
// Figure out our column type. Default type is text.
mType = nsITreeColumn::TYPE_TEXT;
static Element::AttrValuesArray typestrings[] =
- {&nsGkAtoms::checkbox, &nsGkAtoms::password,
- nullptr};
+ {nsGkAtoms::checkbox, nsGkAtoms::password, nullptr};
switch (mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::type,
typestrings,
eCaseMatters)) {
case 0: mType = nsITreeColumn::TYPE_CHECKBOX; break;
case 1: mType = nsITreeColumn::TYPE_PASSWORD; break;
}
// Fetch the crop style.
mCropStyle = 0;
static Element::AttrValuesArray cropstrings[] =
- {&nsGkAtoms::center, &nsGkAtoms::left, &nsGkAtoms::start, nullptr};
+ {nsGkAtoms::center, nsGkAtoms::left, nsGkAtoms::start, nullptr};
switch (mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::crop, cropstrings,
eCaseMatters)) {
case 0:
mCropStyle = 1;
break;
case 1:
case 2:
--- a/layout/xul/tree/nsTreeContentView.cpp
+++ b/layout/xul/tree/nsTreeContentView.cpp
@@ -664,17 +664,17 @@ nsTreeContentView::CycleHeader(nsTreeCol
nsCOMPtr<Element> column = do_QueryInterface(element);
nsAutoString sort;
column->GetAttr(kNameSpaceID_None, nsGkAtoms::sort, sort);
if (!sort.IsEmpty()) {
nsCOMPtr<nsIXULSortService> xs = do_GetService("@mozilla.org/xul/xul-sort-service;1");
if (xs) {
nsAutoString sortdirection;
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::ascending, &nsGkAtoms::descending, nullptr};
+ {nsGkAtoms::ascending, nsGkAtoms::descending, nullptr};
switch (column->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::sortDirection,
strings, eCaseMatters)) {
case 0: sortdirection.AssignLiteral("descending"); break;
case 1: sortdirection.AssignLiteral("natural"); break;
default: sortdirection.AssignLiteral("ascending"); break;
}
--- a/layout/xul/tree/nsTreeSelection.cpp
+++ b/layout/xul/tree/nsTreeSelection.cpp
@@ -286,17 +286,17 @@ NS_IMETHODIMP nsTreeSelection::SetTree(n
mTree = do_QueryInterface(bo);
NS_ENSURE_STATE(mTree == aTree);
return NS_OK;
}
NS_IMETHODIMP nsTreeSelection::GetSingle(bool* aSingle)
{
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::single, &nsGkAtoms::cell, &nsGkAtoms::text, nullptr};
+ {nsGkAtoms::single, nsGkAtoms::cell, nsGkAtoms::text, nullptr};
nsCOMPtr<nsIContent> content = GetContent();
if (!content) {
return NS_ERROR_NULL_POINTER;
}
*aSingle = content->IsElement() &&
content->AsElement()->FindAttrValueIn(kNameSpaceID_None,
--- a/widget/cocoa/nsMenuX.mm
+++ b/widget/cocoa/nsMenuX.mm
@@ -516,17 +516,17 @@ void nsMenuX::LoadMenuItem(nsIContent* i
// printf("menuitem %s \n", NS_LossyConvertUTF16toASCII(menuitemName).get());
EMenuItemType itemType = eRegularMenuItemType;
if (inMenuItemContent->IsXULElement(nsGkAtoms::menuseparator)) {
itemType = eSeparatorMenuItemType;
} else if (inMenuItemContent->IsElement()) {
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::checkbox, &nsGkAtoms::radio, nullptr};
+ {nsGkAtoms::checkbox, nsGkAtoms::radio, nullptr};
switch (inMenuItemContent->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::type,
strings, eCaseMatters)) {
case 0: itemType = eCheckboxMenuItemType; break;
case 1: itemType = eRadioMenuItemType; break;
}
}
--- a/widget/nsNativeTheme.cpp
+++ b/widget/nsNativeTheme.cpp
@@ -405,18 +405,18 @@ nsNativeTheme::IsHTMLContent(nsIFrame *a
// scrollbar button:
int32_t
nsNativeTheme::GetScrollbarButtonType(nsIFrame* aFrame)
{
if (!aFrame)
return 0;
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::scrollbarDownBottom, &nsGkAtoms::scrollbarDownTop,
- &nsGkAtoms::scrollbarUpBottom, &nsGkAtoms::scrollbarUpTop,
+ {nsGkAtoms::scrollbarDownBottom, nsGkAtoms::scrollbarDownTop,
+ nsGkAtoms::scrollbarUpBottom, nsGkAtoms::scrollbarUpTop,
nullptr};
nsIContent* content = aFrame->GetContent();
if (!content || !content->IsElement()) {
return 0;
}
switch (content->AsElement()->FindAttrValueIn(kNameSpaceID_None,
@@ -434,17 +434,17 @@ nsNativeTheme::GetScrollbarButtonType(ns
// treeheadercell:
nsNativeTheme::TreeSortDirection
nsNativeTheme::GetTreeSortDirection(nsIFrame* aFrame)
{
if (!aFrame || !aFrame->GetContent())
return eTreeSortDirection_Natural;
static Element::AttrValuesArray strings[] =
- {&nsGkAtoms::descending, &nsGkAtoms::ascending, nullptr};
+ {nsGkAtoms::descending, nsGkAtoms::ascending, nullptr};
nsIContent* content = aFrame->GetContent();
if (content->IsElement()) {
switch (content->AsElement()->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::sortDirection,
strings, eCaseMatters)) {
case 0: return eTreeSortDirection_Descending;
case 1: return eTreeSortDirection_Ascending;