mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
merge mozilla-central to mozilla-inbound. r=merge a=merge
This commit is contained in:
commit
6ea9396481
2
.gdbinit
2
.gdbinit
@ -86,7 +86,7 @@ def ps
|
||||
end
|
||||
end
|
||||
|
||||
# Define a "pa" command to display the string value for an nsIAtom
|
||||
# Define a "pa" command to display the string value for an nsAtom
|
||||
def pa
|
||||
set $atom = $arg0
|
||||
if (sizeof(*((&*$atom)->mString)) == 2)
|
||||
|
@ -22,7 +22,7 @@ settings set target.inline-breakpoint-strategy always
|
||||
settings set target.prefer-dynamic-value run-target
|
||||
|
||||
# Show the string value in atoms.
|
||||
type summary add nsIAtom --summary-string "${var.mString}"
|
||||
type summary add nsAtom --summary-string "${var.mString}"
|
||||
|
||||
# Show the value of text nodes.
|
||||
type summary add nsTextNode --summary-string "${var.mText}"
|
||||
|
@ -1230,7 +1230,7 @@ static const EStateRule sWAIUnivStateMap[] = {
|
||||
|
||||
struct AttrCharacteristics
|
||||
{
|
||||
nsIAtom** attributeName;
|
||||
nsAtom** attributeName;
|
||||
const uint8_t characteristics;
|
||||
};
|
||||
|
||||
@ -1361,7 +1361,7 @@ aria::UniversalStatesFor(mozilla::dom::Element* aElement)
|
||||
}
|
||||
|
||||
uint8_t
|
||||
aria::AttrCharacteristicsFor(nsIAtom* aAtom)
|
||||
aria::AttrCharacteristicsFor(nsAtom* aAtom)
|
||||
{
|
||||
for (uint32_t i = 0; i < ArrayLength(gWAIUnivAttrMap); i++)
|
||||
if (*gWAIUnivAttrMap[i].attributeName == aAtom)
|
||||
@ -1389,7 +1389,7 @@ AttrIterator::Next(nsAString& aAttrName, nsAString& aAttrValue)
|
||||
const nsAttrName* attr = mContent->GetAttrNameAt(mAttrIdx);
|
||||
mAttrIdx++;
|
||||
if (attr->NamespaceEquals(kNameSpaceID_None)) {
|
||||
nsIAtom* attrAtom = attr->Atom();
|
||||
nsAtom* attrAtom = attr->Atom();
|
||||
nsDependentAtomString attrStr(attrAtom);
|
||||
if (!StringBeginsWith(attrStr, NS_LITERAL_STRING("aria-")))
|
||||
continue; // Not ARIA
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "mozilla/a11y/AccTypes.h"
|
||||
#include "mozilla/a11y/Role.h"
|
||||
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
class nsINode;
|
||||
@ -140,7 +140,7 @@ struct nsRoleMapEntry
|
||||
/**
|
||||
* Return true if matches to the given ARIA role.
|
||||
*/
|
||||
bool Is(nsIAtom* aARIARole) const
|
||||
bool Is(nsAtom* aARIARole) const
|
||||
{ return *roleAtom == aARIARole; }
|
||||
|
||||
/**
|
||||
@ -156,7 +156,7 @@ struct nsRoleMapEntry
|
||||
{ return nsDependentAtomString(*roleAtom); }
|
||||
|
||||
// ARIA role: string representation such as "button"
|
||||
nsIAtom** roleAtom;
|
||||
nsAtom** roleAtom;
|
||||
|
||||
// Role mapping rule: maps to enum Role
|
||||
mozilla::a11y::role role;
|
||||
@ -274,7 +274,7 @@ uint64_t UniversalStatesFor(mozilla::dom::Element* aElement);
|
||||
* @return A bitflag representing the attribute characteristics
|
||||
* (see above for possible bit masks, prefixed "ATTR_")
|
||||
*/
|
||||
uint8_t AttrCharacteristicsFor(nsIAtom* aAtom);
|
||||
uint8_t AttrCharacteristicsFor(nsAtom* aAtom);
|
||||
|
||||
/**
|
||||
* Return true if the element has defined aria-hidden.
|
||||
|
@ -20,11 +20,11 @@ using namespace mozilla::a11y::aria;
|
||||
struct EnumTypeData
|
||||
{
|
||||
// ARIA attribute name.
|
||||
nsIAtom* const mAttrName;
|
||||
nsAtom* const mAttrName;
|
||||
|
||||
// States if the attribute value is matched to the enum value. Used as
|
||||
// nsIContent::AttrValuesArray, last item must be nullptr.
|
||||
nsIAtom* const* const mValues[4];
|
||||
nsAtom* const* const mValues[4];
|
||||
|
||||
// States applied if corresponding enum values are matched.
|
||||
const uint64_t mStates[3];
|
||||
@ -46,7 +46,7 @@ enum ETokenType
|
||||
*/
|
||||
struct TokenTypeData
|
||||
{
|
||||
TokenTypeData(nsIAtom* aAttrName, uint32_t aType,
|
||||
TokenTypeData(nsAtom* aAttrName, uint32_t aType,
|
||||
uint64_t aPermanentState,
|
||||
uint64_t aTrueState,
|
||||
uint64_t aFalseState = 0) :
|
||||
@ -55,7 +55,7 @@ struct TokenTypeData
|
||||
{ }
|
||||
|
||||
// ARIA attribute name.
|
||||
nsIAtom* const mAttrName;
|
||||
nsAtom* const mAttrName;
|
||||
|
||||
// Type.
|
||||
const uint32_t mType;
|
||||
|
@ -516,7 +516,7 @@ private:
|
||||
class AccObjectAttrChangedEvent: public AccEvent
|
||||
{
|
||||
public:
|
||||
AccObjectAttrChangedEvent(Accessible* aAccessible, nsIAtom* aAttribute) :
|
||||
AccObjectAttrChangedEvent(Accessible* aAccessible, nsAtom* aAttribute) :
|
||||
AccEvent(::nsIAccessibleEvent::EVENT_OBJECT_ATTRIBUTE_CHANGED, aAccessible),
|
||||
mAttribute(aAttribute) { }
|
||||
|
||||
@ -528,10 +528,10 @@ public:
|
||||
}
|
||||
|
||||
// AccObjectAttrChangedEvent
|
||||
nsIAtom* GetAttribute() const { return mAttribute; }
|
||||
nsAtom* GetAttribute() const { return mAttribute; }
|
||||
|
||||
private:
|
||||
RefPtr<nsIAtom> mAttribute;
|
||||
RefPtr<nsAtom> mAttribute;
|
||||
|
||||
virtual ~AccObjectAttrChangedEvent() { }
|
||||
};
|
||||
|
@ -76,12 +76,12 @@ AccIterator::IteratorState::IteratorState(Accessible* aParent,
|
||||
|
||||
RelatedAccIterator::
|
||||
RelatedAccIterator(DocAccessible* aDocument, nsIContent* aDependentContent,
|
||||
nsIAtom* aRelAttr) :
|
||||
nsAtom* aRelAttr) :
|
||||
mDocument(aDocument), mRelAttr(aRelAttr), mProviders(nullptr),
|
||||
mBindingParent(nullptr), mIndex(0)
|
||||
{
|
||||
mBindingParent = aDependentContent->GetBindingParent();
|
||||
nsIAtom* IDAttr = mBindingParent ?
|
||||
nsAtom* IDAttr = mBindingParent ?
|
||||
nsGkAtoms::anonid : nsGkAtoms::id;
|
||||
|
||||
nsAutoString id;
|
||||
@ -254,7 +254,7 @@ XULDescriptionIterator::Next()
|
||||
|
||||
IDRefsIterator::
|
||||
IDRefsIterator(DocAccessible* aDoc, nsIContent* aContent,
|
||||
nsIAtom* aIDRefsAttr) :
|
||||
nsAtom* aIDRefsAttr) :
|
||||
mContent(aContent), mDoc(aDoc), mCurrIdx(0)
|
||||
{
|
||||
if (mContent->IsInUncomposedDoc())
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
* pointed by
|
||||
*/
|
||||
RelatedAccIterator(DocAccessible* aDocument, nsIContent* aDependentContent,
|
||||
nsIAtom* aRelAttr);
|
||||
nsAtom* aRelAttr);
|
||||
|
||||
virtual ~RelatedAccIterator() { }
|
||||
|
||||
@ -99,7 +99,7 @@ private:
|
||||
RelatedAccIterator& operator = (const RelatedAccIterator&);
|
||||
|
||||
DocAccessible* mDocument;
|
||||
nsIAtom* mRelAttr;
|
||||
nsAtom* mRelAttr;
|
||||
DocAccessible::AttrRelProviderArray* mProviders;
|
||||
nsIContent* mBindingParent;
|
||||
uint32_t mIndex;
|
||||
@ -219,7 +219,7 @@ class IDRefsIterator : public AccIterable
|
||||
{
|
||||
public:
|
||||
IDRefsIterator(DocAccessible* aDoc, nsIContent* aContent,
|
||||
nsIAtom* aIDRefsAttr);
|
||||
nsAtom* aIDRefsAttr);
|
||||
virtual ~IDRefsIterator() { }
|
||||
|
||||
/**
|
||||
|
@ -853,7 +853,7 @@ logging::Node(const char* aDescr, nsINode* aNode)
|
||||
nsAutoCString tag;
|
||||
elm->NodeInfo()->NameAtom()->ToUTF8String(tag);
|
||||
|
||||
nsIAtom* idAtom = elm->GetID();
|
||||
nsAtom* idAtom = elm->GetID();
|
||||
nsAutoCString id;
|
||||
if (idAtom)
|
||||
idAtom->ToUTF8String(id);
|
||||
@ -919,7 +919,7 @@ logging::AccessibleInfo(const char* aDescr, Accessible* aAccessible)
|
||||
nsAutoCString tag;
|
||||
el->NodeInfo()->NameAtom()->ToUTF8String(tag);
|
||||
|
||||
nsIAtom* idAtom = el->GetID();
|
||||
nsAtom* idAtom = el->GetID();
|
||||
nsAutoCString id;
|
||||
if (idAtom) {
|
||||
idAtom->ToUTF8String(id);
|
||||
|
@ -25,7 +25,7 @@ using namespace mozilla::a11y;
|
||||
|
||||
void
|
||||
nsAccUtils::GetAccAttr(nsIPersistentProperties *aAttributes,
|
||||
nsIAtom *aAttrName, nsAString& aAttrValue)
|
||||
nsAtom *aAttrName, nsAString& aAttrValue)
|
||||
{
|
||||
aAttrValue.Truncate();
|
||||
|
||||
@ -34,7 +34,7 @@ nsAccUtils::GetAccAttr(nsIPersistentProperties *aAttributes,
|
||||
|
||||
void
|
||||
nsAccUtils::SetAccAttr(nsIPersistentProperties *aAttributes,
|
||||
nsIAtom *aAttrName, const nsAString& aAttrValue)
|
||||
nsAtom *aAttrName, const nsAString& aAttrValue)
|
||||
{
|
||||
nsAutoString oldValue;
|
||||
aAttributes->SetStringProperty(nsAtomCString(aAttrName), aAttrValue, oldValue);
|
||||
@ -42,7 +42,7 @@ nsAccUtils::SetAccAttr(nsIPersistentProperties *aAttributes,
|
||||
|
||||
void
|
||||
nsAccUtils::SetAccAttr(nsIPersistentProperties *aAttributes,
|
||||
nsIAtom* aAttrName, nsIAtom* aAttrValue)
|
||||
nsAtom* aAttrName, nsAtom* aAttrValue)
|
||||
{
|
||||
nsAutoString oldValue;
|
||||
aAttributes->SetStringProperty(nsAtomCString(aAttrName),
|
||||
@ -187,7 +187,7 @@ nsAccUtils::SetLiveContainerAttributes(nsIPersistentProperties *aAttributes,
|
||||
}
|
||||
|
||||
bool
|
||||
nsAccUtils::HasDefinedARIAToken(nsIContent *aContent, nsIAtom *aAtom)
|
||||
nsAccUtils::HasDefinedARIAToken(nsIContent *aContent, nsAtom *aAtom)
|
||||
{
|
||||
NS_ASSERTION(aContent, "aContent is null in call to HasDefinedARIAToken!");
|
||||
|
||||
@ -201,8 +201,8 @@ nsAccUtils::HasDefinedARIAToken(nsIContent *aContent, nsIAtom *aAtom)
|
||||
return true;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
nsAccUtils::GetARIAToken(dom::Element* aElement, nsIAtom* aAttr)
|
||||
nsAtom*
|
||||
nsAccUtils::GetARIAToken(dom::Element* aElement, nsAtom* aAttr)
|
||||
{
|
||||
if (!HasDefinedARIAToken(aElement, aAttr))
|
||||
return nsGkAtoms::_empty;
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
* @param aAttrValue - value of attribute
|
||||
*/
|
||||
static void GetAccAttr(nsIPersistentProperties *aAttributes,
|
||||
nsIAtom *aAttrName,
|
||||
nsAtom *aAttrName,
|
||||
nsAString& aAttrValue);
|
||||
|
||||
/**
|
||||
@ -47,12 +47,12 @@ public:
|
||||
* @param aAttrValue - new value of attribute
|
||||
*/
|
||||
static void SetAccAttr(nsIPersistentProperties *aAttributes,
|
||||
nsIAtom *aAttrName,
|
||||
nsAtom *aAttrName,
|
||||
const nsAString& aAttrValue);
|
||||
|
||||
static void SetAccAttr(nsIPersistentProperties *aAttributes,
|
||||
nsIAtom* aAttrName,
|
||||
nsIAtom* aAttrValue);
|
||||
nsAtom* aAttrName,
|
||||
nsAtom* aAttrValue);
|
||||
|
||||
/**
|
||||
* Set group attributes ('level', 'setsize', 'posinset').
|
||||
@ -95,12 +95,12 @@ public:
|
||||
*
|
||||
* Return true if the ARIA property is defined, otherwise false
|
||||
*/
|
||||
static bool HasDefinedARIAToken(nsIContent *aContent, nsIAtom *aAtom);
|
||||
static bool HasDefinedARIAToken(nsIContent *aContent, nsAtom *aAtom);
|
||||
|
||||
/**
|
||||
* Return atomic value of ARIA attribute of boolean or NMTOKEN type.
|
||||
*/
|
||||
static nsIAtom* GetARIAToken(mozilla::dom::Element* aElement, nsIAtom* aAttr);
|
||||
static nsAtom* GetARIAToken(mozilla::dom::Element* aElement, nsAtom* aAttr);
|
||||
|
||||
/**
|
||||
* Return document accessible for the given DOM node.
|
||||
|
@ -112,7 +112,7 @@ MustBeAccessible(nsIContent* aContent, DocAccessible* aDocument)
|
||||
for (uint32_t attrIdx = 0; attrIdx < attrCount; attrIdx++) {
|
||||
const nsAttrName* attr = aContent->GetAttrNameAt(attrIdx);
|
||||
if (attr->NamespaceEquals(kNameSpaceID_None)) {
|
||||
nsIAtom* attrAtom = attr->Atom();
|
||||
nsAtom* attrAtom = attr->Atom();
|
||||
nsDependentAtomString attrStr(attrAtom);
|
||||
if (!StringBeginsWith(attrStr, NS_LITERAL_STRING("aria-")))
|
||||
continue; // not ARIA
|
||||
|
@ -53,15 +53,15 @@ xpcAccessibleApplication* XPCApplicationAcc();
|
||||
typedef Accessible* (New_Accessible)(nsIContent* aContent, Accessible* aContext);
|
||||
|
||||
struct MarkupAttrInfo {
|
||||
nsIAtom** name;
|
||||
nsIAtom** value;
|
||||
nsAtom** name;
|
||||
nsAtom** value;
|
||||
|
||||
nsIAtom** DOMAttrName;
|
||||
nsIAtom** DOMAttrValue;
|
||||
nsAtom** DOMAttrName;
|
||||
nsAtom** DOMAttrValue;
|
||||
};
|
||||
|
||||
struct MarkupMapInfo {
|
||||
nsIAtom** tag;
|
||||
nsAtom** tag;
|
||||
New_Accessible* new_func;
|
||||
a11y::role role;
|
||||
MarkupAttrInfo attrs[4];
|
||||
@ -310,7 +310,7 @@ private:
|
||||
*/
|
||||
static uint32_t gConsumers;
|
||||
|
||||
nsDataHashtable<nsPtrHashKey<const nsIAtom>, const mozilla::a11y::MarkupMapInfo*> mMarkupMaps;
|
||||
nsDataHashtable<nsPtrHashKey<const nsAtom>, const mozilla::a11y::MarkupMapInfo*> mMarkupMaps;
|
||||
|
||||
friend nsAccessibilityService* GetAccService();
|
||||
friend nsAccessibilityService* GetOrCreateAccService(uint32_t);
|
||||
|
@ -459,7 +459,7 @@ nsCoreUtils::GetID(nsIContent *aContent, nsAString& aID)
|
||||
}
|
||||
|
||||
bool
|
||||
nsCoreUtils::GetUIntAttr(nsIContent *aContent, nsIAtom *aAttr, int32_t *aUInt)
|
||||
nsCoreUtils::GetUIntAttr(nsIContent *aContent, nsAtom *aAttr, int32_t *aUInt)
|
||||
{
|
||||
nsAutoString value;
|
||||
aContent->GetAttr(kNameSpaceID_None, aAttr, value);
|
||||
|
@ -220,7 +220,7 @@ public:
|
||||
* Convert attribute value of the given node to positive integer. If no
|
||||
* attribute or wrong value then false is returned.
|
||||
*/
|
||||
static bool GetUIntAttr(nsIContent *aContent, nsIAtom *aAttr,
|
||||
static bool GetUIntAttr(nsIContent *aContent, nsAtom *aAttr,
|
||||
int32_t* aUInt);
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ nsTextEquivUtils::GetNameFromSubtree(Accessible* aAccessible,
|
||||
|
||||
nsresult
|
||||
nsTextEquivUtils::GetTextEquivFromIDRefs(Accessible* aAccessible,
|
||||
nsIAtom *aIDRefsAttr,
|
||||
nsAtom *aIDRefsAttr,
|
||||
nsAString& aTextEquiv)
|
||||
{
|
||||
aTextEquiv.Truncate();
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
* @param aTextEquiv [out] result text equivalent
|
||||
*/
|
||||
static nsresult GetTextEquivFromIDRefs(Accessible* aAccessible,
|
||||
nsIAtom *aIDRefsAttr,
|
||||
nsAtom *aIDRefsAttr,
|
||||
nsAString& aTextEquiv);
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,7 @@ Accessible::HasARIARole() const
|
||||
}
|
||||
|
||||
inline bool
|
||||
Accessible::IsARIARole(nsIAtom* aARIARole) const
|
||||
Accessible::IsARIARole(nsAtom* aARIARole) const
|
||||
{
|
||||
const nsRoleMapEntry* roleMapEntry = ARIARoleMap();
|
||||
return roleMapEntry && roleMapEntry->Is(aARIARole);
|
||||
|
@ -61,7 +61,7 @@
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "prdtoa.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsArrayUtils.h"
|
||||
#include "nsIMutableArray.h"
|
||||
@ -935,7 +935,7 @@ Accessible::Attributes()
|
||||
return attributes.forget();
|
||||
|
||||
// 'xml-roles' attribute for landmark.
|
||||
nsIAtom* landmark = LandmarkRole();
|
||||
nsAtom* landmark = LandmarkRole();
|
||||
if (landmark) {
|
||||
nsAccUtils::SetAccAttr(attributes, nsGkAtoms::xmlroles, landmark);
|
||||
|
||||
@ -1485,7 +1485,7 @@ Accessible::ARIATransformRole(role aRole)
|
||||
return aRole;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
nsAtom*
|
||||
Accessible::LandmarkRole() const
|
||||
{
|
||||
const nsRoleMapEntry* roleMapEntry = ARIARoleMap();
|
||||
@ -2566,7 +2566,7 @@ Accessible::CurrentItem()
|
||||
void
|
||||
Accessible::SetCurrentItem(Accessible* aItem)
|
||||
{
|
||||
nsIAtom* id = aItem->GetContent()->GetID();
|
||||
nsAtom* id = aItem->GetContent()->GetID();
|
||||
if (id) {
|
||||
nsAutoString idStr;
|
||||
id->ToString(idStr);
|
||||
@ -2649,7 +2649,7 @@ Accessible::GetSiblingAtOffset(int32_t aOffset, nsresult* aError) const
|
||||
}
|
||||
|
||||
double
|
||||
Accessible::AttrNumericValue(nsIAtom* aAttr) const
|
||||
Accessible::AttrNumericValue(nsAtom* aAttr) const
|
||||
{
|
||||
const nsRoleMapEntry* roleMapEntry = ARIARoleMap();
|
||||
if (!roleMapEntry || roleMapEntry->valueRule == eNoValue)
|
||||
|
@ -24,7 +24,7 @@ struct nsRoleMapEntry;
|
||||
|
||||
struct nsRect;
|
||||
class nsIFrame;
|
||||
class nsIAtom;
|
||||
class nsAtom;
|
||||
class nsIPersistentProperties;
|
||||
|
||||
namespace mozilla {
|
||||
@ -232,7 +232,7 @@ public:
|
||||
* Return true if ARIA role is specified on the element.
|
||||
*/
|
||||
bool HasARIARole() const;
|
||||
bool IsARIARole(nsIAtom* aARIARole) const;
|
||||
bool IsARIARole(nsAtom* aARIARole) const;
|
||||
bool HasStrongARIARole() const;
|
||||
|
||||
/**
|
||||
@ -249,7 +249,7 @@ public:
|
||||
/**
|
||||
* Return a landmark role if applied.
|
||||
*/
|
||||
virtual nsIAtom* LandmarkRole() const;
|
||||
virtual nsAtom* LandmarkRole() const;
|
||||
|
||||
/**
|
||||
* Returns enumerated accessible role from native markup (see constants in
|
||||
@ -1109,7 +1109,7 @@ protected:
|
||||
* @param aARIAProperty [in] the ARIA property we're using
|
||||
* @return a numeric value
|
||||
*/
|
||||
double AttrNumericValue(nsIAtom* aARIAAttr) const;
|
||||
double AttrNumericValue(nsAtom* aARIAAttr) const;
|
||||
|
||||
/**
|
||||
* Return the action rule based on ARIA enum constants EActionRule
|
||||
|
@ -62,7 +62,7 @@ using namespace mozilla::a11y;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Static member initialization
|
||||
|
||||
static nsIAtom** kRelationAttrs[] =
|
||||
static nsAtom** kRelationAttrs[] =
|
||||
{
|
||||
&nsGkAtoms::aria_labelledby,
|
||||
&nsGkAtoms::aria_describedby,
|
||||
@ -715,7 +715,7 @@ void
|
||||
DocAccessible::AttributeWillChange(nsIDocument* aDocument,
|
||||
dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute, int32_t aModType,
|
||||
nsAtom* aAttribute, int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
Accessible* accessible = GetAccessible(aElement);
|
||||
@ -767,7 +767,7 @@ DocAccessible::NativeAnonymousChildListChange(nsIDocument* aDocument,
|
||||
void
|
||||
DocAccessible::AttributeChanged(nsIDocument* aDocument,
|
||||
dom::Element* aElement,
|
||||
int32_t aNameSpaceID, nsIAtom* aAttribute,
|
||||
int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue)
|
||||
{
|
||||
@ -813,7 +813,7 @@ DocAccessible::AttributeChanged(nsIDocument* aDocument,
|
||||
// DocAccessible protected member
|
||||
void
|
||||
DocAccessible::AttributeChangedImpl(Accessible* aAccessible,
|
||||
int32_t aNameSpaceID, nsIAtom* aAttribute)
|
||||
int32_t aNameSpaceID, nsAtom* aAttribute)
|
||||
{
|
||||
// Fire accessible event after short timer, because we need to wait for
|
||||
// DOM attribute & resulting layout to actually change. Otherwise,
|
||||
@ -952,7 +952,7 @@ DocAccessible::AttributeChangedImpl(Accessible* aAccessible,
|
||||
|
||||
// DocAccessible protected member
|
||||
void
|
||||
DocAccessible::ARIAAttributeChanged(Accessible* aAccessible, nsIAtom* aAttribute)
|
||||
DocAccessible::ARIAAttributeChanged(Accessible* aAccessible, nsAtom* aAttribute)
|
||||
{
|
||||
// Note: For universal/global ARIA states and properties we don't care if
|
||||
// there is an ARIA role present or not.
|
||||
@ -1580,14 +1580,14 @@ DocAccessible::ProcessLoad()
|
||||
}
|
||||
|
||||
void
|
||||
DocAccessible::AddDependentIDsFor(Accessible* aRelProvider, nsIAtom* aRelAttr)
|
||||
DocAccessible::AddDependentIDsFor(Accessible* aRelProvider, nsAtom* aRelAttr)
|
||||
{
|
||||
dom::Element* relProviderEl = aRelProvider->Elm();
|
||||
if (!relProviderEl)
|
||||
return;
|
||||
|
||||
for (uint32_t idx = 0; idx < kRelationAttrsLen; idx++) {
|
||||
nsIAtom* relAttr = *kRelationAttrs[idx];
|
||||
nsAtom* relAttr = *kRelationAttrs[idx];
|
||||
if (aRelAttr && aRelAttr != relAttr)
|
||||
continue;
|
||||
|
||||
@ -1652,14 +1652,14 @@ DocAccessible::AddDependentIDsFor(Accessible* aRelProvider, nsIAtom* aRelAttr)
|
||||
|
||||
void
|
||||
DocAccessible::RemoveDependentIDsFor(Accessible* aRelProvider,
|
||||
nsIAtom* aRelAttr)
|
||||
nsAtom* aRelAttr)
|
||||
{
|
||||
dom::Element* relProviderElm = aRelProvider->Elm();
|
||||
if (!relProviderElm)
|
||||
return;
|
||||
|
||||
for (uint32_t idx = 0; idx < kRelationAttrsLen; idx++) {
|
||||
nsIAtom* relAttr = *kRelationAttrs[idx];
|
||||
nsAtom* relAttr = *kRelationAttrs[idx];
|
||||
if (aRelAttr && aRelAttr != *kRelationAttrs[idx])
|
||||
continue;
|
||||
|
||||
@ -1693,7 +1693,7 @@ DocAccessible::RemoveDependentIDsFor(Accessible* aRelProvider,
|
||||
|
||||
bool
|
||||
DocAccessible::UpdateAccessibleOnAttrChange(dom::Element* aElement,
|
||||
nsIAtom* aAttribute)
|
||||
nsAtom* aAttribute)
|
||||
{
|
||||
if (aAttribute == nsGkAtoms::role) {
|
||||
// It is common for js libraries to set the role on the body element after
|
||||
|
@ -448,7 +448,7 @@ protected:
|
||||
* @param aRelAttr [in, optional] relation attribute
|
||||
*/
|
||||
void AddDependentIDsFor(Accessible* aRelProvider,
|
||||
nsIAtom* aRelAttr = nullptr);
|
||||
nsAtom* aRelAttr = nullptr);
|
||||
|
||||
/**
|
||||
* Remove dependent IDs pointed by accessible element by relation attribute
|
||||
@ -459,7 +459,7 @@ protected:
|
||||
* @param aRelAttr [in, optional] relation attribute
|
||||
*/
|
||||
void RemoveDependentIDsFor(Accessible* aRelProvider,
|
||||
nsIAtom* aRelAttr = nullptr);
|
||||
nsAtom* aRelAttr = nullptr);
|
||||
|
||||
/**
|
||||
* Update or recreate an accessible depending on a changed attribute.
|
||||
@ -469,7 +469,7 @@ protected:
|
||||
* @return true if an action was taken on the attribute change
|
||||
*/
|
||||
bool UpdateAccessibleOnAttrChange(mozilla::dom::Element* aElement,
|
||||
nsIAtom* aAttribute);
|
||||
nsAtom* aAttribute);
|
||||
|
||||
/**
|
||||
* Fire accessible events when attribute is changed.
|
||||
@ -479,7 +479,7 @@ protected:
|
||||
* @param aAttribute [in] changed attribute
|
||||
*/
|
||||
void AttributeChangedImpl(Accessible* aAccessible,
|
||||
int32_t aNameSpaceID, nsIAtom* aAttribute);
|
||||
int32_t aNameSpaceID, nsAtom* aAttribute);
|
||||
|
||||
/**
|
||||
* Fire accessible events when ARIA attribute is changed.
|
||||
@ -487,7 +487,7 @@ protected:
|
||||
* @param aAccessible [in] accesislbe the DOM attribute is changed for
|
||||
* @param aAttribute [in] changed attribute
|
||||
*/
|
||||
void ARIAAttributeChanged(Accessible* aAccessible, nsIAtom* aAttribute);
|
||||
void ARIAAttributeChanged(Accessible* aAccessible, nsAtom* aAttribute);
|
||||
|
||||
/**
|
||||
* Process ARIA active-descendant attribute change.
|
||||
@ -626,7 +626,7 @@ protected:
|
||||
*/
|
||||
union {
|
||||
// ARIA attribute value
|
||||
nsIAtom* mARIAAttrOldValue;
|
||||
nsAtom* mARIAAttrOldValue;
|
||||
|
||||
// True if the accessible state bit was on
|
||||
bool mStateBitWasOn;
|
||||
@ -645,10 +645,10 @@ protected:
|
||||
class AttrRelProvider
|
||||
{
|
||||
public:
|
||||
AttrRelProvider(nsIAtom* aRelAttr, nsIContent* aContent) :
|
||||
AttrRelProvider(nsAtom* aRelAttr, nsIContent* aContent) :
|
||||
mRelAttr(aRelAttr), mContent(aContent) { }
|
||||
|
||||
nsIAtom* mRelAttr;
|
||||
nsAtom* mRelAttr;
|
||||
nsCOMPtr<nsIContent> mContent;
|
||||
|
||||
private:
|
||||
|
@ -1130,7 +1130,7 @@ HyperTextAccessible::NativeAttributes()
|
||||
return attributes.forget();
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
nsAtom*
|
||||
HyperTextAccessible::LandmarkRole() const
|
||||
{
|
||||
if (!HasOwnContent())
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// Accessible
|
||||
virtual nsIAtom* LandmarkRole() const override;
|
||||
virtual nsAtom* LandmarkRole() const override;
|
||||
virtual int32_t GetLevelInternal() override;
|
||||
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
|
||||
virtual mozilla::a11y::role NativeRole() override;
|
||||
|
@ -241,7 +241,7 @@ HTMLHeaderOrFooterAccessible::NativeRole()
|
||||
return roles::SECTION;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
nsAtom*
|
||||
HTMLHeaderOrFooterAccessible::LandmarkRole() const
|
||||
{
|
||||
if (!HasOwnContent())
|
||||
|
@ -127,7 +127,7 @@ public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// Accessible
|
||||
virtual nsIAtom* LandmarkRole() const override;
|
||||
virtual nsAtom* LandmarkRole() const override;
|
||||
virtual a11y::role NativeRole() override;
|
||||
|
||||
protected:
|
||||
|
@ -60,9 +60,9 @@ void Relations(nsTArray<RelationType>* aTypes,
|
||||
|
||||
bool IsSearchbox() const;
|
||||
|
||||
nsIAtom* LandmarkRole() const;
|
||||
nsAtom* LandmarkRole() const;
|
||||
|
||||
nsIAtom* ARIARoleAtom() const;
|
||||
nsAtom* ARIARoleAtom() const;
|
||||
|
||||
int32_t GetLevelInternal();
|
||||
void ScrollTo(uint32_t aScrollType);
|
||||
|
@ -277,7 +277,7 @@ DocAccessibleChild::RecvLandmarkRole(const uint64_t& aID, nsString* aLandmark)
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
if (nsIAtom* roleAtom = acc->LandmarkRole()) {
|
||||
if (nsAtom* roleAtom = acc->LandmarkRole()) {
|
||||
roleAtom->ToString(*aLandmark);
|
||||
}
|
||||
|
||||
@ -293,7 +293,7 @@ DocAccessibleChild::RecvARIARoleAtom(const uint64_t& aID, nsString* aRole)
|
||||
}
|
||||
|
||||
if (const nsRoleMapEntry* roleMap = acc->ARIARoleMap()) {
|
||||
if (nsIAtom* roleAtom = *(roleMap->roleAtom)) {
|
||||
if (nsAtom* roleAtom = *(roleMap->roleAtom)) {
|
||||
roleAtom->ToString(*aRole);
|
||||
}
|
||||
}
|
||||
@ -1996,7 +1996,7 @@ DocAccessibleChild::RecvDOMNodeID(const uint64_t& aID, nsString* aDOMNodeID)
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
nsIAtom* id = content->GetID();
|
||||
nsAtom* id = content->GetID();
|
||||
if (id) {
|
||||
id->ToString(*aDOMNodeID);
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ ProxyAccessible::IsSearchbox() const
|
||||
return retVal;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
nsAtom*
|
||||
ProxyAccessible::LandmarkRole() const
|
||||
{
|
||||
nsString landmark;
|
||||
@ -127,7 +127,7 @@ ProxyAccessible::LandmarkRole() const
|
||||
return NS_GetStaticAtom(landmark);
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
nsAtom*
|
||||
ProxyAccessible::ARIARoleAtom() const
|
||||
{
|
||||
nsString role;
|
||||
|
@ -733,7 +733,7 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
|
||||
ProxyAccessible* proxy = [self getProxyAccessible];
|
||||
|
||||
// Deal with landmarks first
|
||||
nsIAtom* landmark = nullptr;
|
||||
nsAtom* landmark = nullptr;
|
||||
if (accWrap)
|
||||
landmark = accWrap->LandmarkRole();
|
||||
else if (proxy)
|
||||
@ -770,7 +770,7 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
|
||||
return @"AXLandmarkRegion";
|
||||
|
||||
// Now, deal with widget roles
|
||||
nsIAtom* roleAtom = nullptr;
|
||||
nsAtom* roleAtom = nullptr;
|
||||
if (accWrap && accWrap->HasARIARole()) {
|
||||
const nsRoleMapEntry* roleMap = accWrap->ARIARoleMap();
|
||||
roleAtom = *roleMap->roleAtom;
|
||||
|
@ -28,7 +28,7 @@ GeckoCustom::get_DOMNodeID(BSTR* aID)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
nsIAtom* id = content->GetID();
|
||||
nsAtom* id = content->GetID();
|
||||
if (id) {
|
||||
nsAutoString idStr;
|
||||
id->ToString(idStr);
|
||||
|
@ -143,7 +143,7 @@ XULSliderAccessible::GetSliderElement() const
|
||||
}
|
||||
|
||||
nsresult
|
||||
XULSliderAccessible::GetSliderAttr(nsIAtom* aName, nsAString& aValue) const
|
||||
XULSliderAccessible::GetSliderAttr(nsAtom* aName, nsAString& aValue) const
|
||||
{
|
||||
aValue.Truncate();
|
||||
|
||||
@ -158,7 +158,7 @@ XULSliderAccessible::GetSliderAttr(nsIAtom* aName, nsAString& aValue) const
|
||||
}
|
||||
|
||||
nsresult
|
||||
XULSliderAccessible::SetSliderAttr(nsIAtom* aName, const nsAString& aValue)
|
||||
XULSliderAccessible::SetSliderAttr(nsAtom* aName, const nsAString& aValue)
|
||||
{
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -171,7 +171,7 @@ XULSliderAccessible::SetSliderAttr(nsIAtom* aName, const nsAString& aValue)
|
||||
}
|
||||
|
||||
double
|
||||
XULSliderAccessible::GetSliderAttr(nsIAtom* aName) const
|
||||
XULSliderAccessible::GetSliderAttr(nsAtom* aName) const
|
||||
{
|
||||
nsAutoString attrValue;
|
||||
nsresult rv = GetSliderAttr(aName, attrValue);
|
||||
@ -184,7 +184,7 @@ XULSliderAccessible::GetSliderAttr(nsIAtom* aName) const
|
||||
}
|
||||
|
||||
bool
|
||||
XULSliderAccessible::SetSliderAttr(nsIAtom* aName, double aValue)
|
||||
XULSliderAccessible::SetSliderAttr(nsAtom* aName, double aValue)
|
||||
{
|
||||
nsAutoString value;
|
||||
value.AppendFloat(aValue);
|
||||
|
@ -45,11 +45,11 @@ protected:
|
||||
*/
|
||||
nsIContent* GetSliderElement() const;
|
||||
|
||||
nsresult GetSliderAttr(nsIAtom *aName, nsAString& aValue) const;
|
||||
nsresult SetSliderAttr(nsIAtom *aName, const nsAString& aValue);
|
||||
nsresult GetSliderAttr(nsAtom *aName, nsAString& aValue) const;
|
||||
nsresult SetSliderAttr(nsAtom *aName, const nsAString& aValue);
|
||||
|
||||
double GetSliderAttr(nsIAtom *aName) const;
|
||||
bool SetSliderAttr(nsIAtom *aName, double aValue);
|
||||
double GetSliderAttr(nsAtom *aName) const;
|
||||
bool SetSliderAttr(nsAtom *aName, double aValue);
|
||||
|
||||
private:
|
||||
mutable nsCOMPtr<nsIContent> mSliderNode;
|
||||
|
@ -349,7 +349,7 @@ BasePrincipal::AddonPolicy()
|
||||
}
|
||||
|
||||
bool
|
||||
BasePrincipal::AddonHasPermission(const nsIAtom* aPerm)
|
||||
BasePrincipal::AddonHasPermission(const nsAtom* aPerm)
|
||||
{
|
||||
if (auto policy = AddonPolicy()) {
|
||||
return policy->HasPermission(aPerm);
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/OriginAttributes.h"
|
||||
|
||||
class nsIAtom;
|
||||
class nsAtom;
|
||||
class nsIContentSecurityPolicy;
|
||||
class nsIObjectOutputStream;
|
||||
class nsIObjectInputStream;
|
||||
@ -86,7 +86,7 @@ public:
|
||||
NS_IMETHOD GetUserContextId(uint32_t* aUserContextId) final;
|
||||
NS_IMETHOD GetPrivateBrowsingId(uint32_t* aPrivateBrowsingId) final;
|
||||
|
||||
virtual bool AddonHasPermission(const nsIAtom* aPerm);
|
||||
virtual bool AddonHasPermission(const nsAtom* aPerm);
|
||||
|
||||
virtual bool IsCodebasePrincipal() const { return false; };
|
||||
|
||||
@ -158,8 +158,8 @@ private:
|
||||
CreateCodebasePrincipal(nsIURI* aURI, const OriginAttributes& aAttrs,
|
||||
const nsACString& aOriginNoSuffix);
|
||||
|
||||
RefPtr<nsIAtom> mOriginNoSuffix;
|
||||
RefPtr<nsIAtom> mOriginSuffix;
|
||||
RefPtr<nsAtom> mOriginNoSuffix;
|
||||
RefPtr<nsAtom> mOriginSuffix;
|
||||
|
||||
OriginAttributes mOriginAttributes;
|
||||
PrincipalKind mKind;
|
||||
|
@ -172,7 +172,7 @@ ExpandedPrincipal::GetAddonId(nsAString& aAddonId)
|
||||
};
|
||||
|
||||
bool
|
||||
ExpandedPrincipal::AddonHasPermission(const nsIAtom* aPerm)
|
||||
ExpandedPrincipal::AddonHasPermission(const nsAtom* aPerm)
|
||||
{
|
||||
for (size_t i = 0; i < mPrincipals.Length(); ++i) {
|
||||
if (BasePrincipal::Cast(mPrincipals[i])->AddonHasPermission(aPerm)) {
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
NS_IMETHOD SetDomain(nsIURI* aDomain) override;
|
||||
NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) override;
|
||||
NS_IMETHOD GetAddonId(nsAString& aAddonId) override;
|
||||
virtual bool AddonHasPermission(const nsIAtom* aPerm) override;
|
||||
virtual bool AddonHasPermission(const nsAtom* aPerm) override;
|
||||
virtual nsresult GetScriptLocation(nsACString &aStr) override;
|
||||
|
||||
protected:
|
||||
|
@ -362,7 +362,7 @@ ForEachPing(nsIContent* aContent, ForEachPingCallback aCallback, void* aClosure)
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<nsIAtom> pingAtom = NS_Atomize("ping");
|
||||
RefPtr<nsAtom> pingAtom = NS_Atomize("ping");
|
||||
if (!pingAtom) {
|
||||
return;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
@ -274,7 +274,7 @@ void
|
||||
nsSHEntryShared::AttributeWillChange(nsIDocument* aDocument,
|
||||
dom::Element* aContent,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
nsAtom* aAttribute,
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
@ -291,7 +291,7 @@ void
|
||||
nsSHEntryShared::AttributeChanged(nsIDocument* aDocument,
|
||||
dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
nsAtom* aAttribute,
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue)
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "AnimationUtils.h"
|
||||
|
||||
#include "nsDebug.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
@ -27,7 +27,7 @@ AnimationUtils::LogAsyncAnimationFailure(nsCString& aMessage,
|
||||
aMessage.AppendLiteral(" [");
|
||||
aMessage.Append(nsAtomCString(aContent->NodeInfo()->NameAtom()));
|
||||
|
||||
nsIAtom* id = aContent->GetID();
|
||||
nsAtom* id = aContent->GetID();
|
||||
if (id) {
|
||||
aMessage.AppendLiteral(" with id '");
|
||||
aMessage.Append(nsAtomCString(aContent->GetID()));
|
||||
|
@ -82,7 +82,7 @@ CSSPseudoElement::GetCSSPseudoElement(Element* aElement,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsIAtom* propName = CSSPseudoElement::GetCSSPseudoElementPropertyAtom(aType);
|
||||
nsAtom* propName = CSSPseudoElement::GetCSSPseudoElementPropertyAtom(aType);
|
||||
RefPtr<CSSPseudoElement> pseudo =
|
||||
static_cast<CSSPseudoElement*>(aElement->GetProperty(propName));
|
||||
if (pseudo) {
|
||||
@ -102,7 +102,7 @@ CSSPseudoElement::GetCSSPseudoElement(Element* aElement,
|
||||
return pseudo.forget();
|
||||
}
|
||||
|
||||
/* static */ nsIAtom*
|
||||
/* static */ nsAtom*
|
||||
CSSPseudoElement::GetCSSPseudoElementPropertyAtom(CSSPseudoElementType aType)
|
||||
{
|
||||
switch (aType) {
|
||||
|
@ -76,7 +76,7 @@ private:
|
||||
// Only ::before and ::after are supported.
|
||||
CSSPseudoElement(Element* aElement, CSSPseudoElementType aType);
|
||||
|
||||
static nsIAtom* GetCSSPseudoElementPropertyAtom(CSSPseudoElementType aType);
|
||||
static nsAtom* GetCSSPseudoElementPropertyAtom(CSSPseudoElementType aType);
|
||||
|
||||
// mParentElement needs to be an owning reference since if script is holding
|
||||
// on to the pseudo-element, it needs to continue to be able to refer to
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "nsCSSPseudoElements.h"
|
||||
#include "nsCSSPropertyIDSet.h"
|
||||
#include "nsCSSProps.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIPresShellInlines.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "nsTArray.h"
|
||||
|
||||
class nsCSSPropertyIDSet;
|
||||
class nsIAtom;
|
||||
class nsAtom;
|
||||
class nsIFrame;
|
||||
class nsIStyleRule;
|
||||
class nsPresContext;
|
||||
|
@ -16,7 +16,7 @@
|
||||
namespace mozilla {
|
||||
|
||||
/* static */ void
|
||||
EffectSet::PropertyDtor(void* aObject, nsIAtom* aPropertyName,
|
||||
EffectSet::PropertyDtor(void* aObject, nsAtom* aPropertyName,
|
||||
void* aPropertyValue, void* aData)
|
||||
{
|
||||
EffectSet* effectSet = static_cast<EffectSet*>(aPropertyValue);
|
||||
@ -46,7 +46,7 @@ EffectSet::GetEffectSet(const dom::Element* aElement,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsIAtom* propName = GetEffectSetPropertyAtom(aPseudoType);
|
||||
nsAtom* propName = GetEffectSetPropertyAtom(aPseudoType);
|
||||
return static_cast<EffectSet*>(aElement->GetProperty(propName));
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ EffectSet::GetOrCreateEffectSet(dom::Element* aElement,
|
||||
return effectSet;
|
||||
}
|
||||
|
||||
nsIAtom* propName = GetEffectSetPropertyAtom(aPseudoType);
|
||||
nsAtom* propName = GetEffectSetPropertyAtom(aPseudoType);
|
||||
effectSet = new EffectSet();
|
||||
|
||||
nsresult rv = aElement->SetProperty(propName, effectSet,
|
||||
@ -94,7 +94,7 @@ EffectSet::GetOrCreateEffectSet(dom::Element* aElement,
|
||||
EffectSet::DestroyEffectSet(dom::Element* aElement,
|
||||
CSSPseudoElementType aPseudoType)
|
||||
{
|
||||
nsIAtom* propName = GetEffectSetPropertyAtom(aPseudoType);
|
||||
nsAtom* propName = GetEffectSetPropertyAtom(aPseudoType);
|
||||
EffectSet* effectSet =
|
||||
static_cast<EffectSet*>(aElement->GetProperty(propName));
|
||||
if (!effectSet) {
|
||||
@ -115,10 +115,10 @@ EffectSet::UpdateAnimationGeneration(nsPresContext* aPresContext)
|
||||
aPresContext->RestyleManager()->GetAnimationGeneration();
|
||||
}
|
||||
|
||||
/* static */ nsIAtom**
|
||||
/* static */ nsAtom**
|
||||
EffectSet::GetEffectSetPropertyAtoms()
|
||||
{
|
||||
static nsIAtom* effectSetPropertyAtoms[] =
|
||||
static nsAtom* effectSetPropertyAtoms[] =
|
||||
{
|
||||
nsGkAtoms::animationEffectsProperty,
|
||||
nsGkAtoms::animationEffectsForBeforeProperty,
|
||||
@ -129,7 +129,7 @@ EffectSet::GetEffectSetPropertyAtoms()
|
||||
return effectSetPropertyAtoms;
|
||||
}
|
||||
|
||||
/* static */ nsIAtom*
|
||||
/* static */ nsAtom*
|
||||
EffectSet::GetEffectSetPropertyAtom(CSSPseudoElementType aPseudoType)
|
||||
{
|
||||
switch (aPseudoType) {
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
"enumerated");
|
||||
MOZ_COUNT_DTOR(EffectSet);
|
||||
}
|
||||
static void PropertyDtor(void* aObject, nsIAtom* aPropertyName,
|
||||
static void PropertyDtor(void* aObject, nsAtom* aPropertyName,
|
||||
void* aPropertyValue, void* aData);
|
||||
|
||||
// Methods for supporting cycle-collection
|
||||
@ -192,7 +192,7 @@ public:
|
||||
void UpdateAnimationGeneration(nsPresContext* aPresContext);
|
||||
uint64_t GetAnimationGeneration() const { return mAnimationGeneration; }
|
||||
|
||||
static nsIAtom** GetEffectSetPropertyAtoms();
|
||||
static nsAtom** GetEffectSetPropertyAtoms();
|
||||
|
||||
nsCSSPropertyIDSet& PropertiesWithImportantRules()
|
||||
{
|
||||
@ -208,7 +208,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
static nsIAtom* GetEffectSetPropertyAtom(CSSPseudoElementType aPseudoType);
|
||||
static nsAtom* GetEffectSetPropertyAtom(CSSPseudoElementType aPseudoType);
|
||||
|
||||
OwningEffectSet mEffects;
|
||||
|
||||
|
@ -1026,7 +1026,7 @@ KeyframeEffectReadOnly::GetTargetStyleContext()
|
||||
MOZ_ASSERT(mTarget,
|
||||
"Should only have a presshell when we have a target element");
|
||||
|
||||
nsIAtom* pseudo = mTarget->mPseudoType < CSSPseudoElementType::Count
|
||||
nsAtom* pseudo = mTarget->mPseudoType < CSSPseudoElementType::Count
|
||||
? nsCSSPseudoElements::GetPseudoAtom(mTarget->mPseudoType)
|
||||
: nullptr;
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "mozilla/ipc/PBackgroundChild.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIIPCBackgroundChildCreateCallback.h"
|
||||
#include "nsIPrincipal.h"
|
||||
|
@ -187,13 +187,13 @@ Element*
|
||||
AnonymousContent::GetElementById(const nsAString& aElementId)
|
||||
{
|
||||
// This can be made faster in the future if needed.
|
||||
RefPtr<nsIAtom> elementId = NS_Atomize(aElementId);
|
||||
RefPtr<nsAtom> elementId = NS_Atomize(aElementId);
|
||||
for (nsIContent* node = mContentNode; node;
|
||||
node = node->GetNextNode(mContentNode)) {
|
||||
if (!node->IsElement()) {
|
||||
continue;
|
||||
}
|
||||
nsIAtom* id = node->AsElement()->GetID();
|
||||
nsAtom* id = node->AsElement()->GetID();
|
||||
if (id && id == elementId) {
|
||||
return node->AsElement();
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ Attr::GetValue(nsAString& aValue)
|
||||
{
|
||||
Element* element = GetElement();
|
||||
if (element) {
|
||||
RefPtr<nsIAtom> nameAtom = mNodeInfo->NameAtom();
|
||||
RefPtr<nsAtom> nameAtom = mNodeInfo->NameAtom();
|
||||
element->GetAttr(mNodeInfo->NamespaceID(), nameAtom, aValue);
|
||||
}
|
||||
else {
|
||||
@ -183,7 +183,7 @@ Attr::SetValue(const nsAString& aValue, ErrorResult& aRv)
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<nsIAtom> nameAtom = mNodeInfo->NameAtom();
|
||||
RefPtr<nsAtom> nameAtom = mNodeInfo->NameAtom();
|
||||
aRv = element->SetAttr(mNodeInfo->NamespaceID(),
|
||||
nameAtom,
|
||||
mNodeInfo->GetPrefixAtom(),
|
||||
|
@ -127,12 +127,12 @@ CustomElementConstructor::Construct(const char* aExecutionReason,
|
||||
//-----------------------------------------------------
|
||||
// CustomElementData
|
||||
|
||||
CustomElementData::CustomElementData(nsIAtom* aType)
|
||||
CustomElementData::CustomElementData(nsAtom* aType)
|
||||
: CustomElementData(aType, CustomElementData::State::eUndefined)
|
||||
{
|
||||
}
|
||||
|
||||
CustomElementData::CustomElementData(nsIAtom* aType, State aState)
|
||||
CustomElementData::CustomElementData(nsAtom* aType, State aState)
|
||||
: mType(aType)
|
||||
, mElementIsBeingCreated(false)
|
||||
, mCreatedCallbackInvoked(true)
|
||||
@ -230,8 +230,8 @@ CustomElementDefinition*
|
||||
CustomElementRegistry::LookupCustomElementDefinition(const nsAString& aLocalName,
|
||||
const nsAString* aIs) const
|
||||
{
|
||||
RefPtr<nsIAtom> localNameAtom = NS_Atomize(aLocalName);
|
||||
RefPtr<nsIAtom> typeAtom = aIs ? NS_Atomize(*aIs) : localNameAtom;
|
||||
RefPtr<nsAtom> localNameAtom = NS_Atomize(aLocalName);
|
||||
RefPtr<nsAtom> typeAtom = aIs ? NS_Atomize(*aIs) : localNameAtom;
|
||||
|
||||
CustomElementDefinition* data = mCustomDefinitions.GetWeak(typeAtom);
|
||||
if (data && data->mLocalName == localNameAtom) {
|
||||
@ -259,14 +259,14 @@ CustomElementRegistry::LookupCustomElementDefinition(JSContext* aCx,
|
||||
}
|
||||
|
||||
void
|
||||
CustomElementRegistry::RegisterUnresolvedElement(Element* aElement, nsIAtom* aTypeName)
|
||||
CustomElementRegistry::RegisterUnresolvedElement(Element* aElement, nsAtom* aTypeName)
|
||||
{
|
||||
mozilla::dom::NodeInfo* info = aElement->NodeInfo();
|
||||
|
||||
// Candidate may be a custom element through extension,
|
||||
// in which case the custom element type name will not
|
||||
// match the element tag name. e.g. <button is="x-button">.
|
||||
RefPtr<nsIAtom> typeName = aTypeName;
|
||||
RefPtr<nsAtom> typeName = aTypeName;
|
||||
if (!typeName) {
|
||||
typeName = info->NameAtom();
|
||||
}
|
||||
@ -285,8 +285,8 @@ void
|
||||
CustomElementRegistry::SetupCustomElement(Element* aElement,
|
||||
const nsAString* aTypeExtension)
|
||||
{
|
||||
RefPtr<nsIAtom> tagAtom = aElement->NodeInfo()->NameAtom();
|
||||
RefPtr<nsIAtom> typeAtom = aTypeExtension ?
|
||||
RefPtr<nsAtom> tagAtom = aElement->NodeInfo()->NameAtom();
|
||||
RefPtr<nsAtom> typeAtom = aTypeExtension ?
|
||||
NS_Atomize(*aTypeExtension) : tagAtom;
|
||||
|
||||
if (aTypeExtension && !aElement->HasAttr(kNameSpaceID_None, nsGkAtoms::is)) {
|
||||
@ -448,7 +448,7 @@ CustomElementRegistry::EnqueueLifecycleCallback(nsIDocument::ElementCallbackType
|
||||
}
|
||||
|
||||
if (aType == nsIDocument::eAttributeChanged) {
|
||||
RefPtr<nsIAtom> attrName = NS_Atomize(aArgs->name);
|
||||
RefPtr<nsAtom> attrName = NS_Atomize(aArgs->name);
|
||||
if (definition->mObservedAttributes.IsEmpty() ||
|
||||
!definition->mObservedAttributes.Contains(attrName)) {
|
||||
return;
|
||||
@ -462,7 +462,7 @@ CustomElementRegistry::EnqueueLifecycleCallback(nsIDocument::ElementCallbackType
|
||||
}
|
||||
|
||||
void
|
||||
CustomElementRegistry::GetCustomPrototype(nsIAtom* aAtom,
|
||||
CustomElementRegistry::GetCustomPrototype(nsAtom* aAtom,
|
||||
JS::MutableHandle<JSObject*> aPrototype)
|
||||
{
|
||||
mozilla::dom::CustomElementDefinition* definition =
|
||||
@ -475,7 +475,7 @@ CustomElementRegistry::GetCustomPrototype(nsIAtom* aAtom,
|
||||
}
|
||||
|
||||
void
|
||||
CustomElementRegistry::UpgradeCandidates(nsIAtom* aKey,
|
||||
CustomElementRegistry::UpgradeCandidates(nsAtom* aKey,
|
||||
CustomElementDefinition* aDefinition,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
@ -594,7 +594,7 @@ CustomElementRegistry::Define(const nsAString& aName,
|
||||
* 2. If name is not a valid custom element name, then throw a "SyntaxError"
|
||||
* DOMException and abort these steps.
|
||||
*/
|
||||
RefPtr<nsIAtom> nameAtom(NS_Atomize(aName));
|
||||
RefPtr<nsAtom> nameAtom(NS_Atomize(aName));
|
||||
if (!nsContentUtils::IsCustomElementName(nameAtom)) {
|
||||
aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
|
||||
return;
|
||||
@ -636,7 +636,7 @@ CustomElementRegistry::Define(const nsAString& aName,
|
||||
*/
|
||||
nsAutoString localName(aName);
|
||||
if (aOptions.mExtends.WasPassed()) {
|
||||
RefPtr<nsIAtom> extendsAtom(NS_Atomize(aOptions.mExtends.Value()));
|
||||
RefPtr<nsAtom> extendsAtom(NS_Atomize(aOptions.mExtends.Value()));
|
||||
if (nsContentUtils::IsCustomElementName(extendsAtom)) {
|
||||
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||
return;
|
||||
@ -665,7 +665,7 @@ CustomElementRegistry::Define(const nsAString& aName,
|
||||
|
||||
JS::Rooted<JSObject*> constructorPrototype(cx);
|
||||
nsAutoPtr<LifecycleCallbacks> callbacksHolder(new LifecycleCallbacks());
|
||||
nsTArray<RefPtr<nsIAtom>> observedAttributes;
|
||||
nsTArray<RefPtr<nsAtom>> observedAttributes;
|
||||
{ // Set mIsCustomDefinitionRunning.
|
||||
/**
|
||||
* 9. Set this CustomElementRegistry's element definition is running flag.
|
||||
@ -796,7 +796,7 @@ CustomElementRegistry::Define(const nsAString& aName,
|
||||
* lifecycleCallbacks.
|
||||
*/
|
||||
// Associate the definition with the custom element.
|
||||
RefPtr<nsIAtom> localNameAtom(NS_Atomize(localName));
|
||||
RefPtr<nsAtom> localNameAtom(NS_Atomize(localName));
|
||||
LifecycleCallbacks* callbacks = callbacksHolder.forget();
|
||||
|
||||
/**
|
||||
@ -847,7 +847,7 @@ void
|
||||
CustomElementRegistry::Get(JSContext* aCx, const nsAString& aName,
|
||||
JS::MutableHandle<JS::Value> aRetVal)
|
||||
{
|
||||
RefPtr<nsIAtom> nameAtom(NS_Atomize(aName));
|
||||
RefPtr<nsAtom> nameAtom(NS_Atomize(aName));
|
||||
CustomElementDefinition* data = mCustomDefinitions.GetWeak(nameAtom);
|
||||
|
||||
if (!data) {
|
||||
@ -868,7 +868,7 @@ CustomElementRegistry::WhenDefined(const nsAString& aName, ErrorResult& aRv)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<nsIAtom> nameAtom(NS_Atomize(aName));
|
||||
RefPtr<nsAtom> nameAtom(NS_Atomize(aName));
|
||||
if (!nsContentUtils::IsCustomElementName(nameAtom)) {
|
||||
promise->MaybeReject(NS_ERROR_DOM_SYNTAX_ERR);
|
||||
return promise.forget();
|
||||
@ -936,7 +936,7 @@ CustomElementRegistry::Upgrade(Element* aElement,
|
||||
mozilla::dom::BorrowedAttrInfo info = aElement->GetAttrInfoAt(i);
|
||||
|
||||
const nsAttrName* name = info.mName;
|
||||
nsIAtom* attrName = name->LocalName();
|
||||
nsAtom* attrName = name->LocalName();
|
||||
|
||||
if (aDefinition->IsInObservedAttributeList(attrName)) {
|
||||
int32_t namespaceID = name->NamespaceID();
|
||||
@ -1186,10 +1186,10 @@ NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CustomElementDefinition, AddRef)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CustomElementDefinition, Release)
|
||||
|
||||
|
||||
CustomElementDefinition::CustomElementDefinition(nsIAtom* aType,
|
||||
nsIAtom* aLocalName,
|
||||
CustomElementDefinition::CustomElementDefinition(nsAtom* aType,
|
||||
nsAtom* aLocalName,
|
||||
Function* aConstructor,
|
||||
nsTArray<RefPtr<nsIAtom>>&& aObservedAttributes,
|
||||
nsTArray<RefPtr<nsAtom>>&& aObservedAttributes,
|
||||
JSObject* aPrototype,
|
||||
LifecycleCallbacks* aCallbacks,
|
||||
uint32_t aDocOrder)
|
||||
|
@ -112,11 +112,11 @@ struct CustomElementData
|
||||
eCustom
|
||||
};
|
||||
|
||||
explicit CustomElementData(nsIAtom* aType);
|
||||
CustomElementData(nsIAtom* aType, State aState);
|
||||
explicit CustomElementData(nsAtom* aType);
|
||||
CustomElementData(nsAtom* aType, State aState);
|
||||
// Custom element type, for <button is="x-button"> or <x-button>
|
||||
// this would be x-button.
|
||||
RefPtr<nsIAtom> mType;
|
||||
RefPtr<nsAtom> mType;
|
||||
// Element is being created flag as described in the custom elements spec.
|
||||
bool mElementIsBeingCreated;
|
||||
// Flag to determine if the created callback has been invoked, thus it
|
||||
@ -161,25 +161,25 @@ struct CustomElementDefinition
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(CustomElementDefinition)
|
||||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(CustomElementDefinition)
|
||||
|
||||
CustomElementDefinition(nsIAtom* aType,
|
||||
nsIAtom* aLocalName,
|
||||
CustomElementDefinition(nsAtom* aType,
|
||||
nsAtom* aLocalName,
|
||||
Function* aConstructor,
|
||||
nsTArray<RefPtr<nsIAtom>>&& aObservedAttributes,
|
||||
nsTArray<RefPtr<nsAtom>>&& aObservedAttributes,
|
||||
JSObject* aPrototype,
|
||||
mozilla::dom::LifecycleCallbacks* aCallbacks,
|
||||
uint32_t aDocOrder);
|
||||
|
||||
// The type (name) for this custom element.
|
||||
RefPtr<nsIAtom> mType;
|
||||
RefPtr<nsAtom> mType;
|
||||
|
||||
// The localname to (e.g. <button is=type> -- this would be button).
|
||||
RefPtr<nsIAtom> mLocalName;
|
||||
RefPtr<nsAtom> mLocalName;
|
||||
|
||||
// The custom element constructor.
|
||||
RefPtr<CustomElementConstructor> mConstructor;
|
||||
|
||||
// The list of attributes that this custom element observes.
|
||||
nsTArray<RefPtr<nsIAtom>> mObservedAttributes;
|
||||
nsTArray<RefPtr<nsAtom>> mObservedAttributes;
|
||||
|
||||
// The prototype to use for new custom elements of this type.
|
||||
JS::Heap<JSObject *> mPrototype;
|
||||
@ -198,7 +198,7 @@ struct CustomElementDefinition
|
||||
return mType != mLocalName;
|
||||
}
|
||||
|
||||
bool IsInObservedAttributeList(nsIAtom* aName)
|
||||
bool IsInObservedAttributeList(nsAtom* aName)
|
||||
{
|
||||
if (mObservedAttributes.IsEmpty()) {
|
||||
return false;
|
||||
@ -391,7 +391,7 @@ public:
|
||||
LifecycleAdoptedCallbackArgs* aAdoptedCallbackArgs,
|
||||
CustomElementDefinition* aDefinition);
|
||||
|
||||
void GetCustomPrototype(nsIAtom* aAtom,
|
||||
void GetCustomPrototype(nsAtom* aAtom,
|
||||
JS::MutableHandle<JSObject*> aPrototype);
|
||||
|
||||
void SyncInvokeReactions(nsIDocument::ElementCallbackType aType,
|
||||
@ -422,18 +422,18 @@ private:
|
||||
* element. e.g. <button is="x-button">.
|
||||
*/
|
||||
void RegisterUnresolvedElement(Element* aElement,
|
||||
nsIAtom* aTypeName = nullptr);
|
||||
nsAtom* aTypeName = nullptr);
|
||||
|
||||
void UpgradeCandidates(nsIAtom* aKey,
|
||||
void UpgradeCandidates(nsAtom* aKey,
|
||||
CustomElementDefinition* aDefinition,
|
||||
ErrorResult& aRv);
|
||||
|
||||
typedef nsRefPtrHashtable<nsRefPtrHashKey<nsIAtom>, CustomElementDefinition>
|
||||
typedef nsRefPtrHashtable<nsRefPtrHashKey<nsAtom>, CustomElementDefinition>
|
||||
DefinitionMap;
|
||||
typedef nsClassHashtable<nsRefPtrHashKey<nsIAtom>, nsTArray<nsWeakPtr>>
|
||||
typedef nsClassHashtable<nsRefPtrHashKey<nsAtom>, nsTArray<nsWeakPtr>>
|
||||
CandidateMap;
|
||||
typedef JS::GCHashMap<JS::Heap<JSObject*>,
|
||||
RefPtr<nsIAtom>,
|
||||
RefPtr<nsAtom>,
|
||||
js::MovableCellHasher<JS::Heap<JSObject*>>,
|
||||
js::SystemAllocPolicy> ConstructorMap;
|
||||
|
||||
@ -447,7 +447,7 @@ private:
|
||||
// mCustomDefinitions again to get definitions.
|
||||
ConstructorMap mConstructors;
|
||||
|
||||
typedef nsRefPtrHashtable<nsRefPtrHashKey<nsIAtom>, Promise>
|
||||
typedef nsRefPtrHashtable<nsRefPtrHashKey<nsAtom>, Promise>
|
||||
WhenDefinedPromiseMap;
|
||||
WhenDefinedPromiseMap mWhenDefinedPromiseMap;
|
||||
|
||||
|
@ -61,7 +61,7 @@ DOMImplementation::CreateDocumentType(const nsAString& aQualifiedName,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<nsIAtom> name = NS_Atomize(aQualifiedName);
|
||||
RefPtr<nsAtom> name = NS_Atomize(aQualifiedName);
|
||||
if (!name) {
|
||||
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
|
||||
return nullptr;
|
||||
|
@ -411,7 +411,7 @@ WalkDescendantsSetDirectionFromText(Element* aElement, bool aNotify = true,
|
||||
class nsTextNodeDirectionalityMap
|
||||
{
|
||||
static void
|
||||
nsTextNodeDirectionalityMapDtor(void *aObject, nsIAtom* aPropertyName,
|
||||
nsTextNodeDirectionalityMapDtor(void *aObject, nsAtom* aPropertyName,
|
||||
void *aPropertyValue, void* aData)
|
||||
{
|
||||
nsINode* textNode = static_cast<nsINode * >(aObject);
|
||||
@ -441,7 +441,7 @@ public:
|
||||
|
||||
static void
|
||||
nsTextNodeDirectionalityMapPropertyDestructor(void* aObject,
|
||||
nsIAtom* aProperty,
|
||||
nsAtom* aProperty,
|
||||
void* aPropertyValue,
|
||||
void* aData)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "nsIDOMDocumentFragment.h"
|
||||
#include "nsStringFwd.h"
|
||||
|
||||
class nsIAtom;
|
||||
class nsAtom;
|
||||
class nsIDocument;
|
||||
class nsIContent;
|
||||
|
||||
@ -70,18 +70,18 @@ public:
|
||||
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
// nsIContent
|
||||
nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
nsresult SetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
const nsAString& aValue, bool aNotify)
|
||||
{
|
||||
return SetAttr(aNameSpaceID, aName, nullptr, aValue, aNotify);
|
||||
}
|
||||
virtual nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
nsIAtom* aPrefix, const nsAString& aValue,
|
||||
virtual nsresult SetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
nsAtom* aPrefix, const nsAString& aValue,
|
||||
bool aNotify) override
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
|
||||
virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||
bool aNotify) override
|
||||
{
|
||||
return NS_OK;
|
||||
|
@ -21,7 +21,7 @@
|
||||
nsresult
|
||||
NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
|
||||
nsNodeInfoManager *aNodeInfoManager,
|
||||
nsIAtom *aName,
|
||||
nsAtom *aName,
|
||||
const nsAString& aPublicId,
|
||||
const nsAString& aSystemId,
|
||||
const nsAString& aInternalSubset)
|
||||
@ -35,7 +35,7 @@ NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
|
||||
|
||||
already_AddRefed<mozilla::dom::DocumentType>
|
||||
NS_NewDOMDocumentType(nsNodeInfoManager* aNodeInfoManager,
|
||||
nsIAtom *aName,
|
||||
nsAtom *aName,
|
||||
const nsAString& aPublicId,
|
||||
const nsAString& aSystemId,
|
||||
const nsAString& aInternalSubset,
|
||||
|
@ -90,7 +90,7 @@ protected:
|
||||
|
||||
already_AddRefed<mozilla::dom::DocumentType>
|
||||
NS_NewDOMDocumentType(nsNodeInfoManager* aNodeInfoManager,
|
||||
nsIAtom *aName,
|
||||
nsAtom *aName,
|
||||
const nsAString& aPublicId,
|
||||
const nsAString& aSystemId,
|
||||
const nsAString& aInternalSubset,
|
||||
@ -99,7 +99,7 @@ NS_NewDOMDocumentType(nsNodeInfoManager* aNodeInfoManager,
|
||||
nsresult
|
||||
NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
|
||||
nsNodeInfoManager* aNodeInfoManager,
|
||||
nsIAtom *aName,
|
||||
nsAtom *aName,
|
||||
const nsAString& aPublicId,
|
||||
const nsAString& aSystemId,
|
||||
const nsAString& aInternalSubset);
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "mozilla/dom/Attr.h"
|
||||
#include "mozilla/dom/Grid.h"
|
||||
#include "nsDOMAttributeMap.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsIContentInlines.h"
|
||||
#include "mozilla/dom/NodeInfo.h"
|
||||
#include "nsIDocumentInlines.h"
|
||||
@ -192,7 +192,7 @@ ASSERT_ELEMENT_SIZE(HTMLSpanElement, 128);
|
||||
#undef ASSERT_ELEMENT_SIZE
|
||||
#undef EXTRA_DOM_ELEMENT_BYTES
|
||||
|
||||
nsIAtom*
|
||||
nsAtom*
|
||||
nsIContent::DoGetID() const
|
||||
{
|
||||
MOZ_ASSERT(HasID(), "Unexpected call");
|
||||
@ -1105,7 +1105,7 @@ Element::GetClientRects()
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
void
|
||||
Element::AddToIdTable(nsIAtom* aId)
|
||||
Element::AddToIdTable(nsAtom* aId)
|
||||
{
|
||||
NS_ASSERTION(HasID(), "Node doesn't have an ID?");
|
||||
if (IsInShadowTree()) {
|
||||
@ -1126,7 +1126,7 @@ Element::RemoveFromIdTable()
|
||||
return;
|
||||
}
|
||||
|
||||
nsIAtom* id = DoGetID();
|
||||
nsAtom* id = DoGetID();
|
||||
if (IsInShadowTree()) {
|
||||
ShadowRoot* containingShadow = GetContainingShadow();
|
||||
// Check for containingShadow because it may have
|
||||
@ -1307,7 +1307,7 @@ Element::SetAttribute(const nsAString& aName,
|
||||
nsAutoString nameToUse;
|
||||
const nsAttrName* name = InternalGetAttrNameFromQName(aName, &nameToUse);
|
||||
if (!name) {
|
||||
RefPtr<nsIAtom> nameAtom = NS_AtomizeMainThread(nameToUse);
|
||||
RefPtr<nsAtom> nameAtom = NS_AtomizeMainThread(nameToUse);
|
||||
if (!nameAtom) {
|
||||
aError.Throw(NS_ERROR_OUT_OF_MEMORY);
|
||||
return;
|
||||
@ -1388,7 +1388,7 @@ Element::GetAttributeNS(const nsAString& aNamespaceURI,
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<nsIAtom> name = NS_AtomizeMainThread(aLocalName);
|
||||
RefPtr<nsAtom> name = NS_AtomizeMainThread(aLocalName);
|
||||
bool hasAttr = GetAttr(nsid, name, aReturn);
|
||||
if (!hasAttr) {
|
||||
SetDOMStringToNull(aReturn);
|
||||
@ -1420,7 +1420,7 @@ Element::RemoveAttributeNS(const nsAString& aNamespaceURI,
|
||||
const nsAString& aLocalName,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
RefPtr<nsIAtom> name = NS_AtomizeMainThread(aLocalName);
|
||||
RefPtr<nsAtom> name = NS_AtomizeMainThread(aLocalName);
|
||||
int32_t nsid =
|
||||
nsContentUtils::NameSpaceManager()->GetNameSpaceID(aNamespaceURI,
|
||||
nsContentUtils::IsChromeDoc(OwnerDoc()));
|
||||
@ -1493,7 +1493,7 @@ Element::HasAttributeNS(const nsAString& aNamespaceURI,
|
||||
return false;
|
||||
}
|
||||
|
||||
RefPtr<nsIAtom> name = NS_AtomizeMainThread(aLocalName);
|
||||
RefPtr<nsAtom> name = NS_AtomizeMainThread(aLocalName);
|
||||
return HasAttr(nsid, name);
|
||||
}
|
||||
|
||||
@ -2135,20 +2135,20 @@ Element::SetInlineStyleDeclaration(DeclarationBlock* aDeclaration,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(bool)
|
||||
Element::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
Element::IsAttributeMapped(const nsAtom* aAttribute) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
nsChangeHint
|
||||
Element::GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
Element::GetAttributeChangeHint(const nsAtom* aAttribute,
|
||||
int32_t aModType) const
|
||||
{
|
||||
return nsChangeHint(0);
|
||||
}
|
||||
|
||||
bool
|
||||
Element::FindAttributeDependence(const nsIAtom* aAttribute,
|
||||
Element::FindAttributeDependence(const nsAtom* aAttribute,
|
||||
const MappedAttributeEntry* const aMaps[],
|
||||
uint32_t aMapCount)
|
||||
{
|
||||
@ -2319,7 +2319,7 @@ Element::LeaveLink(nsPresContext* aPresContext)
|
||||
}
|
||||
|
||||
nsresult
|
||||
Element::SetEventHandler(nsIAtom* aEventName,
|
||||
Element::SetEventHandler(nsAtom* aEventName,
|
||||
const nsAString& aValue,
|
||||
bool aDefer)
|
||||
{
|
||||
@ -2374,8 +2374,8 @@ Element::InternalGetAttrNameFromQName(const nsAString& aStr,
|
||||
|
||||
bool
|
||||
Element::MaybeCheckSameAttrVal(int32_t aNamespaceID,
|
||||
nsIAtom* aName,
|
||||
nsIAtom* aPrefix,
|
||||
nsAtom* aName,
|
||||
nsAtom* aPrefix,
|
||||
const nsAttrValueOrString& aValue,
|
||||
bool aNotify,
|
||||
nsAttrValue& aOldValue,
|
||||
@ -2429,8 +2429,8 @@ Element::MaybeCheckSameAttrVal(int32_t aNamespaceID,
|
||||
}
|
||||
|
||||
bool
|
||||
Element::OnlyNotifySameValueSet(int32_t aNamespaceID, nsIAtom* aName,
|
||||
nsIAtom* aPrefix,
|
||||
Element::OnlyNotifySameValueSet(int32_t aNamespaceID, nsAtom* aName,
|
||||
nsAtom* aPrefix,
|
||||
const nsAttrValueOrString& aValue,
|
||||
bool aNotify, nsAttrValue& aOldValue,
|
||||
uint8_t* aModType, bool* aHasListeners,
|
||||
@ -2448,7 +2448,7 @@ Element::OnlyNotifySameValueSet(int32_t aNamespaceID, nsIAtom* aName,
|
||||
}
|
||||
|
||||
nsresult
|
||||
Element::SetSingleClassFromParser(nsIAtom* aSingleClassName)
|
||||
Element::SetSingleClassFromParser(nsAtom* aSingleClassName)
|
||||
{
|
||||
// Keep this in sync with SetAttr and SetParsedAttr below.
|
||||
|
||||
@ -2480,8 +2480,8 @@ Element::SetSingleClassFromParser(nsIAtom* aSingleClassName)
|
||||
}
|
||||
|
||||
nsresult
|
||||
Element::SetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
nsIAtom* aPrefix, const nsAString& aValue,
|
||||
Element::SetAttr(int32_t aNamespaceID, nsAtom* aName,
|
||||
nsAtom* aPrefix, const nsAString& aValue,
|
||||
bool aNotify)
|
||||
{
|
||||
// Keep this in sync with SetParsedAttr below and SetSingleClassFromParser
|
||||
@ -2546,8 +2546,8 @@ Element::SetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
}
|
||||
|
||||
nsresult
|
||||
Element::SetParsedAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
nsIAtom* aPrefix, nsAttrValue& aParsedValue,
|
||||
Element::SetParsedAttr(int32_t aNamespaceID, nsAtom* aName,
|
||||
nsAtom* aPrefix, nsAttrValue& aParsedValue,
|
||||
bool aNotify)
|
||||
{
|
||||
// Keep this in sync with SetAttr and SetSingleClassFromParser above
|
||||
@ -2592,8 +2592,8 @@ Element::SetParsedAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
|
||||
nsresult
|
||||
Element::SetAttrAndNotify(int32_t aNamespaceID,
|
||||
nsIAtom* aName,
|
||||
nsIAtom* aPrefix,
|
||||
nsAtom* aName,
|
||||
nsAtom* aPrefix,
|
||||
const nsAttrValue* aOldValue,
|
||||
nsAttrValue& aParsedValue,
|
||||
uint8_t aModType,
|
||||
@ -2670,7 +2670,7 @@ Element::SetAttrAndNotify(int32_t aNamespaceID,
|
||||
nsContentUtils::GetElementDefinitionIfObservingAttr(this,
|
||||
data->mType,
|
||||
aName)) {
|
||||
RefPtr<nsIAtom> oldValueAtom;
|
||||
RefPtr<nsAtom> oldValueAtom;
|
||||
if (oldValue) {
|
||||
oldValueAtom = oldValue->GetAsAtom();
|
||||
} else {
|
||||
@ -2678,7 +2678,7 @@ Element::SetAttrAndNotify(int32_t aNamespaceID,
|
||||
// attribute that was swapped with aParsedValue.
|
||||
oldValueAtom = aParsedValue.GetAsAtom();
|
||||
}
|
||||
RefPtr<nsIAtom> newValueAtom = valueForAfterSetAttr.GetAsAtom();
|
||||
RefPtr<nsAtom> newValueAtom = valueForAfterSetAttr.GetAsAtom();
|
||||
nsAutoString ns;
|
||||
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNamespaceID, ns);
|
||||
|
||||
@ -2746,7 +2746,7 @@ Element::SetAttrAndNotify(int32_t aNamespaceID,
|
||||
|
||||
bool
|
||||
Element::ParseAttribute(int32_t aNamespaceID,
|
||||
nsIAtom* aAttribute,
|
||||
nsAtom* aAttribute,
|
||||
const nsAString& aValue,
|
||||
nsAttrValue& aResult)
|
||||
{
|
||||
@ -2774,7 +2774,7 @@ Element::ParseAttribute(int32_t aNamespaceID,
|
||||
}
|
||||
|
||||
bool
|
||||
Element::SetAndSwapMappedAttribute(nsIAtom* aName,
|
||||
Element::SetAndSwapMappedAttribute(nsAtom* aName,
|
||||
nsAttrValue& aValue,
|
||||
bool* aValueWasSet,
|
||||
nsresult* aRetval)
|
||||
@ -2784,7 +2784,7 @@ Element::SetAndSwapMappedAttribute(nsIAtom* aName,
|
||||
}
|
||||
|
||||
nsresult
|
||||
Element::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
Element::BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValueOrString* aValue, bool aNotify)
|
||||
{
|
||||
if (aNamespaceID == kNameSpaceID_None) {
|
||||
@ -2807,7 +2807,7 @@ Element::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
}
|
||||
|
||||
void
|
||||
Element::PreIdMaybeChange(int32_t aNamespaceID, nsIAtom* aName,
|
||||
Element::PreIdMaybeChange(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValueOrString* aValue)
|
||||
{
|
||||
if (aNamespaceID != kNameSpaceID_None || aName != nsGkAtoms::id) {
|
||||
@ -2817,7 +2817,7 @@ Element::PreIdMaybeChange(int32_t aNamespaceID, nsIAtom* aName,
|
||||
}
|
||||
|
||||
void
|
||||
Element::PostIdMaybeChange(int32_t aNamespaceID, nsIAtom* aName,
|
||||
Element::PostIdMaybeChange(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValue* aValue)
|
||||
{
|
||||
if (aNamespaceID != kNameSpaceID_None || aName != nsGkAtoms::id) {
|
||||
@ -2835,7 +2835,7 @@ Element::PostIdMaybeChange(int32_t aNamespaceID, nsIAtom* aName,
|
||||
}
|
||||
|
||||
EventListenerManager*
|
||||
Element::GetEventListenerManagerForAttr(nsIAtom* aAttrName,
|
||||
Element::GetEventListenerManagerForAttr(nsAtom* aAttrName,
|
||||
bool* aDefer)
|
||||
{
|
||||
*aDefer = true;
|
||||
@ -2843,7 +2843,7 @@ Element::GetEventListenerManagerForAttr(nsIAtom* aAttrName,
|
||||
}
|
||||
|
||||
BorrowedAttrInfo
|
||||
Element::GetAttrInfo(int32_t aNamespaceID, nsIAtom* aName) const
|
||||
Element::GetAttrInfo(int32_t aNamespaceID, nsAtom* aName) const
|
||||
{
|
||||
NS_ASSERTION(nullptr != aName, "must have attribute name");
|
||||
NS_ASSERTION(aNamespaceID != kNameSpaceID_Unknown,
|
||||
@ -2868,7 +2868,7 @@ Element::GetAttrInfoAt(uint32_t aIndex) const
|
||||
}
|
||||
|
||||
bool
|
||||
Element::GetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
Element::GetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
nsAString& aResult) const
|
||||
{
|
||||
DOMString str;
|
||||
@ -2879,7 +2879,7 @@ Element::GetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
|
||||
int32_t
|
||||
Element::FindAttrValueIn(int32_t aNameSpaceID,
|
||||
nsIAtom* aName,
|
||||
nsAtom* aName,
|
||||
AttrValuesArray* aValues,
|
||||
nsCaseTreatment aCaseSensitive) const
|
||||
{
|
||||
@ -2900,7 +2900,7 @@ Element::FindAttrValueIn(int32_t aNameSpaceID,
|
||||
}
|
||||
|
||||
nsresult
|
||||
Element::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
Element::UnsetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
bool aNotify)
|
||||
{
|
||||
NS_ASSERTION(nullptr != aName, "must have attribute name");
|
||||
@ -2977,7 +2977,7 @@ Element::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
nsAutoString ns;
|
||||
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNameSpaceID, ns);
|
||||
|
||||
RefPtr<nsIAtom> oldValueAtom = oldValue.GetAsAtom();
|
||||
RefPtr<nsAtom> oldValueAtom = oldValue.GetAsAtom();
|
||||
LifecycleCallbackArgs args = {
|
||||
nsDependentAtomString(aName),
|
||||
nsDependentAtomString(oldValueAtom),
|
||||
@ -3415,7 +3415,7 @@ Element::GetLinkTarget(nsAString& aTarget)
|
||||
}
|
||||
|
||||
static void
|
||||
nsDOMTokenListPropertyDestructor(void *aObject, nsIAtom *aProperty,
|
||||
nsDOMTokenListPropertyDestructor(void *aObject, nsAtom *aProperty,
|
||||
void *aPropertyValue, void *aData)
|
||||
{
|
||||
nsDOMTokenList* list =
|
||||
@ -3423,7 +3423,7 @@ nsDOMTokenListPropertyDestructor(void *aObject, nsIAtom *aProperty,
|
||||
NS_RELEASE(list);
|
||||
}
|
||||
|
||||
static nsIAtom** sPropertiesToTraverseAndUnlink[] =
|
||||
static nsAtom** sPropertiesToTraverseAndUnlink[] =
|
||||
{
|
||||
&nsGkAtoms::sandbox,
|
||||
&nsGkAtoms::sizes,
|
||||
@ -3432,18 +3432,18 @@ static nsIAtom** sPropertiesToTraverseAndUnlink[] =
|
||||
};
|
||||
|
||||
// static
|
||||
nsIAtom***
|
||||
nsAtom***
|
||||
Element::HTMLSVGPropertiesToTraverseAndUnlink()
|
||||
{
|
||||
return sPropertiesToTraverseAndUnlink;
|
||||
}
|
||||
|
||||
nsDOMTokenList*
|
||||
Element::GetTokenList(nsIAtom* aAtom,
|
||||
Element::GetTokenList(nsAtom* aAtom,
|
||||
const DOMTokenListSupportedTokenArray aSupportedTokens)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
nsIAtom*** props =
|
||||
nsAtom*** props =
|
||||
HTMLSVGPropertiesToTraverseAndUnlink();
|
||||
bool found = false;
|
||||
for (uint32_t i = 0; props[i]; ++i) {
|
||||
@ -3856,7 +3856,7 @@ Element::SetOuterHTML(const nsAString& aOuterHTML, ErrorResult& aError)
|
||||
}
|
||||
|
||||
if (OwnerDoc()->IsHTMLDocument()) {
|
||||
nsIAtom* localName;
|
||||
nsAtom* localName;
|
||||
int32_t namespaceID;
|
||||
if (parent->IsElement()) {
|
||||
localName = parent->NodeInfo()->NameAtom();
|
||||
@ -3958,7 +3958,7 @@ Element::InsertAdjacentHTML(const nsAString& aPosition, const nsAString& aText,
|
||||
(position == eAfterBegin && !GetFirstChild()))) {
|
||||
int32_t oldChildCount = destination->GetChildCount();
|
||||
int32_t contextNs = destination->GetNameSpaceID();
|
||||
nsIAtom* contextLocal = destination->NodeInfo()->NameAtom();
|
||||
nsAtom* contextLocal = destination->NodeInfo()->NameAtom();
|
||||
if (contextLocal == nsGkAtoms::html && contextNs == kNameSpaceID_XHTML) {
|
||||
// For compat with IE6 through IE9. Willful violation of HTML5 as of
|
||||
// 2011-04-06. CreateContextualFragment does the same already.
|
||||
@ -4070,7 +4070,7 @@ Element::GetTextEditorInternal()
|
||||
}
|
||||
|
||||
nsresult
|
||||
Element::SetBoolAttr(nsIAtom* aAttr, bool aValue)
|
||||
Element::SetBoolAttr(nsAtom* aAttr, bool aValue)
|
||||
{
|
||||
if (aValue) {
|
||||
return SetAttr(kNameSpaceID_None, aAttr, EmptyString(), true);
|
||||
@ -4080,7 +4080,7 @@ Element::SetBoolAttr(nsIAtom* aAttr, bool aValue)
|
||||
}
|
||||
|
||||
void
|
||||
Element::GetEnumAttr(nsIAtom* aAttr,
|
||||
Element::GetEnumAttr(nsAtom* aAttr,
|
||||
const char* aDefault,
|
||||
nsAString& aResult) const
|
||||
{
|
||||
@ -4088,7 +4088,7 @@ Element::GetEnumAttr(nsIAtom* aAttr,
|
||||
}
|
||||
|
||||
void
|
||||
Element::GetEnumAttr(nsIAtom* aAttr,
|
||||
Element::GetEnumAttr(nsAtom* aAttr,
|
||||
const char* aDefaultMissing,
|
||||
const char* aDefaultInvalid,
|
||||
nsAString& aResult) const
|
||||
@ -4113,7 +4113,7 @@ Element::GetEnumAttr(nsIAtom* aAttr,
|
||||
}
|
||||
|
||||
void
|
||||
Element::SetOrRemoveNullableStringAttr(nsIAtom* aName, const nsAString& aValue,
|
||||
Element::SetOrRemoveNullableStringAttr(nsAtom* aName, const nsAString& aValue,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
if (DOMStringIsNull(aValue)) {
|
||||
|
@ -375,7 +375,7 @@ public:
|
||||
* attribute on this element.
|
||||
*/
|
||||
virtual UniquePtr<nsISMILAttr> GetAnimatedAttr(int32_t aNamespaceID,
|
||||
nsIAtom* aName)
|
||||
nsAtom* aName)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
@ -417,7 +417,7 @@ public:
|
||||
* returns true here even though it stores nothing in the mapped
|
||||
* attributes.
|
||||
*/
|
||||
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const;
|
||||
|
||||
/**
|
||||
* Get a hint that tells the style system what to do when
|
||||
@ -425,7 +425,7 @@ public:
|
||||
* in response to the change *other* than the result of what is
|
||||
* mapped into style data via any type of style rule.
|
||||
*/
|
||||
virtual nsChangeHint GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
virtual nsChangeHint GetAttributeChangeHint(const nsAtom* aAttribute,
|
||||
int32_t aModType) const;
|
||||
|
||||
inline Directionality GetDirectionality() const {
|
||||
@ -692,7 +692,7 @@ public:
|
||||
GetExistingAttrNameFromQName(const nsAString& aStr) const;
|
||||
|
||||
MOZ_ALWAYS_INLINE // Avoid a crashy hook from Avast 10 Beta (Bug 1058131)
|
||||
nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
nsresult SetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
const nsAString& aValue, bool aNotify)
|
||||
{
|
||||
return SetAttr(aNameSpaceID, aName, nullptr, aValue, aNotify);
|
||||
@ -716,8 +716,8 @@ public:
|
||||
* @param aOldValueSet [out] Indicates whether an old attribute value has been
|
||||
* stored in aOldValue. The bool will be set to true if a value was stored.
|
||||
*/
|
||||
bool MaybeCheckSameAttrVal(int32_t aNamespaceID, nsIAtom* aName,
|
||||
nsIAtom* aPrefix,
|
||||
bool MaybeCheckSameAttrVal(int32_t aNamespaceID, nsAtom* aName,
|
||||
nsAtom* aPrefix,
|
||||
const nsAttrValueOrString& aValue,
|
||||
bool aNotify, nsAttrValue& aOldValue,
|
||||
uint8_t* aModType, bool* aHasListeners,
|
||||
@ -743,8 +743,8 @@ public:
|
||||
* @param aOldValueSet [out] Indicates whether an old attribute value has been
|
||||
* stored in aOldValue. The bool will be set to true if a value was stored.
|
||||
*/
|
||||
bool OnlyNotifySameValueSet(int32_t aNamespaceID, nsIAtom* aName,
|
||||
nsIAtom* aPrefix,
|
||||
bool OnlyNotifySameValueSet(int32_t aNamespaceID, nsAtom* aName,
|
||||
nsAtom* aPrefix,
|
||||
const nsAttrValueOrString& aValue,
|
||||
bool aNotify, nsAttrValue& aOldValue,
|
||||
uint8_t* aModType, bool* aHasListeners,
|
||||
@ -755,31 +755,31 @@ public:
|
||||
* Assumes that we are not notifying and that the attribute hasn't been
|
||||
* set previously.
|
||||
*/
|
||||
nsresult SetSingleClassFromParser(nsIAtom* aSingleClassName);
|
||||
nsresult SetSingleClassFromParser(nsAtom* aSingleClassName);
|
||||
|
||||
virtual nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName, nsIAtom* aPrefix,
|
||||
virtual nsresult SetAttr(int32_t aNameSpaceID, nsAtom* aName, nsAtom* aPrefix,
|
||||
const nsAString& aValue, bool aNotify) override;
|
||||
// aParsedValue receives the old value of the attribute. That's useful if
|
||||
// either the input or output value of aParsedValue is StoresOwnData.
|
||||
nsresult SetParsedAttr(int32_t aNameSpaceID, nsIAtom* aName, nsIAtom* aPrefix,
|
||||
nsresult SetParsedAttr(int32_t aNameSpaceID, nsAtom* aName, nsAtom* aPrefix,
|
||||
nsAttrValue& aParsedValue, bool aNotify);
|
||||
// GetAttr is not inlined on purpose, to keep down codesize from all
|
||||
// the inlined nsAttrValue bits for C++ callers.
|
||||
bool GetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
bool GetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
nsAString& aResult) const;
|
||||
inline bool HasAttr(int32_t aNameSpaceID, nsIAtom* aName) const;
|
||||
inline bool HasAttr(int32_t aNameSpaceID, nsAtom* aName) const;
|
||||
// aCaseSensitive == eIgnoreCaase means ASCII case-insensitive matching.
|
||||
inline bool AttrValueIs(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
inline bool AttrValueIs(int32_t aNameSpaceID, nsAtom* aName,
|
||||
const nsAString& aValue,
|
||||
nsCaseTreatment aCaseSensitive) const;
|
||||
inline bool AttrValueIs(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
nsIAtom* aValue,
|
||||
inline bool AttrValueIs(int32_t aNameSpaceID, nsAtom* aName,
|
||||
nsAtom* aValue,
|
||||
nsCaseTreatment aCaseSensitive) const;
|
||||
virtual int32_t FindAttrValueIn(int32_t aNameSpaceID,
|
||||
nsIAtom* aName,
|
||||
nsAtom* aName,
|
||||
AttrValuesArray* aValues,
|
||||
nsCaseTreatment aCaseSensitive) const override;
|
||||
virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
|
||||
virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||
bool aNotify) override;
|
||||
virtual const nsAttrName* GetAttrNameAt(uint32_t aIndex) const override;
|
||||
virtual BorrowedAttrInfo GetAttrInfoAt(uint32_t aIndex) const override;
|
||||
@ -814,7 +814,7 @@ public:
|
||||
* Attribute Mapping Helpers
|
||||
*/
|
||||
struct MappedAttributeEntry {
|
||||
nsIAtom** attribute;
|
||||
nsAtom** attribute;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -825,24 +825,24 @@ public:
|
||||
*/
|
||||
template<size_t N>
|
||||
static bool
|
||||
FindAttributeDependence(const nsIAtom* aAttribute,
|
||||
FindAttributeDependence(const nsAtom* aAttribute,
|
||||
const MappedAttributeEntry* const (&aMaps)[N])
|
||||
{
|
||||
return FindAttributeDependence(aAttribute, aMaps, N);
|
||||
}
|
||||
|
||||
static nsIAtom*** HTMLSVGPropertiesToTraverseAndUnlink();
|
||||
static nsAtom*** HTMLSVGPropertiesToTraverseAndUnlink();
|
||||
|
||||
private:
|
||||
void DescribeAttribute(uint32_t index, nsAString& aOutDescription) const;
|
||||
|
||||
static bool
|
||||
FindAttributeDependence(const nsIAtom* aAttribute,
|
||||
FindAttributeDependence(const nsAtom* aAttribute,
|
||||
const MappedAttributeEntry* const aMaps[],
|
||||
uint32_t aMapCount);
|
||||
|
||||
protected:
|
||||
inline bool GetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
inline bool GetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
DOMString& aResult) const
|
||||
{
|
||||
NS_ASSERTION(nullptr != aName, "must have attribute name");
|
||||
@ -1199,7 +1199,7 @@ public:
|
||||
* @param aValue the JS to attach
|
||||
* @param aDefer indicates if deferred execution is allowed
|
||||
*/
|
||||
nsresult SetEventHandler(nsIAtom* aEventName,
|
||||
nsresult SetEventHandler(nsAtom* aEventName,
|
||||
const nsAString& aValue,
|
||||
bool aDefer = true);
|
||||
|
||||
@ -1252,12 +1252,12 @@ public:
|
||||
// Work around silly C++ name hiding stuff
|
||||
nsIFrame* GetPrimaryFrame() const { return nsIContent::GetPrimaryFrame(); }
|
||||
|
||||
const nsAttrValue* GetParsedAttr(nsIAtom* aAttr) const
|
||||
const nsAttrValue* GetParsedAttr(nsAtom* aAttr) const
|
||||
{
|
||||
return mAttrsAndChildren.GetAttr(aAttr);
|
||||
}
|
||||
|
||||
const nsAttrValue* GetParsedAttr(nsIAtom* aAttr, int32_t aNameSpaceID) const
|
||||
const nsAttrValue* GetParsedAttr(nsAtom* aAttr, int32_t aNameSpaceID) const
|
||||
{
|
||||
return mAttrsAndChildren.GetAttr(aAttr, aNameSpaceID);
|
||||
}
|
||||
@ -1286,7 +1286,7 @@ public:
|
||||
* is, this should only be called from methods that only care about attrs
|
||||
* that effectively live in mAttrsAndChildren.
|
||||
*/
|
||||
virtual BorrowedAttrInfo GetAttrInfo(int32_t aNamespaceID, nsIAtom* aName) const;
|
||||
virtual BorrowedAttrInfo GetAttrInfo(int32_t aNamespaceID, nsAtom* aName) const;
|
||||
|
||||
/**
|
||||
* Called when we have been adopted, and the information of the
|
||||
@ -1336,7 +1336,7 @@ public:
|
||||
* @param aAttr name of attribute.
|
||||
* @param aValue Boolean value of attribute.
|
||||
*/
|
||||
bool GetBoolAttr(nsIAtom* aAttr) const
|
||||
bool GetBoolAttr(nsAtom* aAttr) const
|
||||
{
|
||||
return HasAttr(kNameSpaceID_None, aAttr);
|
||||
}
|
||||
@ -1349,7 +1349,7 @@ public:
|
||||
* @param aAttr name of attribute.
|
||||
* @param aValue Boolean value of attribute.
|
||||
*/
|
||||
nsresult SetBoolAttr(nsIAtom* aAttr, bool aValue);
|
||||
nsresult SetBoolAttr(nsAtom* aAttr, bool aValue);
|
||||
|
||||
/**
|
||||
* Helper method for NS_IMPL_ENUM_ATTR_DEFAULT_VALUE.
|
||||
@ -1360,7 +1360,7 @@ public:
|
||||
* @param aDefault the default value if the attribute is missing or invalid.
|
||||
* @param aResult string corresponding to the value [out].
|
||||
*/
|
||||
void GetEnumAttr(nsIAtom* aAttr,
|
||||
void GetEnumAttr(nsAtom* aAttr,
|
||||
const char* aDefault,
|
||||
nsAString& aResult) const;
|
||||
|
||||
@ -1378,7 +1378,7 @@ public:
|
||||
* @param aDefaultInvalid the default value if the attribute is invalid.
|
||||
* @param aResult string corresponding to the value [out].
|
||||
*/
|
||||
void GetEnumAttr(nsIAtom* aAttr,
|
||||
void GetEnumAttr(nsAtom* aAttr,
|
||||
const char* aDefaultMissing,
|
||||
const char* aDefaultInvalid,
|
||||
nsAString& aResult) const;
|
||||
@ -1386,7 +1386,7 @@ public:
|
||||
/**
|
||||
* Unset an attribute.
|
||||
*/
|
||||
void UnsetAttr(nsIAtom* aAttr, ErrorResult& aError)
|
||||
void UnsetAttr(nsAtom* aAttr, ErrorResult& aError)
|
||||
{
|
||||
aError = UnsetAttr(kNameSpaceID_None, aAttr, true);
|
||||
}
|
||||
@ -1394,7 +1394,7 @@ public:
|
||||
/**
|
||||
* Set an attribute in the simplest way possible.
|
||||
*/
|
||||
void SetAttr(nsIAtom* aAttr, const nsAString& aValue, ErrorResult& aError)
|
||||
void SetAttr(nsAtom* aAttr, const nsAString& aValue, ErrorResult& aError)
|
||||
{
|
||||
aError = SetAttr(kNameSpaceID_None, aAttr, aValue, true);
|
||||
}
|
||||
@ -1404,7 +1404,7 @@ public:
|
||||
* attribute (e.g. a CORS attribute). If DOMStringIsNull(aValue),
|
||||
* this will actually remove the content attribute.
|
||||
*/
|
||||
void SetOrRemoveNullableStringAttr(nsIAtom* aName, const nsAString& aValue,
|
||||
void SetOrRemoveNullableStringAttr(nsAtom* aName, const nsAString& aValue,
|
||||
ErrorResult& aError);
|
||||
|
||||
/**
|
||||
@ -1486,8 +1486,8 @@ protected:
|
||||
* @param aComposedDocument The current composed document of the element.
|
||||
*/
|
||||
nsresult SetAttrAndNotify(int32_t aNamespaceID,
|
||||
nsIAtom* aName,
|
||||
nsIAtom* aPrefix,
|
||||
nsAtom* aName,
|
||||
nsAtom* aPrefix,
|
||||
const nsAttrValue* aOldValue,
|
||||
nsAttrValue& aParsedValue,
|
||||
uint8_t aModType,
|
||||
@ -1520,7 +1520,7 @@ protected:
|
||||
* @return true if the parsing was successful, false otherwise
|
||||
*/
|
||||
virtual bool ParseAttribute(int32_t aNamespaceID,
|
||||
nsIAtom* aAttribute,
|
||||
nsAtom* aAttribute,
|
||||
const nsAString& aValue,
|
||||
nsAttrValue& aResult);
|
||||
|
||||
@ -1542,7 +1542,7 @@ protected:
|
||||
* @param [out] aRetval the nsresult status of the operation, if any.
|
||||
* @return true if the setting was attempted, false otherwise.
|
||||
*/
|
||||
virtual bool SetAndSwapMappedAttribute(nsIAtom* aName,
|
||||
virtual bool SetAndSwapMappedAttribute(nsAtom* aName,
|
||||
nsAttrValue& aValue,
|
||||
bool* aValueWasSet,
|
||||
nsresult* aRetval);
|
||||
@ -1561,7 +1561,7 @@ protected:
|
||||
* will be null.
|
||||
* @param aNotify Whether we plan to notify document observers.
|
||||
*/
|
||||
virtual nsresult BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
virtual nsresult BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValueOrString* aValue,
|
||||
bool aNotify);
|
||||
|
||||
@ -1583,7 +1583,7 @@ protected:
|
||||
*/
|
||||
// Note that this is inlined so that when subclasses call it it gets
|
||||
// inlined. Those calls don't go through a vtable.
|
||||
virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValue* aValue,
|
||||
const nsAttrValue* aOldValue, bool aNotify)
|
||||
{
|
||||
@ -1605,7 +1605,7 @@ protected:
|
||||
* @param aName the localname of the attribute being set
|
||||
* @param aValue the new id value. Will be null if the id is being unset.
|
||||
*/
|
||||
void PreIdMaybeChange(int32_t aNamespaceID, nsIAtom* aName,
|
||||
void PreIdMaybeChange(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValueOrString* aValue);
|
||||
|
||||
/**
|
||||
@ -1623,7 +1623,7 @@ protected:
|
||||
* @param aName the localname of the attribute being set
|
||||
* @param aValue the new id value. Will be null if the id is being unset.
|
||||
*/
|
||||
void PostIdMaybeChange(int32_t aNamespaceID, nsIAtom* aName,
|
||||
void PostIdMaybeChange(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValue* aValue);
|
||||
|
||||
/**
|
||||
@ -1641,7 +1641,7 @@ protected:
|
||||
*/
|
||||
// Note that this is inlined so that when subclasses call it it gets
|
||||
// inlined. Those calls don't go through a vtable.
|
||||
virtual nsresult OnAttrSetButNotChanged(int32_t aNamespaceID, nsIAtom* aName,
|
||||
virtual nsresult OnAttrSetButNotChanged(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValueOrString& aValue,
|
||||
bool aNotify)
|
||||
{
|
||||
@ -1653,7 +1653,7 @@ protected:
|
||||
* needed for attachment of attribute-defined handlers
|
||||
*/
|
||||
virtual EventListenerManager*
|
||||
GetEventListenerManagerForAttr(nsIAtom* aAttrName, bool* aDefer);
|
||||
GetEventListenerManagerForAttr(nsAtom* aAttrName, bool* aDefer);
|
||||
|
||||
/**
|
||||
* Internal hook for converting an attribute name-string to nsAttrName in
|
||||
@ -1680,7 +1680,7 @@ protected:
|
||||
/**
|
||||
* Add/remove this element to the documents id cache
|
||||
*/
|
||||
void AddToIdTable(nsIAtom* aId);
|
||||
void AddToIdTable(nsAtom* aId);
|
||||
void RemoveFromIdTable();
|
||||
|
||||
/**
|
||||
@ -1721,7 +1721,7 @@ protected:
|
||||
*/
|
||||
virtual void GetLinkTarget(nsAString& aTarget);
|
||||
|
||||
nsDOMTokenList* GetTokenList(nsIAtom* aAtom,
|
||||
nsDOMTokenList* GetTokenList(nsAtom* aAtom,
|
||||
const DOMTokenListSupportedTokenArray aSupportedTokens = nullptr);
|
||||
|
||||
private:
|
||||
@ -1788,7 +1788,7 @@ protected:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(Element, NS_ELEMENT_IID)
|
||||
|
||||
inline bool
|
||||
Element::HasAttr(int32_t aNameSpaceID, nsIAtom* aName) const
|
||||
Element::HasAttr(int32_t aNameSpaceID, nsAtom* aName) const
|
||||
{
|
||||
NS_ASSERTION(nullptr != aName, "must have attribute name");
|
||||
NS_ASSERTION(aNameSpaceID != kNameSpaceID_Unknown,
|
||||
@ -1799,7 +1799,7 @@ Element::HasAttr(int32_t aNameSpaceID, nsIAtom* aName) const
|
||||
|
||||
inline bool
|
||||
Element::AttrValueIs(int32_t aNameSpaceID,
|
||||
nsIAtom* aName,
|
||||
nsAtom* aName,
|
||||
const nsAString& aValue,
|
||||
nsCaseTreatment aCaseSensitive) const
|
||||
{
|
||||
@ -1812,8 +1812,8 @@ Element::AttrValueIs(int32_t aNameSpaceID,
|
||||
|
||||
inline bool
|
||||
Element::AttrValueIs(int32_t aNameSpaceID,
|
||||
nsIAtom* aName,
|
||||
nsIAtom* aValue,
|
||||
nsAtom* aName,
|
||||
nsAtom* aValue,
|
||||
nsCaseTreatment aCaseSensitive) const
|
||||
{
|
||||
NS_ASSERTION(aName, "Must have attr name");
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "mozilla/URLExtraData.h"
|
||||
#include "mozilla/dom/Attr.h"
|
||||
#include "nsDOMAttributeMap.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "mozilla/dom/NodeInfo.h"
|
||||
#include "mozilla/dom/Event.h"
|
||||
#include "nsIDocumentInlines.h"
|
||||
@ -326,7 +326,7 @@ nsIContent::LookupNamespaceURIInternal(const nsAString& aNamespacePrefix,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
RefPtr<nsIAtom> name;
|
||||
RefPtr<nsAtom> name;
|
||||
if (!aNamespacePrefix.IsEmpty()) {
|
||||
name = NS_Atomize(aNamespacePrefix);
|
||||
NS_ENSURE_TRUE(name, NS_ERROR_OUT_OF_MEMORY);
|
||||
@ -344,7 +344,7 @@ nsIContent::LookupNamespaceURIInternal(const nsAString& aNamespacePrefix,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
nsAtom*
|
||||
nsIContent::GetLang() const
|
||||
{
|
||||
for (const auto* content = this; content; content = content->GetParent()) {
|
||||
@ -1099,7 +1099,7 @@ nsIContent::GetEventTargetParent(EventChainPreVisitor& aVisitor)
|
||||
}
|
||||
|
||||
bool
|
||||
nsIContent::GetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
nsIContent::GetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
nsAString& aResult) const
|
||||
{
|
||||
if (IsElement()) {
|
||||
@ -1110,14 +1110,14 @@ nsIContent::GetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
}
|
||||
|
||||
bool
|
||||
nsIContent::HasAttr(int32_t aNameSpaceID, nsIAtom* aName) const
|
||||
nsIContent::HasAttr(int32_t aNameSpaceID, nsAtom* aName) const
|
||||
{
|
||||
return IsElement() && AsElement()->HasAttr(aNameSpaceID, aName);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIContent::AttrValueIs(int32_t aNameSpaceID,
|
||||
nsIAtom* aName,
|
||||
nsAtom* aName,
|
||||
const nsAString& aValue,
|
||||
nsCaseTreatment aCaseSensitive) const
|
||||
{
|
||||
@ -1127,8 +1127,8 @@ nsIContent::AttrValueIs(int32_t aNameSpaceID,
|
||||
|
||||
bool
|
||||
nsIContent::AttrValueIs(int32_t aNameSpaceID,
|
||||
nsIAtom* aName,
|
||||
nsIAtom* aValue,
|
||||
nsAtom* aName,
|
||||
nsAtom* aValue,
|
||||
nsCaseTreatment aCaseSensitive) const
|
||||
{
|
||||
return IsElement() &&
|
||||
@ -1537,12 +1537,12 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(FragmentOrElement)
|
||||
}
|
||||
|
||||
if (tmp->IsHTMLElement() || tmp->IsSVGElement()) {
|
||||
nsIAtom*** props = Element::HTMLSVGPropertiesToTraverseAndUnlink();
|
||||
nsAtom*** props = Element::HTMLSVGPropertiesToTraverseAndUnlink();
|
||||
for (uint32_t i = 0; props[i]; ++i) {
|
||||
tmp->DeleteProperty(*props[i]);
|
||||
}
|
||||
if (tmp->MayHaveAnimations()) {
|
||||
nsIAtom** effectProps = EffectSet::GetEffectSetPropertyAtoms();
|
||||
nsAtom** effectProps = EffectSet::GetEffectSetPropertyAtoms();
|
||||
for (uint32_t i = 0; effectProps[i]; ++i) {
|
||||
tmp->DeleteProperty(effectProps[i]);
|
||||
}
|
||||
@ -1599,7 +1599,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(FragmentOrElement)
|
||||
|
||||
void
|
||||
FragmentOrElement::MarkUserData(void* aObject, nsIAtom* aKey, void* aChild,
|
||||
FragmentOrElement::MarkUserData(void* aObject, nsAtom* aKey, void* aChild,
|
||||
void* aData)
|
||||
{
|
||||
uint32_t* gen = static_cast<uint32_t*>(aData);
|
||||
@ -2054,7 +2054,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(FragmentOrElement)
|
||||
}
|
||||
|
||||
nsAutoString id;
|
||||
nsIAtom* idAtom = tmp->GetID();
|
||||
nsAtom* idAtom = tmp->GetID();
|
||||
if (idAtom) {
|
||||
id.AppendLiteral(" id='");
|
||||
id.Append(nsDependentAtomString(idAtom));
|
||||
@ -2103,7 +2103,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(FragmentOrElement)
|
||||
|
||||
// Check that whenever we have effect properties, MayHaveAnimations is set.
|
||||
#ifdef DEBUG
|
||||
nsIAtom** effectProps = EffectSet::GetEffectSetPropertyAtoms();
|
||||
nsAtom** effectProps = EffectSet::GetEffectSetPropertyAtoms();
|
||||
for (uint32_t i = 0; effectProps[i]; ++i) {
|
||||
MOZ_ASSERT_IF(tmp->GetProperty(effectProps[i]), tmp->MayHaveAnimations());
|
||||
}
|
||||
@ -2124,14 +2124,14 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(FragmentOrElement)
|
||||
}
|
||||
}
|
||||
if (tmp->IsHTMLElement() || tmp->IsSVGElement()) {
|
||||
nsIAtom*** props = Element::HTMLSVGPropertiesToTraverseAndUnlink();
|
||||
nsAtom*** props = Element::HTMLSVGPropertiesToTraverseAndUnlink();
|
||||
for (uint32_t i = 0; props[i]; ++i) {
|
||||
nsISupports* property =
|
||||
static_cast<nsISupports*>(tmp->GetProperty(*props[i]));
|
||||
cb.NoteXPCOMChild(property);
|
||||
}
|
||||
if (tmp->MayHaveAnimations()) {
|
||||
nsIAtom** effectProps = EffectSet::GetEffectSetPropertyAtoms();
|
||||
nsAtom** effectProps = EffectSet::GetEffectSetPropertyAtoms();
|
||||
for (uint32_t i = 0; effectProps[i]; ++i) {
|
||||
EffectSet* effectSet =
|
||||
static_cast<EffectSet*>(tmp->GetProperty(effectProps[i]));
|
||||
@ -2306,9 +2306,9 @@ FragmentOrElement::IndexOf(const nsINode* aPossibleChild) const
|
||||
}
|
||||
|
||||
static inline bool
|
||||
IsVoidTag(nsIAtom* aTag)
|
||||
IsVoidTag(nsAtom* aTag)
|
||||
{
|
||||
static const nsIAtom* voidElements[] = {
|
||||
static const nsAtom* voidElements[] = {
|
||||
nsGkAtoms::area, nsGkAtoms::base, nsGkAtoms::basefont,
|
||||
nsGkAtoms::bgsound, nsGkAtoms::br, nsGkAtoms::col,
|
||||
nsGkAtoms::embed, nsGkAtoms::frame,
|
||||
@ -2318,7 +2318,7 @@ IsVoidTag(nsIAtom* aTag)
|
||||
nsGkAtoms::wbr
|
||||
};
|
||||
|
||||
static mozilla::BloomFilter<12, nsIAtom> sFilter;
|
||||
static mozilla::BloomFilter<12, nsAtom> sFilter;
|
||||
static bool sInitialized = false;
|
||||
if (!sInitialized) {
|
||||
sInitialized = true;
|
||||
@ -2339,7 +2339,7 @@ IsVoidTag(nsIAtom* aTag)
|
||||
|
||||
/* static */
|
||||
bool
|
||||
FragmentOrElement::IsHTMLVoid(nsIAtom* aLocalName)
|
||||
FragmentOrElement::IsHTMLVoid(nsAtom* aLocalName)
|
||||
{
|
||||
return aLocalName && IsVoidTag(aLocalName);
|
||||
}
|
||||
@ -2478,7 +2478,7 @@ FragmentOrElement::SetInnerHTMLInternal(const nsAString& aInnerHTML, ErrorResult
|
||||
|
||||
nsAutoScriptLoaderDisabler sld(doc);
|
||||
|
||||
nsIAtom* contextLocalName = NodeInfo()->NameAtom();
|
||||
nsAtom* contextLocalName = NodeInfo()->NameAtom();
|
||||
int32_t contextNameSpaceID = GetNameSpaceID();
|
||||
|
||||
ShadowRoot* shadowRoot = ShadowRoot::FromNode(this);
|
||||
|
@ -221,13 +221,13 @@ public:
|
||||
static void RemoveBlackMarkedNode(nsINode* aNode);
|
||||
static void MarkNodeChildren(nsINode* aNode);
|
||||
static void InitCCCallbacks();
|
||||
static void MarkUserData(void* aObject, nsIAtom* aKey, void* aChild,
|
||||
static void MarkUserData(void* aObject, nsAtom* aKey, void* aChild,
|
||||
void *aData);
|
||||
|
||||
/**
|
||||
* Is the HTML local name a void element?
|
||||
*/
|
||||
static bool IsHTMLVoid(nsIAtom* aLocalName);
|
||||
static bool IsHTMLVoid(nsAtom* aLocalName);
|
||||
protected:
|
||||
virtual ~FragmentOrElement();
|
||||
|
||||
|
@ -120,7 +120,7 @@ IDTracker::Reset(nsIContent* aFromContent, nsIURI* aURI,
|
||||
}
|
||||
|
||||
if (aWatch) {
|
||||
RefPtr<nsIAtom> atom = NS_Atomize(ref);
|
||||
RefPtr<nsAtom> atom = NS_Atomize(ref);
|
||||
if (!atom)
|
||||
return;
|
||||
atom.swap(mWatchID);
|
||||
@ -142,7 +142,7 @@ IDTracker::ResetWithID(nsIContent* aFromContent, const nsString& aID,
|
||||
// XXX Need to take care of XBL/XBL2
|
||||
|
||||
if (aWatch) {
|
||||
RefPtr<nsIAtom> atom = NS_Atomize(aID);
|
||||
RefPtr<nsAtom> atom = NS_Atomize(aID);
|
||||
if (!atom)
|
||||
return;
|
||||
atom.swap(mWatchID);
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
@ -185,7 +185,7 @@ private:
|
||||
};
|
||||
friend class DocumentLoadNotification;
|
||||
|
||||
RefPtr<nsIAtom> mWatchID;
|
||||
RefPtr<nsAtom> mWatchID;
|
||||
nsCOMPtr<nsIDocument> mWatchDocument;
|
||||
RefPtr<Element> mElement;
|
||||
RefPtr<Notification> mPendingNotification;
|
||||
|
@ -204,7 +204,7 @@ Link::TryDNSPrefetchOrPreconnectOrPrefetchOrPreloadOrPrerender()
|
||||
}
|
||||
|
||||
void
|
||||
Link::UpdatePreload(nsIAtom* aName, const nsAttrValue* aValue,
|
||||
Link::UpdatePreload(nsAtom* aName, const nsAttrValue* aValue,
|
||||
const nsAttrValue* aOldValue)
|
||||
{
|
||||
MOZ_ASSERT(mElement->IsInComposedDoc());
|
||||
|
@ -124,7 +124,7 @@ public:
|
||||
|
||||
// This is called by HTMLLinkElement.
|
||||
void TryDNSPrefetchOrPreconnectOrPrefetchOrPreloadOrPrerender();
|
||||
void UpdatePreload(nsIAtom* aName, const nsAttrValue* aValue,
|
||||
void UpdatePreload(nsAtom* aName, const nsAttrValue* aValue,
|
||||
const nsAttrValue* aOldValue);
|
||||
void CancelPrefetchOrPreload();
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "nsNodeInfoManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsDOMString.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsContentUtils.h"
|
||||
@ -45,8 +45,8 @@ NodeInfo::~NodeInfo()
|
||||
NS_IF_RELEASE(mInner.mExtraName);
|
||||
}
|
||||
|
||||
NodeInfo::NodeInfo(nsIAtom *aName, nsIAtom *aPrefix, int32_t aNamespaceID,
|
||||
uint16_t aNodeType, nsIAtom* aExtraName,
|
||||
NodeInfo::NodeInfo(nsAtom *aName, nsAtom *aPrefix, int32_t aNamespaceID,
|
||||
uint16_t aNodeType, nsAtom* aExtraName,
|
||||
nsNodeInfoManager *aOwnerManager)
|
||||
: mDocument(aOwnerManager->GetDocument()),
|
||||
mInner(aName, aPrefix, aNamespaceID, aNodeType, aExtraName),
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "mozilla/dom/NameSpaceConstants.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
|
||||
class nsIDocument;
|
||||
class nsNodeInfoManager;
|
||||
@ -54,7 +54,7 @@ public:
|
||||
* For the HTML element "<body>" this will return the "body" atom and for
|
||||
* the XML element "<html:body>" this will return the "body" atom.
|
||||
*/
|
||||
nsIAtom* NameAtom() const
|
||||
nsAtom* NameAtom() const
|
||||
{
|
||||
return mInner.mName;
|
||||
}
|
||||
@ -98,7 +98,7 @@ public:
|
||||
* For the HTML element "<body>" this will return a null atom and for
|
||||
* the XML element "<html:body>" this will return the "html" atom.
|
||||
*/
|
||||
nsIAtom* GetPrefixAtom() const
|
||||
nsAtom* GetPrefixAtom() const
|
||||
{
|
||||
return mInner.mPrefix;
|
||||
}
|
||||
@ -129,7 +129,7 @@ public:
|
||||
/*
|
||||
* Get the extra name, used by PIs and DocTypes, for the node.
|
||||
*/
|
||||
nsIAtom* GetExtraName() const
|
||||
nsAtom* GetExtraName() const
|
||||
{
|
||||
return mInner.mExtraName;
|
||||
}
|
||||
@ -152,23 +152,23 @@ public:
|
||||
|
||||
bool NameAndNamespaceEquals(NodeInfo* aNodeInfo) const;
|
||||
|
||||
bool Equals(nsIAtom* aNameAtom) const
|
||||
bool Equals(nsAtom* aNameAtom) const
|
||||
{
|
||||
return mInner.mName == aNameAtom;
|
||||
}
|
||||
|
||||
bool Equals(nsIAtom* aNameAtom, nsIAtom* aPrefixAtom) const
|
||||
bool Equals(nsAtom* aNameAtom, nsAtom* aPrefixAtom) const
|
||||
{
|
||||
return (mInner.mName == aNameAtom) && (mInner.mPrefix == aPrefixAtom);
|
||||
}
|
||||
|
||||
bool Equals(nsIAtom* aNameAtom, int32_t aNamespaceID) const
|
||||
bool Equals(nsAtom* aNameAtom, int32_t aNamespaceID) const
|
||||
{
|
||||
return ((mInner.mName == aNameAtom) &&
|
||||
(mInner.mNamespaceID == aNamespaceID));
|
||||
}
|
||||
|
||||
bool Equals(nsIAtom* aNameAtom, nsIAtom* aPrefixAtom, int32_t aNamespaceID) const
|
||||
bool Equals(nsAtom* aNameAtom, nsAtom* aPrefixAtom, int32_t aNamespaceID) const
|
||||
{
|
||||
return ((mInner.mName == aNameAtom) &&
|
||||
(mInner.mPrefix == aPrefixAtom) &&
|
||||
@ -190,7 +190,7 @@ public:
|
||||
|
||||
bool NamespaceEquals(const nsAString& aNamespaceURI) const;
|
||||
|
||||
inline bool QualifiedNameEquals(nsIAtom* aNameAtom) const;
|
||||
inline bool QualifiedNameEquals(nsAtom* aNameAtom) const;
|
||||
|
||||
bool QualifiedNameEquals(const nsAString& aQualifiedName) const
|
||||
{
|
||||
@ -211,8 +211,8 @@ private:
|
||||
|
||||
// NodeInfo is only constructed by nsNodeInfoManager which is a friend class.
|
||||
// aName and aOwnerManager may not be null.
|
||||
NodeInfo(nsIAtom* aName, nsIAtom* aPrefix, int32_t aNamespaceID,
|
||||
uint16_t aNodeType, nsIAtom* aExtraName,
|
||||
NodeInfo(nsAtom* aName, nsAtom* aPrefix, int32_t aNamespaceID,
|
||||
uint16_t aNodeType, nsAtom* aExtraName,
|
||||
nsNodeInfoManager* aOwnerManager);
|
||||
|
||||
~NodeInfo();
|
||||
@ -250,14 +250,14 @@ protected:
|
||||
mHash(0), mHashInitialized(false)
|
||||
{
|
||||
}
|
||||
NodeInfoInner(nsIAtom *aName, nsIAtom *aPrefix, int32_t aNamespaceID,
|
||||
uint16_t aNodeType, nsIAtom* aExtraName)
|
||||
NodeInfoInner(nsAtom *aName, nsAtom *aPrefix, int32_t aNamespaceID,
|
||||
uint16_t aNodeType, nsAtom* aExtraName)
|
||||
: mName(aName), mPrefix(aPrefix), mNamespaceID(aNamespaceID),
|
||||
mNodeType(aNodeType), mNameString(nullptr), mExtraName(aExtraName),
|
||||
mHash(aName->hash()), mHashInitialized(true)
|
||||
{
|
||||
}
|
||||
NodeInfoInner(const nsAString& aTmpName, nsIAtom *aPrefix,
|
||||
NodeInfoInner(const nsAString& aTmpName, nsAtom *aPrefix,
|
||||
int32_t aNamespaceID, uint16_t aNodeType)
|
||||
: mName(nullptr), mPrefix(aPrefix), mNamespaceID(aNamespaceID),
|
||||
mNodeType(aNodeType), mNameString(&aTmpName), mExtraName(nullptr),
|
||||
@ -265,12 +265,12 @@ protected:
|
||||
{
|
||||
}
|
||||
|
||||
nsIAtom* const MOZ_OWNING_REF mName;
|
||||
nsIAtom* MOZ_OWNING_REF mPrefix;
|
||||
nsAtom* const MOZ_OWNING_REF mName;
|
||||
nsAtom* MOZ_OWNING_REF mPrefix;
|
||||
int32_t mNamespaceID;
|
||||
uint16_t mNodeType; // As defined by nsIDOMNode.nodeType
|
||||
const nsAString* const mNameString;
|
||||
nsIAtom* MOZ_OWNING_REF mExtraName; // Only used by PIs and DocTypes
|
||||
nsAtom* MOZ_OWNING_REF mExtraName; // Only used by PIs and DocTypes
|
||||
PLHashNumber mHash;
|
||||
bool mHashInitialized;
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
#ifndef mozilla_dom_NodeInfoInlines_h___
|
||||
#define mozilla_dom_NodeInfoInlines_h___
|
||||
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsDOMString.h"
|
||||
#include "nsGkAtoms.h"
|
||||
@ -58,7 +58,7 @@ NodeInfo::Equals(const nsAString& aName, const nsAString& aPrefix,
|
||||
}
|
||||
|
||||
inline bool
|
||||
NodeInfo::QualifiedNameEquals(nsIAtom* aNameAtom) const
|
||||
NodeInfo::QualifiedNameEquals(nsAtom* aNameAtom) const
|
||||
{
|
||||
MOZ_ASSERT(aNameAtom, "Must have name atom");
|
||||
if (!GetPrefixAtom()) {
|
||||
@ -72,8 +72,8 @@ NodeInfo::QualifiedNameEquals(nsIAtom* aNameAtom) const
|
||||
} // namespace mozilla
|
||||
|
||||
inline void
|
||||
CheckValidNodeInfo(uint16_t aNodeType, nsIAtom *aName, int32_t aNamespaceID,
|
||||
nsIAtom* aExtraName)
|
||||
CheckValidNodeInfo(uint16_t aNodeType, nsAtom *aName, int32_t aNamespaceID,
|
||||
nsAtom* aExtraName)
|
||||
{
|
||||
MOZ_ASSERT(aNodeType == nsIDOMNode::ELEMENT_NODE ||
|
||||
aNodeType == nsIDOMNode::ATTRIBUTE_NODE ||
|
||||
|
@ -195,7 +195,7 @@ ShadowRoot::GetElementsByTagNameNS(const nsAString& aNamespaceURI,
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::AddToIdTable(Element* aElement, nsIAtom* aId)
|
||||
ShadowRoot::AddToIdTable(Element* aElement, nsAtom* aId)
|
||||
{
|
||||
nsIdentifierMapEntry* entry = mIdentifierMap.PutEntry(aId);
|
||||
if (entry) {
|
||||
@ -204,7 +204,7 @@ ShadowRoot::AddToIdTable(Element* aElement, nsIAtom* aId)
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::RemoveFromIdTable(Element* aElement, nsIAtom* aId)
|
||||
ShadowRoot::RemoveFromIdTable(Element* aElement, nsAtom* aId)
|
||||
{
|
||||
nsIdentifierMapEntry* entry = mIdentifierMap.GetEntry(aId);
|
||||
if (entry) {
|
||||
@ -477,7 +477,7 @@ void
|
||||
ShadowRoot::AttributeChanged(nsIDocument* aDocument,
|
||||
Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
nsAtom* aAttribute,
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "nsIdentifierMapEntry.h"
|
||||
#include "nsTHashtable.h"
|
||||
|
||||
class nsIAtom;
|
||||
class nsAtom;
|
||||
class nsIContent;
|
||||
class nsXBLPrototypeBinding;
|
||||
|
||||
@ -45,8 +45,8 @@ public:
|
||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
||||
nsXBLPrototypeBinding* aProtoBinding);
|
||||
|
||||
void AddToIdTable(Element* aElement, nsIAtom* aId);
|
||||
void RemoveFromIdTable(Element* aElement, nsIAtom* aId);
|
||||
void AddToIdTable(Element* aElement, nsAtom* aId);
|
||||
void RemoveFromIdTable(Element* aElement, nsAtom* aId);
|
||||
void InsertSheet(StyleSheet* aSheet, nsIContent* aLinkingContent);
|
||||
void RemoveSheet(StyleSheet* aSheet);
|
||||
bool ApplyAuthorStyles();
|
||||
|
@ -2356,14 +2356,14 @@ WebSocketImpl::UpdateURI()
|
||||
}
|
||||
|
||||
void
|
||||
WebSocket::EventListenerAdded(nsIAtom* aType)
|
||||
WebSocket::EventListenerAdded(nsAtom* aType)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
UpdateMustKeepAlive();
|
||||
}
|
||||
|
||||
void
|
||||
WebSocket::EventListenerRemoved(nsIAtom* aType)
|
||||
WebSocket::EventListenerRemoved(nsAtom* aType)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
UpdateMustKeepAlive();
|
||||
|
@ -53,10 +53,10 @@ public:
|
||||
|
||||
// EventTarget
|
||||
using EventTarget::EventListenerAdded;
|
||||
virtual void EventListenerAdded(nsIAtom* aType) override;
|
||||
virtual void EventListenerAdded(nsAtom* aType) override;
|
||||
|
||||
using EventTarget::EventListenerRemoved;
|
||||
virtual void EventListenerRemoved(nsIAtom* aType) override;
|
||||
virtual void EventListenerRemoved(nsAtom* aType) override;
|
||||
|
||||
virtual void DisconnectFromOwner() override;
|
||||
|
||||
|
@ -9,11 +9,11 @@
|
||||
*/
|
||||
|
||||
#include "nsAtomListUtils.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsStaticAtom.h"
|
||||
|
||||
/* static */ bool
|
||||
nsAtomListUtils::IsMember(nsIAtom *aAtom,
|
||||
nsAtomListUtils::IsMember(nsAtom *aAtom,
|
||||
const nsStaticAtom* aInfo,
|
||||
uint32_t aInfoCount)
|
||||
{
|
||||
|
@ -13,12 +13,12 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
class nsIAtom;
|
||||
class nsAtom;
|
||||
struct nsStaticAtom;
|
||||
|
||||
class nsAtomListUtils {
|
||||
public:
|
||||
static bool IsMember(nsIAtom *aAtom,
|
||||
static bool IsMember(nsAtom *aAtom,
|
||||
const nsStaticAtom* aInfo,
|
||||
uint32_t aInfoCount);
|
||||
};
|
||||
|
@ -298,7 +298,7 @@ nsAttrAndChildArray::AttrCount() const
|
||||
}
|
||||
|
||||
const nsAttrValue*
|
||||
nsAttrAndChildArray::GetAttr(nsIAtom* aLocalName, int32_t aNamespaceID) const
|
||||
nsAttrAndChildArray::GetAttr(nsAtom* aLocalName, int32_t aNamespaceID) const
|
||||
{
|
||||
uint32_t i, slotCount = AttrSlotCount();
|
||||
if (aNamespaceID == kNameSpaceID_None) {
|
||||
@ -389,7 +389,7 @@ nsAttrAndChildArray::AttrAt(uint32_t aPos) const
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsAttrAndChildArray::SetAndSwapAttr(nsIAtom* aLocalName, nsAttrValue& aValue,
|
||||
nsAttrAndChildArray::SetAndSwapAttr(nsAtom* aLocalName, nsAttrValue& aValue,
|
||||
bool* aHadValue)
|
||||
{
|
||||
*aHadValue = false;
|
||||
@ -421,7 +421,7 @@ nsAttrAndChildArray::SetAndSwapAttr(mozilla::dom::NodeInfo* aName,
|
||||
nsAttrValue& aValue, bool* aHadValue)
|
||||
{
|
||||
int32_t namespaceID = aName->NamespaceID();
|
||||
nsIAtom* localName = aName->NameAtom();
|
||||
nsAtom* localName = aName->NameAtom();
|
||||
if (namespaceID == kNameSpaceID_None) {
|
||||
return SetAndSwapAttr(localName, aValue, aHadValue);
|
||||
}
|
||||
@ -555,7 +555,7 @@ nsAttrAndChildArray::GetExistingAttrNameFromQName(const nsAString& aName) const
|
||||
}
|
||||
|
||||
int32_t
|
||||
nsAttrAndChildArray::IndexOfAttr(nsIAtom* aLocalName, int32_t aNamespaceID) const
|
||||
nsAttrAndChildArray::IndexOfAttr(nsAtom* aLocalName, int32_t aNamespaceID) const
|
||||
{
|
||||
int32_t idx;
|
||||
if (mImpl && mImpl->mMappedAttrs && aNamespaceID == kNameSpaceID_None) {
|
||||
@ -593,7 +593,7 @@ nsAttrAndChildArray::IndexOfAttr(nsIAtom* aLocalName, int32_t aNamespaceID) cons
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsAttrAndChildArray::SetAndSwapMappedAttr(nsIAtom* aLocalName,
|
||||
nsAttrAndChildArray::SetAndSwapMappedAttr(nsAtom* aLocalName,
|
||||
nsAttrValue& aValue,
|
||||
nsMappedAttributeElement* aContent,
|
||||
nsHTMLStyleSheet* aSheet,
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
}
|
||||
|
||||
uint32_t AttrCount() const;
|
||||
const nsAttrValue* GetAttr(nsIAtom* aLocalName,
|
||||
const nsAttrValue* GetAttr(nsAtom* aLocalName,
|
||||
int32_t aNamespaceID = kNameSpaceID_None) const;
|
||||
// As above but using a string attr name and always using
|
||||
// kNameSpaceID_None. This is always case-sensitive.
|
||||
@ -94,7 +94,7 @@ public:
|
||||
// If the attribute was unset, an empty value will be swapped into aValue
|
||||
// and aHadValue will be set to false. Otherwise, aHadValue will be set to
|
||||
// true.
|
||||
nsresult SetAndSwapAttr(nsIAtom* aLocalName, nsAttrValue& aValue,
|
||||
nsresult SetAndSwapAttr(nsAtom* aLocalName, nsAttrValue& aValue,
|
||||
bool* aHadValue);
|
||||
nsresult SetAndSwapAttr(mozilla::dom::NodeInfo* aName, nsAttrValue& aValue,
|
||||
bool* aHadValue);
|
||||
@ -113,13 +113,13 @@ public:
|
||||
const nsAttrName* GetSafeAttrNameAt(uint32_t aPos) const;
|
||||
|
||||
const nsAttrName* GetExistingAttrNameFromQName(const nsAString& aName) const;
|
||||
int32_t IndexOfAttr(nsIAtom* aLocalName, int32_t aNamespaceID = kNameSpaceID_None) const;
|
||||
int32_t IndexOfAttr(nsAtom* aLocalName, int32_t aNamespaceID = kNameSpaceID_None) const;
|
||||
|
||||
// SetAndSwapMappedAttr swaps the current attribute value with aValue.
|
||||
// If the attribute was unset, an empty value will be swapped into aValue
|
||||
// and aHadValue will be set to false. Otherwise, aHadValue will be set to
|
||||
// true.
|
||||
nsresult SetAndSwapMappedAttr(nsIAtom* aLocalName, nsAttrValue& aValue,
|
||||
nsresult SetAndSwapMappedAttr(nsAtom* aLocalName, nsAttrValue& aValue,
|
||||
nsMappedAttributeElement* aContent,
|
||||
nsHTMLStyleSheet* aSheet,
|
||||
bool* aHadValue);
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define nsAttrName_h___
|
||||
|
||||
#include "mozilla/dom/NodeInfo.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsDOMString.h"
|
||||
|
||||
#define NS_ATTRNAME_NODEINFO_BIT 1
|
||||
@ -27,7 +27,7 @@ public:
|
||||
AddRefInternalName();
|
||||
}
|
||||
|
||||
explicit nsAttrName(nsIAtom* aAtom)
|
||||
explicit nsAttrName(nsAtom* aAtom)
|
||||
: mBits(reinterpret_cast<uintptr_t>(aAtom))
|
||||
{
|
||||
NS_ASSERTION(aAtom, "null atom-name in nsAttrName");
|
||||
@ -69,7 +69,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetTo(nsIAtom* aAtom)
|
||||
void SetTo(nsAtom* aAtom)
|
||||
{
|
||||
NS_ASSERTION(aAtom, "null atom-name in nsAttrName");
|
||||
|
||||
@ -89,10 +89,10 @@ public:
|
||||
return reinterpret_cast<mozilla::dom::NodeInfo*>(mBits & ~NS_ATTRNAME_NODEINFO_BIT);
|
||||
}
|
||||
|
||||
nsIAtom* Atom() const
|
||||
nsAtom* Atom() const
|
||||
{
|
||||
NS_ASSERTION(IsAtom(), "getting atom-value of nodeinfo-name");
|
||||
return reinterpret_cast<nsIAtom*>(mBits);
|
||||
return reinterpret_cast<nsAtom*>(mBits);
|
||||
}
|
||||
|
||||
bool Equals(const nsAttrName& aOther) const
|
||||
@ -105,7 +105,7 @@ public:
|
||||
// call this function on nsAttrName structs with 0 mBits, so no attempt
|
||||
// must be made to do anything with mBits besides comparing it with the
|
||||
// incoming aAtom argument.
|
||||
bool Equals(nsIAtom* aAtom) const
|
||||
bool Equals(nsAtom* aAtom) const
|
||||
{
|
||||
return reinterpret_cast<uintptr_t>(aAtom) == mBits;
|
||||
}
|
||||
@ -116,7 +116,7 @@ public:
|
||||
return IsAtom() && Atom()->Equals(aLocalName);
|
||||
}
|
||||
|
||||
bool Equals(nsIAtom* aLocalName, int32_t aNamespaceID) const
|
||||
bool Equals(nsAtom* aLocalName, int32_t aNamespaceID) const
|
||||
{
|
||||
if (aNamespaceID == kNameSpaceID_None) {
|
||||
return Equals(aLocalName);
|
||||
@ -141,12 +141,12 @@ public:
|
||||
(!IsAtom() && NodeInfo()->NamespaceEquals(aNamespaceID));
|
||||
}
|
||||
|
||||
nsIAtom* LocalName() const
|
||||
nsAtom* LocalName() const
|
||||
{
|
||||
return IsAtom() ? Atom() : NodeInfo()->NameAtom();
|
||||
}
|
||||
|
||||
nsIAtom* GetPrefix() const
|
||||
nsAtom* GetPrefix() const
|
||||
{
|
||||
return IsAtom() ? nullptr : NodeInfo()->GetPrefixAtom();
|
||||
}
|
||||
@ -187,7 +187,7 @@ public:
|
||||
return mBits - 0;
|
||||
}
|
||||
|
||||
bool IsSmaller(nsIAtom* aOther) const
|
||||
bool IsSmaller(nsAtom* aOther) const
|
||||
{
|
||||
return mBits < reinterpret_cast<uintptr_t>(aOther);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "nsAttrValue.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/ServoBindingTypes.h"
|
||||
@ -60,7 +60,7 @@ MiscContainer::GetString(nsAString& aString) const
|
||||
return true;
|
||||
}
|
||||
|
||||
nsIAtom* atom = static_cast<nsIAtom*>(ptr);
|
||||
nsAtom* atom = static_cast<nsAtom*>(ptr);
|
||||
if (!atom) {
|
||||
return false;
|
||||
}
|
||||
@ -145,7 +145,7 @@ nsAttrValue::nsAttrValue(const nsAString& aValue)
|
||||
SetTo(aValue);
|
||||
}
|
||||
|
||||
nsAttrValue::nsAttrValue(nsIAtom* aValue)
|
||||
nsAttrValue::nsAttrValue(nsAtom* aValue)
|
||||
: mBits(0)
|
||||
{
|
||||
SetTo(aValue);
|
||||
@ -232,7 +232,7 @@ nsAttrValue::Reset()
|
||||
}
|
||||
case eAtomBase:
|
||||
{
|
||||
nsIAtom* atom = GetAtomValue();
|
||||
nsAtom* atom = GetAtomValue();
|
||||
NS_RELEASE(atom);
|
||||
|
||||
break;
|
||||
@ -271,7 +271,7 @@ nsAttrValue::SetTo(const nsAttrValue& aOther)
|
||||
case eAtomBase:
|
||||
{
|
||||
ResetIfSet();
|
||||
nsIAtom* atom = aOther.GetAtomValue();
|
||||
nsAtom* atom = aOther.GetAtomValue();
|
||||
NS_ADDREF(atom);
|
||||
SetPtrValueAndType(atom, eAtomBase);
|
||||
return;
|
||||
@ -368,7 +368,7 @@ nsAttrValue::SetTo(const nsAttrValue& aOther)
|
||||
eStringBase) {
|
||||
static_cast<nsStringBuffer*>(otherPtr)->AddRef();
|
||||
} else {
|
||||
static_cast<nsIAtom*>(otherPtr)->AddRef();
|
||||
static_cast<nsAtom*>(otherPtr)->AddRef();
|
||||
}
|
||||
cont->mStringBits = otherCont->mStringBits;
|
||||
}
|
||||
@ -388,7 +388,7 @@ nsAttrValue::SetTo(const nsAString& aValue)
|
||||
}
|
||||
|
||||
void
|
||||
nsAttrValue::SetTo(nsIAtom* aValue)
|
||||
nsAttrValue::SetTo(nsAtom* aValue)
|
||||
{
|
||||
ResetIfSet();
|
||||
if (aValue) {
|
||||
@ -606,7 +606,7 @@ nsAttrValue::ToString(nsAString& aResult) const
|
||||
}
|
||||
case eAtom:
|
||||
{
|
||||
nsIAtom *atom = static_cast<nsIAtom*>(GetPtr());
|
||||
nsAtom *atom = static_cast<nsAtom*>(GetPtr());
|
||||
atom->ToString(aResult);
|
||||
|
||||
break;
|
||||
@ -745,7 +745,7 @@ nsAttrValue::ToString(nsAString& aResult) const
|
||||
}
|
||||
}
|
||||
|
||||
already_AddRefed<nsIAtom>
|
||||
already_AddRefed<nsAtom>
|
||||
nsAttrValue::GetAsAtom() const
|
||||
{
|
||||
switch (Type()) {
|
||||
@ -754,7 +754,7 @@ nsAttrValue::GetAsAtom() const
|
||||
|
||||
case eAtom:
|
||||
{
|
||||
RefPtr<nsIAtom> atom = GetAtomValue();
|
||||
RefPtr<nsAtom> atom = GetAtomValue();
|
||||
return atom.forget();
|
||||
}
|
||||
|
||||
@ -830,7 +830,7 @@ nsAttrValue::GetAtomCount() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
nsAtom*
|
||||
nsAttrValue::AtomAt(int32_t aIndex) const
|
||||
{
|
||||
NS_PRECONDITION(aIndex >= 0, "Index must not be negative");
|
||||
@ -913,7 +913,7 @@ nsAttrValue::HashValue() const
|
||||
{
|
||||
uint32_t hash = 0;
|
||||
uint32_t count = cont->mValue.mAtomArray->Length();
|
||||
for (RefPtr<nsIAtom> *cur = cont->mValue.mAtomArray->Elements(),
|
||||
for (RefPtr<nsAtom> *cur = cont->mValue.mAtomArray->Elements(),
|
||||
*end = cur + count;
|
||||
cur != end; ++cur) {
|
||||
hash = AddToHash(hash, cur->get());
|
||||
@ -1086,10 +1086,10 @@ nsAttrValue::Equals(const nsAString& aValue,
|
||||
}
|
||||
case eAtomBase:
|
||||
if (aCaseSensitive == eCaseMatters) {
|
||||
return static_cast<nsIAtom*>(GetPtr())->Equals(aValue);
|
||||
return static_cast<nsAtom*>(GetPtr())->Equals(aValue);
|
||||
}
|
||||
return nsContentUtils::EqualsIgnoreASCIICase(
|
||||
nsDependentAtomString(static_cast<nsIAtom*>(GetPtr())),
|
||||
nsDependentAtomString(static_cast<nsAtom*>(GetPtr())),
|
||||
aValue);
|
||||
default:
|
||||
break;
|
||||
@ -1102,7 +1102,7 @@ nsAttrValue::Equals(const nsAString& aValue,
|
||||
}
|
||||
|
||||
bool
|
||||
nsAttrValue::Equals(nsIAtom* aValue, nsCaseTreatment aCaseSensitive) const
|
||||
nsAttrValue::Equals(nsAtom* aValue, nsCaseTreatment aCaseSensitive) const
|
||||
{
|
||||
if (aCaseSensitive != eCaseMatters) {
|
||||
// Need a better way to handle this!
|
||||
@ -1124,7 +1124,7 @@ nsAttrValue::Equals(nsIAtom* aValue, nsCaseTreatment aCaseSensitive) const
|
||||
}
|
||||
case eAtomBase:
|
||||
{
|
||||
return static_cast<nsIAtom*>(GetPtr()) == aValue;
|
||||
return static_cast<nsAtom*>(GetPtr()) == aValue;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
@ -1166,12 +1166,12 @@ nsAttrValue::EqualsAsStrings(const nsAttrValue& aOther) const
|
||||
}
|
||||
|
||||
bool
|
||||
nsAttrValue::Contains(nsIAtom* aValue, nsCaseTreatment aCaseSensitive) const
|
||||
nsAttrValue::Contains(nsAtom* aValue, nsCaseTreatment aCaseSensitive) const
|
||||
{
|
||||
switch (BaseType()) {
|
||||
case eAtomBase:
|
||||
{
|
||||
nsIAtom* atom = GetAtomValue();
|
||||
nsAtom* atom = GetAtomValue();
|
||||
|
||||
if (aCaseSensitive == eCaseMatters) {
|
||||
return aValue == atom;
|
||||
@ -1193,7 +1193,7 @@ nsAttrValue::Contains(nsIAtom* aValue, nsCaseTreatment aCaseSensitive) const
|
||||
|
||||
nsDependentAtomString val1(aValue);
|
||||
|
||||
for (RefPtr<nsIAtom> *cur = array->Elements(),
|
||||
for (RefPtr<nsAtom> *cur = array->Elements(),
|
||||
*end = cur + array->Length();
|
||||
cur != end; ++cur) {
|
||||
// For performance reasons, don't do a full on unicode case
|
||||
@ -1212,7 +1212,7 @@ nsAttrValue::Contains(nsIAtom* aValue, nsCaseTreatment aCaseSensitive) const
|
||||
}
|
||||
|
||||
struct AtomArrayStringComparator {
|
||||
bool Equals(nsIAtom* atom, const nsAString& string) const {
|
||||
bool Equals(nsAtom* atom, const nsAString& string) const {
|
||||
return atom->Equals(string);
|
||||
}
|
||||
};
|
||||
@ -1223,7 +1223,7 @@ nsAttrValue::Contains(const nsAString& aValue) const
|
||||
switch (BaseType()) {
|
||||
case eAtomBase:
|
||||
{
|
||||
nsIAtom* atom = GetAtomValue();
|
||||
nsAtom* atom = GetAtomValue();
|
||||
return atom->Equals(aValue);
|
||||
}
|
||||
default:
|
||||
@ -1243,7 +1243,7 @@ nsAttrValue::ParseAtom(const nsAString& aValue)
|
||||
{
|
||||
ResetIfSet();
|
||||
|
||||
RefPtr<nsIAtom> atom = NS_Atomize(aValue);
|
||||
RefPtr<nsAtom> atom = NS_Atomize(aValue);
|
||||
if (atom) {
|
||||
SetPtrValueAndType(atom.forget().take(), eAtomBase);
|
||||
}
|
||||
@ -1275,7 +1275,7 @@ nsAttrValue::ParseAtomArray(const nsAString& aValue)
|
||||
++iter;
|
||||
} while (iter != end && !nsContentUtils::IsHTMLWhitespace(*iter));
|
||||
|
||||
RefPtr<nsIAtom> classAtom = NS_AtomizeMainThread(Substring(start, iter));
|
||||
RefPtr<nsAtom> classAtom = NS_AtomizeMainThread(Substring(start, iter));
|
||||
if (!classAtom) {
|
||||
Reset();
|
||||
return;
|
||||
@ -1291,7 +1291,7 @@ nsAttrValue::ParseAtomArray(const nsAString& aValue)
|
||||
// we only found one classname and there was no whitespace so
|
||||
// don't bother storing a list
|
||||
ResetIfSet();
|
||||
nsIAtom* atom = nullptr;
|
||||
nsAtom* atom = nullptr;
|
||||
classAtom.swap(atom);
|
||||
SetPtrValueAndType(atom, eAtomBase);
|
||||
return;
|
||||
@ -1796,7 +1796,7 @@ nsAttrValue::SetMiscAtomOrString(const nsAString* aValue)
|
||||
"Empty string?");
|
||||
MiscContainer* cont = GetMiscContainer();
|
||||
if (len <= NS_ATTRVALUE_MAX_STRINGLENGTH_ATOM) {
|
||||
RefPtr<nsIAtom> atom = NS_AtomizeMainThread(*aValue);
|
||||
RefPtr<nsAtom> atom = NS_AtomizeMainThread(*aValue);
|
||||
if (atom) {
|
||||
cont->mStringBits =
|
||||
reinterpret_cast<uintptr_t>(atom.forget().take()) | eAtomBase;
|
||||
@ -1820,7 +1820,7 @@ nsAttrValue::ResetMiscAtomOrString()
|
||||
eStringBase) {
|
||||
static_cast<nsStringBuffer*>(ptr)->Release();
|
||||
} else {
|
||||
static_cast<nsIAtom*>(ptr)->Release();
|
||||
static_cast<nsAtom*>(ptr)->Release();
|
||||
}
|
||||
cont->mStringBits = 0;
|
||||
}
|
||||
@ -1998,7 +1998,7 @@ nsAttrValue::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
// need a way to call the Servo heap_size_of function.
|
||||
//n += container->mCSSDeclaration->SizeOfIncludingThis(aMallocSizeOf);
|
||||
} else if (Type() == eAtomArray && container->mValue.mAtomArray) {
|
||||
// Don't measure each nsIAtom, they are measured separatly.
|
||||
// Don't measure each nsAtom, they are measured separatly.
|
||||
n += container->mValue.mAtomArray->ShallowSizeOfIncludingThis(aMallocSizeOf);
|
||||
}
|
||||
break;
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "nsStringFwd.h"
|
||||
#include "SVGAttrValueWrapper.h"
|
||||
#include "nsTArrayForwardDeclare.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/dom/BindingDeclarations.h"
|
||||
#include "mozilla/EnumTypeTraits.h"
|
||||
@ -84,7 +84,7 @@ public:
|
||||
class nsAttrValue {
|
||||
friend struct MiscContainer;
|
||||
public:
|
||||
typedef nsTArray< RefPtr<nsIAtom> > AtomArray;
|
||||
typedef nsTArray< RefPtr<nsAtom> > AtomArray;
|
||||
|
||||
// This has to be the same as in ValueBaseType
|
||||
enum ValueType {
|
||||
@ -122,7 +122,7 @@ public:
|
||||
nsAttrValue();
|
||||
nsAttrValue(const nsAttrValue& aOther);
|
||||
explicit nsAttrValue(const nsAString& aValue);
|
||||
explicit nsAttrValue(nsIAtom* aValue);
|
||||
explicit nsAttrValue(nsAtom* aValue);
|
||||
nsAttrValue(already_AddRefed<mozilla::DeclarationBlock> aValue,
|
||||
const nsAString* aSerialized);
|
||||
explicit nsAttrValue(const nsIntMargin& aValue);
|
||||
@ -145,7 +145,7 @@ public:
|
||||
|
||||
void SetTo(const nsAttrValue& aOther);
|
||||
void SetTo(const nsAString& aValue);
|
||||
void SetTo(nsIAtom* aValue);
|
||||
void SetTo(nsAtom* aValue);
|
||||
void SetTo(int16_t aInt);
|
||||
void SetTo(int32_t aInt, const nsAString* aSerialized);
|
||||
void SetTo(double aValue, const nsAString* aSerialized);
|
||||
@ -189,13 +189,13 @@ public:
|
||||
* Returns the value of this object as an atom. If necessary, the value will
|
||||
* first be serialised using ToString before converting to an atom.
|
||||
*/
|
||||
already_AddRefed<nsIAtom> GetAsAtom() const;
|
||||
already_AddRefed<nsAtom> GetAsAtom() const;
|
||||
|
||||
// Methods to get value. These methods do not convert so only use them
|
||||
// to retrieve the datatype that this nsAttrValue has.
|
||||
inline bool IsEmptyString() const;
|
||||
const nsCheapString GetStringValue() const;
|
||||
inline nsIAtom* GetAtomValue() const;
|
||||
inline nsAtom* GetAtomValue() const;
|
||||
inline int32_t GetIntegerValue() const;
|
||||
bool GetColorValue(nscolor& aColor) const;
|
||||
inline int16_t GetEnumValue() const;
|
||||
@ -221,13 +221,13 @@ public:
|
||||
uint32_t GetAtomCount() const;
|
||||
// Returns the atom at aIndex (0-based). Do not call this with
|
||||
// aIndex >= GetAtomCount().
|
||||
nsIAtom* AtomAt(int32_t aIndex) const;
|
||||
nsAtom* AtomAt(int32_t aIndex) const;
|
||||
|
||||
uint32_t HashValue() const;
|
||||
bool Equals(const nsAttrValue& aOther) const;
|
||||
// aCaseSensitive == eIgnoreCase means ASCII case-insenstive matching
|
||||
bool Equals(const nsAString& aValue, nsCaseTreatment aCaseSensitive) const;
|
||||
bool Equals(nsIAtom* aValue, nsCaseTreatment aCaseSensitive) const;
|
||||
bool Equals(nsAtom* aValue, nsCaseTreatment aCaseSensitive) const;
|
||||
|
||||
/**
|
||||
* Compares this object with aOther according to their string representation.
|
||||
@ -242,7 +242,7 @@ public:
|
||||
* Returns true if this AttrValue is equal to the given atom, or is an
|
||||
* array which contains the given atom.
|
||||
*/
|
||||
bool Contains(nsIAtom* aValue, nsCaseTreatment aCaseSensitive) const;
|
||||
bool Contains(nsAtom* aValue, nsCaseTreatment aCaseSensitive) const;
|
||||
/**
|
||||
* Returns true if this AttrValue is an atom equal to the given
|
||||
* string, or is an array of atoms which contains the given string.
|
||||
@ -501,11 +501,11 @@ nsAttrValue::operator=(const nsAttrValue& aOther)
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline nsIAtom*
|
||||
inline nsAtom*
|
||||
nsAttrValue::GetAtomValue() const
|
||||
{
|
||||
NS_PRECONDITION(Type() == eAtom, "wrong type");
|
||||
return reinterpret_cast<nsIAtom*>(GetPtr());
|
||||
return reinterpret_cast<nsAtom*>(GetPtr());
|
||||
}
|
||||
|
||||
inline nsAttrValue::ValueBaseType
|
||||
@ -543,7 +543,7 @@ nsAttrValue::ToString(mozilla::dom::DOMString& aResult) const
|
||||
}
|
||||
case eAtom:
|
||||
{
|
||||
nsIAtom *atom = static_cast<nsIAtom*>(GetPtr());
|
||||
nsAtom *atom = static_cast<nsAtom*>(GetPtr());
|
||||
aResult.SetStringBuffer(atom->GetStringBuffer(), atom->GetLength());
|
||||
break;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ struct MiscContainer final
|
||||
typedef nsAttrValue::ValueType ValueType;
|
||||
|
||||
ValueType mType;
|
||||
// mStringBits points to either nsIAtom* or nsStringBuffer* and is used when
|
||||
// mStringBits points to either nsAtom* or nsStringBuffer* and is used when
|
||||
// mType isn't eCSSDeclaration.
|
||||
// Note eStringBase and eAtomBase is used also to handle the type of
|
||||
// mStringBits.
|
||||
|
@ -86,7 +86,7 @@ nsCCUncollectableMarker::Init()
|
||||
}
|
||||
|
||||
static void
|
||||
MarkUserData(void* aNode, nsIAtom* aKey, void* aValue, void* aData)
|
||||
MarkUserData(void* aNode, nsAtom* aKey, void* aValue, void* aData)
|
||||
{
|
||||
nsIDocument* d = static_cast<nsINode*>(aNode)->GetUncomposedDoc();
|
||||
if (d && nsCCUncollectableMarker::InGeneration(d->GetMarkedCCGeneration())) {
|
||||
|
@ -401,7 +401,7 @@ nsContentIterator::InitInternal(const RawRangeBoundary& aStart,
|
||||
// case in order to address bug 1215798.
|
||||
bool startIsContainer = true;
|
||||
if (aStart.Container()->IsHTMLElement()) {
|
||||
nsIAtom* name = aStart.Container()->NodeInfo()->NameAtom();
|
||||
nsAtom* name = aStart.Container()->NodeInfo()->NameAtom();
|
||||
startIsContainer =
|
||||
nsHTMLElement::IsContainer(nsHTMLTags::AtomTagToId(name));
|
||||
}
|
||||
@ -460,7 +460,7 @@ nsContentIterator::InitInternal(const RawRangeBoundary& aStart,
|
||||
// include the end node in the range).
|
||||
bool endIsContainer = true;
|
||||
if (aEnd.Container()->IsHTMLElement()) {
|
||||
nsIAtom* name = aEnd.Container()->NodeInfo()->NameAtom();
|
||||
nsAtom* name = aEnd.Container()->NodeInfo()->NameAtom();
|
||||
endIsContainer =
|
||||
nsHTMLElement::IsContainer(nsHTMLTags::AtomTagToId(name));
|
||||
}
|
||||
|
@ -289,8 +289,8 @@ NS_GetContentList(nsINode* aRootNode,
|
||||
if (!list) {
|
||||
// We need to create a ContentList and add it to our new entry, if
|
||||
// we have an entry
|
||||
RefPtr<nsIAtom> xmlAtom = NS_Atomize(aTagname);
|
||||
RefPtr<nsIAtom> htmlAtom;
|
||||
RefPtr<nsAtom> xmlAtom = NS_Atomize(aTagname);
|
||||
RefPtr<nsAtom> htmlAtom;
|
||||
if (aMatchNameSpaceId == kNameSpaceID_Unknown) {
|
||||
nsAutoString lowercaseName;
|
||||
nsContentUtils::ASCIIToLower(aTagname, lowercaseName);
|
||||
@ -420,8 +420,8 @@ GetFuncStringContentList<nsCacheableFuncStringHTMLCollection>(nsINode* aRootNode
|
||||
|
||||
nsContentList::nsContentList(nsINode* aRootNode,
|
||||
int32_t aMatchNameSpaceId,
|
||||
nsIAtom* aHTMLMatchAtom,
|
||||
nsIAtom* aXMLMatchAtom,
|
||||
nsAtom* aHTMLMatchAtom,
|
||||
nsAtom* aXMLMatchAtom,
|
||||
bool aDeep,
|
||||
bool aLiveList)
|
||||
: nsBaseContentList(),
|
||||
@ -464,7 +464,7 @@ nsContentList::nsContentList(nsINode* aRootNode,
|
||||
nsContentListDestroyFunc aDestroyFunc,
|
||||
void* aData,
|
||||
bool aDeep,
|
||||
nsIAtom* aMatchAtom,
|
||||
nsAtom* aMatchAtom,
|
||||
int32_t aMatchNameSpaceId,
|
||||
bool aFuncMayDependOnAttr,
|
||||
bool aLiveList)
|
||||
@ -562,7 +562,7 @@ nsContentList::NamedItem(const nsAString& aName, bool aDoFlush)
|
||||
uint32_t i, count = mElements.Length();
|
||||
|
||||
// Typically IDs and names are atomized
|
||||
RefPtr<nsIAtom> name = NS_Atomize(aName);
|
||||
RefPtr<nsAtom> name = NS_Atomize(aName);
|
||||
NS_ENSURE_TRUE(name, nullptr);
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
@ -586,11 +586,11 @@ nsContentList::GetSupportedNames(nsTArray<nsString>& aNames)
|
||||
{
|
||||
BringSelfUpToDate(true);
|
||||
|
||||
AutoTArray<nsIAtom*, 8> atoms;
|
||||
AutoTArray<nsAtom*, 8> atoms;
|
||||
for (uint32_t i = 0; i < mElements.Length(); ++i) {
|
||||
nsIContent *content = mElements.ElementAt(i);
|
||||
if (content->HasID()) {
|
||||
nsIAtom* id = content->GetID();
|
||||
nsAtom* id = content->GetID();
|
||||
MOZ_ASSERT(id != nsGkAtoms::_empty,
|
||||
"Empty ids don't get atomized");
|
||||
if (!atoms.Contains(id)) {
|
||||
@ -606,7 +606,7 @@ nsContentList::GetSupportedNames(nsTArray<nsString>& aNames)
|
||||
// which is false for options, so we don't check it here.
|
||||
const nsAttrValue* val = el->GetParsedAttr(nsGkAtoms::name);
|
||||
if (val && val->Type() == nsAttrValue::eAtom) {
|
||||
nsIAtom* name = val->GetAtomValue();
|
||||
nsAtom* name = val->GetAtomValue();
|
||||
MOZ_ASSERT(name != nsGkAtoms::_empty,
|
||||
"Empty names don't get atomized");
|
||||
if (!atoms.Contains(name)) {
|
||||
@ -711,7 +711,7 @@ nsContentList::Item(uint32_t aIndex)
|
||||
|
||||
void
|
||||
nsContentList::AttributeChanged(nsIDocument *aDocument, Element* aElement,
|
||||
int32_t aNameSpaceID, nsIAtom* aAttribute,
|
||||
int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue)
|
||||
{
|
||||
@ -1142,7 +1142,7 @@ void
|
||||
nsCachableElementsByNameNodeList::AttributeChanged(nsIDocument* aDocument,
|
||||
Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
nsAtom* aAttribute,
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue)
|
||||
{
|
||||
@ -1177,7 +1177,7 @@ nsLabelsNodeList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
|
||||
|
||||
void
|
||||
nsLabelsNodeList::AttributeChanged(nsIDocument* aDocument, Element* aElement,
|
||||
int32_t aNameSpaceID, nsIAtom* aAttribute,
|
||||
int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aOldValue)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsINodeList.h"
|
||||
#include "nsStubMutationObserver.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsNameSpaceManager.h"
|
||||
#include "nsWrapperCache.h"
|
||||
@ -281,8 +281,8 @@ public:
|
||||
*/
|
||||
nsContentList(nsINode* aRootNode,
|
||||
int32_t aMatchNameSpaceId,
|
||||
nsIAtom* aHTMLMatchAtom,
|
||||
nsIAtom* aXMLMatchAtom,
|
||||
nsAtom* aHTMLMatchAtom,
|
||||
nsAtom* aXMLMatchAtom,
|
||||
bool aDeep = true,
|
||||
bool aLiveList = true);
|
||||
|
||||
@ -309,7 +309,7 @@ public:
|
||||
nsContentListDestroyFunc aDestroyFunc,
|
||||
void* aData,
|
||||
bool aDeep = true,
|
||||
nsIAtom* aMatchAtom = nullptr,
|
||||
nsAtom* aMatchAtom = nullptr,
|
||||
int32_t aMatchNameSpaceId = kNameSpaceID_None,
|
||||
bool aFuncMayDependOnAttr = true,
|
||||
bool aLiveList = true);
|
||||
@ -472,8 +472,8 @@ protected:
|
||||
|
||||
nsINode* mRootNode; // Weak ref
|
||||
int32_t mMatchNameSpaceId;
|
||||
RefPtr<nsIAtom> mHTMLMatchAtom;
|
||||
RefPtr<nsIAtom> mXMLMatchAtom;
|
||||
RefPtr<nsAtom> mHTMLMatchAtom;
|
||||
RefPtr<nsAtom> mXMLMatchAtom;
|
||||
|
||||
/**
|
||||
* Function to use to determine whether a piece of content matches
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "nsStringFwd.h"
|
||||
|
||||
class nsContentList;
|
||||
class nsIAtom;
|
||||
class nsAtom;
|
||||
class nsIContent;
|
||||
class nsINode;
|
||||
|
||||
@ -32,7 +32,7 @@ class Element;
|
||||
// was passed to the list's constructor.
|
||||
typedef bool (*nsContentListMatchFunc)(mozilla::dom::Element* aElement,
|
||||
int32_t aNamespaceID,
|
||||
nsIAtom* aAtom,
|
||||
nsAtom* aAtom,
|
||||
void* aData);
|
||||
|
||||
typedef void (*nsContentListDestroyFunc)(void* aData);
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsIOfflineCacheUpdate.h"
|
||||
@ -300,7 +300,7 @@ nsContentSink::ProcessHTTPHeaders(nsIChannel* aChannel)
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsContentSink::ProcessHeaderData(nsIAtom* aHeader, const nsAString& aValue,
|
||||
nsContentSink::ProcessHeaderData(nsAtom* aHeader, const nsAString& aValue,
|
||||
nsIContent* aContent)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
@ -852,7 +852,7 @@ nsContentSink::ProcessMETATag(nsIContent* aContent)
|
||||
nsAutoString result;
|
||||
aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::content, result);
|
||||
if (!result.IsEmpty()) {
|
||||
RefPtr<nsIAtom> fieldAtom(NS_Atomize(header));
|
||||
RefPtr<nsAtom> fieldAtom(NS_Atomize(header));
|
||||
rv = ProcessHeaderData(fieldAtom, result, aContent);
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ class nsIDocument;
|
||||
class nsIURI;
|
||||
class nsIChannel;
|
||||
class nsIDocShell;
|
||||
class nsIAtom;
|
||||
class nsAtom;
|
||||
class nsIChannel;
|
||||
class nsIContent;
|
||||
class nsNodeInfoManager;
|
||||
@ -148,7 +148,7 @@ protected:
|
||||
nsISupports* aContainer, nsIChannel* aChannel);
|
||||
|
||||
nsresult ProcessHTTPHeaders(nsIChannel* aChannel);
|
||||
nsresult ProcessHeaderData(nsIAtom* aHeader, const nsAString& aValue,
|
||||
nsresult ProcessHeaderData(nsAtom* aHeader, const nsAString& aValue,
|
||||
nsIContent* aContent = nullptr);
|
||||
nsresult ProcessLinkHeader(const nsAString& aLinkData);
|
||||
nsresult ProcessLink(const nsAString& aAnchor,
|
||||
|
@ -255,9 +255,9 @@ nsNameSpaceManager *nsContentUtils::sNameSpaceManager;
|
||||
nsIIOService *nsContentUtils::sIOService;
|
||||
nsIUUIDGenerator *nsContentUtils::sUUIDGenerator;
|
||||
nsIConsoleService *nsContentUtils::sConsoleService;
|
||||
nsDataHashtable<nsRefPtrHashKey<nsIAtom>, EventNameMapping>* nsContentUtils::sAtomEventTable = nullptr;
|
||||
nsDataHashtable<nsRefPtrHashKey<nsAtom>, EventNameMapping>* nsContentUtils::sAtomEventTable = nullptr;
|
||||
nsDataHashtable<nsStringHashKey, EventNameMapping>* nsContentUtils::sStringEventTable = nullptr;
|
||||
nsTArray<RefPtr<nsIAtom>>* nsContentUtils::sUserDefinedEvents = nullptr;
|
||||
nsTArray<RefPtr<nsAtom>>* nsContentUtils::sUserDefinedEvents = nullptr;
|
||||
nsIStringBundleService *nsContentUtils::sStringBundleService;
|
||||
nsIStringBundle *nsContentUtils::sStringBundles[PropertiesFile_COUNT];
|
||||
nsIContentPolicy *nsContentUtils::sContentPolicyService;
|
||||
@ -918,7 +918,7 @@ nsContentUtils::GetEventClassIDFromMessage(EventMessage aEventMessage)
|
||||
}
|
||||
}
|
||||
|
||||
static nsIAtom*
|
||||
static nsAtom*
|
||||
GetEventTypeFromMessage(EventMessage aEventMessage)
|
||||
{
|
||||
switch (aEventMessage) {
|
||||
@ -958,11 +958,11 @@ nsContentUtils::InitializeEventTable() {
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
sAtomEventTable = new nsDataHashtable<nsRefPtrHashKey<nsIAtom>, EventNameMapping>(
|
||||
sAtomEventTable = new nsDataHashtable<nsRefPtrHashKey<nsAtom>, EventNameMapping>(
|
||||
ArrayLength(eventArray));
|
||||
sStringEventTable = new nsDataHashtable<nsStringHashKey, EventNameMapping>(
|
||||
ArrayLength(eventArray));
|
||||
sUserDefinedEvents = new nsTArray<RefPtr<nsIAtom>>(64);
|
||||
sUserDefinedEvents = new nsTArray<RefPtr<nsAtom>>(64);
|
||||
|
||||
// Subtract one from the length because of the trailing null
|
||||
for (uint32_t i = 0; i < ArrayLength(eventArray) - 1; ++i) {
|
||||
@ -1396,7 +1396,7 @@ nsContentUtils::ParseHTMLInteger(const nsAString& aValue,
|
||||
}
|
||||
|
||||
bool
|
||||
nsContentUtils::GetPseudoAttributeValue(const nsString& aSource, nsIAtom *aName,
|
||||
nsContentUtils::GetPseudoAttributeValue(const nsString& aSource, nsAtom *aName,
|
||||
nsAString& aValue)
|
||||
{
|
||||
aValue.Truncate();
|
||||
@ -2315,7 +2315,7 @@ nsContentUtils::CanCallerAccess(nsPIDOMWindowInner* aWindow)
|
||||
|
||||
// static
|
||||
bool
|
||||
nsContentUtils::PrincipalHasPermission(nsIPrincipal* aPrincipal, const nsIAtom* aPerm)
|
||||
nsContentUtils::PrincipalHasPermission(nsIPrincipal* aPrincipal, const nsAtom* aPerm)
|
||||
{
|
||||
// Chrome gets access by default.
|
||||
if (IsSystemPrincipal(aPrincipal)) {
|
||||
@ -2328,7 +2328,7 @@ nsContentUtils::PrincipalHasPermission(nsIPrincipal* aPrincipal, const nsIAtom*
|
||||
|
||||
// static
|
||||
bool
|
||||
nsContentUtils::CallerHasPermission(JSContext* aCx, const nsIAtom* aPerm)
|
||||
nsContentUtils::CallerHasPermission(JSContext* aCx, const nsAtom* aPerm)
|
||||
{
|
||||
return PrincipalHasPermission(SubjectPrincipal(aCx), aPerm);
|
||||
}
|
||||
@ -3283,7 +3283,7 @@ nsContentUtils::NewURIWithDocumentCharset(nsIURI** aResult,
|
||||
|
||||
// static
|
||||
bool
|
||||
nsContentUtils::IsCustomElementName(nsIAtom* aName)
|
||||
nsContentUtils::IsCustomElementName(nsAtom* aName)
|
||||
{
|
||||
// A valid custom element name is a sequence of characters name which
|
||||
// must match the PotentialCustomElementName production:
|
||||
@ -3386,7 +3386,7 @@ nsContentUtils::CheckQName(const nsAString& aQualifiedName,
|
||||
nsresult
|
||||
nsContentUtils::SplitQName(const nsIContent* aNamespaceResolver,
|
||||
const nsString& aQName,
|
||||
int32_t *aNamespace, nsIAtom **aLocalName)
|
||||
int32_t *aNamespace, nsAtom **aLocalName)
|
||||
{
|
||||
const char16_t* colon;
|
||||
nsresult rv = nsContentUtils::CheckQName(aQName, true, &colon);
|
||||
@ -3435,7 +3435,7 @@ nsContentUtils::GetNodeInfoFromQName(const nsAString& aNamespaceURI,
|
||||
const char16_t* end;
|
||||
qName.EndReading(end);
|
||||
|
||||
RefPtr<nsIAtom> prefix =
|
||||
RefPtr<nsAtom> prefix =
|
||||
NS_AtomizeMainThread(Substring(qName.get(), colon));
|
||||
|
||||
rv = aNodeInfoManager->GetNodeInfo(Substring(colon + 1, end), prefix,
|
||||
@ -3455,8 +3455,8 @@ nsContentUtils::GetNodeInfoFromQName(const nsAString& aNamespaceURI,
|
||||
|
||||
// static
|
||||
void
|
||||
nsContentUtils::SplitExpatName(const char16_t *aExpatName, nsIAtom **aPrefix,
|
||||
nsIAtom **aLocalName, int32_t* aNameSpaceID)
|
||||
nsContentUtils::SplitExpatName(const char16_t *aExpatName, nsAtom **aPrefix,
|
||||
nsAtom **aLocalName, int32_t* aNameSpaceID)
|
||||
{
|
||||
/**
|
||||
* Expat can send the following:
|
||||
@ -3876,7 +3876,7 @@ nsContentUtils::IsDraggableLink(const nsIContent* aContent) {
|
||||
|
||||
// static
|
||||
nsresult
|
||||
nsContentUtils::QNameChanged(mozilla::dom::NodeInfo* aNodeInfo, nsIAtom* aName,
|
||||
nsContentUtils::QNameChanged(mozilla::dom::NodeInfo* aNodeInfo, nsAtom* aName,
|
||||
mozilla::dom::NodeInfo** aResult)
|
||||
{
|
||||
nsNodeInfoManager *niMgr = aNodeInfo->NodeInfoManager();
|
||||
@ -3947,7 +3947,7 @@ static const char *gOnErrorNames[] = {"event", "source", "lineno",
|
||||
// static
|
||||
void
|
||||
nsContentUtils::GetEventArgNames(int32_t aNameSpaceID,
|
||||
nsIAtom *aEventName,
|
||||
nsAtom *aEventName,
|
||||
bool aIsForWindow,
|
||||
uint32_t *aArgCount,
|
||||
const char*** aArgArray)
|
||||
@ -4356,7 +4356,7 @@ nsContentUtils::GetContentPolicy()
|
||||
|
||||
// static
|
||||
bool
|
||||
nsContentUtils::IsEventAttributeName(nsIAtom* aName, int32_t aType)
|
||||
nsContentUtils::IsEventAttributeName(nsAtom* aName, int32_t aType)
|
||||
{
|
||||
const char16_t* name = aName->GetUTF16String();
|
||||
if (name[0] != 'o' || name[1] != 'n')
|
||||
@ -4368,7 +4368,7 @@ nsContentUtils::IsEventAttributeName(nsIAtom* aName, int32_t aType)
|
||||
|
||||
// static
|
||||
EventMessage
|
||||
nsContentUtils::GetEventMessage(nsIAtom* aName)
|
||||
nsContentUtils::GetEventMessage(nsAtom* aName)
|
||||
{
|
||||
if (aName) {
|
||||
EventNameMapping mapping;
|
||||
@ -4391,7 +4391,7 @@ nsContentUtils::GetEventClassID(const nsAString& aName)
|
||||
return eBasicEventClass;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
nsAtom*
|
||||
nsContentUtils::GetEventMessageAndAtom(const nsAString& aName,
|
||||
mozilla::EventClassID aEventClassID,
|
||||
EventMessage* aEventMessage)
|
||||
@ -4407,14 +4407,14 @@ nsContentUtils::GetEventMessageAndAtom(const nsAString& aName,
|
||||
// If we have cached lots of user defined event names, clear some of them.
|
||||
if (sUserDefinedEvents->Length() > 127) {
|
||||
while (sUserDefinedEvents->Length() > 64) {
|
||||
nsIAtom* first = sUserDefinedEvents->ElementAt(0);
|
||||
nsAtom* first = sUserDefinedEvents->ElementAt(0);
|
||||
sStringEventTable->Remove(Substring(nsDependentAtomString(first), 2));
|
||||
sUserDefinedEvents->RemoveElementAt(0);
|
||||
}
|
||||
}
|
||||
|
||||
*aEventMessage = eUnidentifiedEvent;
|
||||
RefPtr<nsIAtom> atom =
|
||||
RefPtr<nsAtom> atom =
|
||||
NS_AtomizeMainThread(NS_LITERAL_STRING("on") + aName);
|
||||
sUserDefinedEvents->AppendElement(atom);
|
||||
mapping.mAtom = atom;
|
||||
@ -4435,7 +4435,7 @@ nsContentUtils::GetEventMessageAndAtom(const nsAString& aName,
|
||||
// static
|
||||
EventMessage
|
||||
nsContentUtils::GetEventMessageAndAtomForListener(const nsAString& aName,
|
||||
nsIAtom** aOnName)
|
||||
nsAtom** aOnName)
|
||||
{
|
||||
// Because of SVG/SMIL sStringEventTable contains a subset of the event names
|
||||
// comparing to the sAtomEventTable. However, usually sStringEventTable
|
||||
@ -4443,7 +4443,7 @@ nsContentUtils::GetEventMessageAndAtomForListener(const nsAString& aName,
|
||||
// lookups, start from it.
|
||||
EventNameMapping mapping;
|
||||
EventMessage msg = eUnidentifiedEvent;
|
||||
RefPtr<nsIAtom> atom;
|
||||
RefPtr<nsAtom> atom;
|
||||
if (sStringEventTable->Get(aName, &mapping)) {
|
||||
if (mapping.mMaybeSpecialSVGorSMILEvent) {
|
||||
// Try the atom version so that we should get the right message for
|
||||
@ -4629,7 +4629,7 @@ nsContentUtils::DispatchEventOnlyToChrome(nsIDocument* aDoc,
|
||||
|
||||
/* static */
|
||||
Element*
|
||||
nsContentUtils::MatchElementId(nsIContent *aContent, const nsIAtom* aId)
|
||||
nsContentUtils::MatchElementId(nsIContent *aContent, const nsAtom* aId)
|
||||
{
|
||||
for (nsIContent* cur = aContent;
|
||||
cur;
|
||||
@ -4649,7 +4649,7 @@ nsContentUtils::MatchElementId(nsIContent *aContent, const nsAString& aId)
|
||||
NS_PRECONDITION(!aId.IsEmpty(), "Will match random elements");
|
||||
|
||||
// ID attrs are generally stored as atoms, so just atomize this up front
|
||||
RefPtr<nsIAtom> id(NS_Atomize(aId));
|
||||
RefPtr<nsAtom> id(NS_Atomize(aId));
|
||||
if (!id) {
|
||||
// OOM, so just bail
|
||||
return nullptr;
|
||||
@ -4710,7 +4710,7 @@ nsContentUtils::UnregisterShutdownObserver(nsIObserver* aObserver)
|
||||
/* static */
|
||||
bool
|
||||
nsContentUtils::HasNonEmptyAttr(const nsIContent* aContent, int32_t aNameSpaceID,
|
||||
nsIAtom* aName)
|
||||
nsAtom* aName)
|
||||
{
|
||||
static nsIContent::AttrValuesArray strings[] = {&nsGkAtoms::_empty, nullptr};
|
||||
return aContent->FindAttrValueIn(aNameSpaceID, aName, strings, eCaseMatters)
|
||||
@ -4936,7 +4936,7 @@ nsContentUtils::RemoveListenerManager(nsINode *aNode)
|
||||
|
||||
/* static */
|
||||
bool
|
||||
nsContentUtils::IsValidNodeName(nsIAtom *aLocalName, nsIAtom *aPrefix,
|
||||
nsContentUtils::IsValidNodeName(nsAtom *aLocalName, nsAtom *aPrefix,
|
||||
int32_t aNamespaceID)
|
||||
{
|
||||
if (aNamespaceID == kNameSpaceID_Unknown) {
|
||||
@ -5116,7 +5116,7 @@ nsContentUtils::XPCOMShutdown()
|
||||
nsresult
|
||||
nsContentUtils::ParseFragmentHTML(const nsAString& aSourceBuffer,
|
||||
nsIContent* aTargetNode,
|
||||
nsIAtom* aContextLocalName,
|
||||
nsAtom* aContextLocalName,
|
||||
int32_t aContextNamespace,
|
||||
bool aQuirks,
|
||||
bool aPreventScriptExecution)
|
||||
@ -5799,7 +5799,7 @@ static void ProcessViewportToken(nsIDocument *aDocument,
|
||||
|
||||
/* Check for known keys. If we find a match, insert the appropriate
|
||||
* information into the document header. */
|
||||
RefPtr<nsIAtom> key_atom = NS_Atomize(key);
|
||||
RefPtr<nsAtom> key_atom = NS_Atomize(key);
|
||||
if (key_atom == nsGkAtoms::height)
|
||||
aDocument->SetHeaderData(nsGkAtoms::viewport_height, value);
|
||||
else if (key_atom == nsGkAtoms::width)
|
||||
@ -6714,7 +6714,7 @@ struct ClassMatchingInfo {
|
||||
// static
|
||||
bool
|
||||
nsContentUtils::MatchClassNames(Element* aElement, int32_t aNamespaceID,
|
||||
nsIAtom* aAtom, void* aData)
|
||||
nsAtom* aAtom, void* aData)
|
||||
{
|
||||
// We can't match if there are no class names
|
||||
const nsAttrValue* classAttr = aElement->GetClasses();
|
||||
@ -9237,7 +9237,7 @@ private:
|
||||
|
||||
union
|
||||
{
|
||||
nsIAtom* mAtom;
|
||||
nsAtom* mAtom;
|
||||
const char* mLiteral;
|
||||
nsAutoString* mString;
|
||||
const nsTextFragment* mTextFragment;
|
||||
@ -9256,7 +9256,7 @@ public:
|
||||
MOZ_COUNT_DTOR(StringBuilder);
|
||||
}
|
||||
|
||||
void Append(nsIAtom* aAtom)
|
||||
void Append(nsAtom* aAtom)
|
||||
{
|
||||
Unit* u = AddUnit();
|
||||
u->mAtom = aAtom;
|
||||
@ -9561,7 +9561,7 @@ AppendEncodedAttributeValue(nsAutoString* aValue, StringBuilder& aBuilder)
|
||||
static void
|
||||
StartElement(Element* aContent, StringBuilder& aBuilder)
|
||||
{
|
||||
nsIAtom* localName = aContent->NodeInfo()->NameAtom();
|
||||
nsAtom* localName = aContent->NodeInfo()->NameAtom();
|
||||
int32_t tagNS = aContent->GetNameSpaceID();
|
||||
|
||||
aBuilder.Append("<");
|
||||
@ -9576,7 +9576,7 @@ StartElement(Element* aContent, StringBuilder& aBuilder)
|
||||
for (int32_t i = 0; i < count; i++) {
|
||||
const nsAttrName* name = aContent->GetAttrNameAt(i);
|
||||
int32_t attNs = name->NamespaceID();
|
||||
nsIAtom* attName = name->LocalName();
|
||||
nsAtom* attName = name->LocalName();
|
||||
|
||||
// Filter out any attribute starting with [-|_]moz
|
||||
nsDependentAtomString attrNameStr(attName);
|
||||
@ -9610,7 +9610,7 @@ StartElement(Element* aContent, StringBuilder& aBuilder)
|
||||
} else if (attNs == kNameSpaceID_XLink) {
|
||||
aBuilder.Append("xlink:");
|
||||
} else {
|
||||
nsIAtom* prefix = name->GetPrefix();
|
||||
nsAtom* prefix = name->GetPrefix();
|
||||
if (prefix) {
|
||||
aBuilder.Append(prefix);
|
||||
aBuilder.Append(":");
|
||||
@ -9653,7 +9653,7 @@ ShouldEscape(nsIContent* aParent)
|
||||
return true;
|
||||
}
|
||||
|
||||
static const nsIAtom* nonEscapingElements[] = {
|
||||
static const nsAtom* nonEscapingElements[] = {
|
||||
nsGkAtoms::style, nsGkAtoms::script, nsGkAtoms::xmp,
|
||||
nsGkAtoms::iframe, nsGkAtoms::noembed, nsGkAtoms::noframes,
|
||||
nsGkAtoms::plaintext,
|
||||
@ -9663,7 +9663,7 @@ ShouldEscape(nsIContent* aParent)
|
||||
// and Gecko hasn't traditionally done the former.
|
||||
nsGkAtoms::noscript
|
||||
};
|
||||
static mozilla::BloomFilter<12, nsIAtom> sFilter;
|
||||
static mozilla::BloomFilter<12, nsAtom> sFilter;
|
||||
static bool sInitialized = false;
|
||||
if (!sInitialized) {
|
||||
sInitialized = true;
|
||||
@ -9672,7 +9672,7 @@ ShouldEscape(nsIContent* aParent)
|
||||
}
|
||||
}
|
||||
|
||||
nsIAtom* tag = aParent->NodeInfo()->NameAtom();
|
||||
nsAtom* tag = aParent->NodeInfo()->NameAtom();
|
||||
if (sFilter.mightContain(tag)) {
|
||||
for (auto& nonEscapingElement : nonEscapingElements) {
|
||||
if (tag == nonEscapingElement) {
|
||||
@ -10094,8 +10094,8 @@ nsContentUtils::SetupCustomElement(Element* aElement,
|
||||
|
||||
/* static */ CustomElementDefinition*
|
||||
nsContentUtils::GetElementDefinitionIfObservingAttr(Element* aCustomElement,
|
||||
nsIAtom* aExtensionType,
|
||||
nsIAtom* aAttrName)
|
||||
nsAtom* aExtensionType,
|
||||
nsAtom* aAttrName)
|
||||
{
|
||||
CustomElementDefinition* definition =
|
||||
aCustomElement->GetCustomElementDefinition();
|
||||
@ -10168,7 +10168,7 @@ nsContentUtils::EnqueueLifecycleCallback(nsIDocument::ElementCallbackType aType,
|
||||
/* static */ void
|
||||
nsContentUtils::GetCustomPrototype(nsIDocument* aDoc,
|
||||
int32_t aNamespaceID,
|
||||
nsIAtom* aAtom,
|
||||
nsAtom* aAtom,
|
||||
JS::MutableHandle<JSObject*> aPrototype)
|
||||
{
|
||||
MOZ_ASSERT(aDoc);
|
||||
|
@ -58,7 +58,7 @@ class imgRequestProxy;
|
||||
class nsAutoScriptBlockerSuppressNodeRemoved;
|
||||
class nsCacheableFuncStringHTMLCollection;
|
||||
class nsHtml5StringParser;
|
||||
class nsIAtom;
|
||||
class nsAtom;
|
||||
class nsIChannel;
|
||||
class nsIConsoleService;
|
||||
class nsIContent;
|
||||
@ -187,7 +187,7 @@ struct EventNameMapping
|
||||
{
|
||||
// This holds pointers to nsGkAtoms members, and is therefore safe as a
|
||||
// non-owning reference.
|
||||
nsIAtom* MOZ_NON_OWNING_REF mAtom;
|
||||
nsAtom* MOZ_NON_OWNING_REF mAtom;
|
||||
int32_t mType;
|
||||
mozilla::EventMessage mMessage;
|
||||
mozilla::EventClassID mEventClassID;
|
||||
@ -462,7 +462,7 @@ public:
|
||||
/**
|
||||
* Similar to above, but to be used if one already has an atom for the ID
|
||||
*/
|
||||
static Element* MatchElementId(nsIContent *aContent, const nsIAtom* aId);
|
||||
static Element* MatchElementId(nsIContent *aContent, const nsAtom* aId);
|
||||
|
||||
/**
|
||||
* Reverses the document position flags passed in.
|
||||
@ -595,10 +595,10 @@ public:
|
||||
static bool CanCallerAccess(nsPIDOMWindowInner* aWindow);
|
||||
|
||||
// Check if the principal is chrome or an addon with the permission.
|
||||
static bool PrincipalHasPermission(nsIPrincipal* aPrincipal, const nsIAtom* aPerm);
|
||||
static bool PrincipalHasPermission(nsIPrincipal* aPrincipal, const nsAtom* aPerm);
|
||||
|
||||
// Check if the JS caller is chrome or an addon with the permission.
|
||||
static bool CallerHasPermission(JSContext* aCx, const nsIAtom* aPerm);
|
||||
static bool CallerHasPermission(JSContext* aCx, const nsAtom* aPerm);
|
||||
|
||||
/**
|
||||
* GetDocumentFromCaller gets its document by looking at the last called
|
||||
@ -667,7 +667,7 @@ public:
|
||||
* Returns true if |aName| is a valid name to be registered via
|
||||
* document.registerElement.
|
||||
*/
|
||||
static bool IsCustomElementName(nsIAtom* aName);
|
||||
static bool IsCustomElementName(nsAtom* aName);
|
||||
|
||||
static nsresult CheckQName(const nsAString& aQualifiedName,
|
||||
bool aNamespaceAware = true,
|
||||
@ -675,7 +675,7 @@ public:
|
||||
|
||||
static nsresult SplitQName(const nsIContent* aNamespaceResolver,
|
||||
const nsString& aQName,
|
||||
int32_t *aNamespace, nsIAtom **aLocalName);
|
||||
int32_t *aNamespace, nsAtom **aLocalName);
|
||||
|
||||
static nsresult GetNodeInfoFromQName(const nsAString& aNamespaceURI,
|
||||
const nsAString& aQualifiedName,
|
||||
@ -683,8 +683,8 @@ public:
|
||||
uint16_t aNodeType,
|
||||
mozilla::dom::NodeInfo** aNodeInfo);
|
||||
|
||||
static void SplitExpatName(const char16_t *aExpatName, nsIAtom **aPrefix,
|
||||
nsIAtom **aTagName, int32_t *aNameSpaceID);
|
||||
static void SplitExpatName(const char16_t *aExpatName, nsAtom **aPrefix,
|
||||
nsAtom **aTagName, int32_t *aNameSpaceID);
|
||||
|
||||
// Get a permission-manager setting for the given principal and type.
|
||||
// If the pref doesn't exist or if it isn't ALLOW_ACTION, false is
|
||||
@ -739,7 +739,7 @@ public:
|
||||
* and the attribute value is non-empty.
|
||||
*/
|
||||
static bool HasNonEmptyAttr(const nsIContent* aContent, int32_t aNameSpaceID,
|
||||
nsIAtom* aName);
|
||||
nsAtom* aName);
|
||||
|
||||
/**
|
||||
* Method that gets the primary presContext for the node.
|
||||
@ -873,7 +873,7 @@ public:
|
||||
* set to null.
|
||||
*/
|
||||
static nsresult QNameChanged(mozilla::dom::NodeInfo* aNodeInfo,
|
||||
nsIAtom* aName,
|
||||
nsAtom* aName,
|
||||
mozilla::dom::NodeInfo** aResult);
|
||||
|
||||
/**
|
||||
@ -882,7 +882,7 @@ public:
|
||||
* SVG's "evt" and the rest of the world's "event", and because onerror
|
||||
* on window takes 5 args.
|
||||
*/
|
||||
static void GetEventArgNames(int32_t aNameSpaceID, nsIAtom *aEventName,
|
||||
static void GetEventArgNames(int32_t aNameSpaceID, nsAtom *aEventName,
|
||||
bool aIsForWindow,
|
||||
uint32_t *aArgCount, const char*** aArgNames);
|
||||
|
||||
@ -1436,7 +1436,7 @@ public:
|
||||
* @param aName the event name to look up
|
||||
* @param aType the type of content
|
||||
*/
|
||||
static bool IsEventAttributeName(nsIAtom* aName, int32_t aType);
|
||||
static bool IsEventAttributeName(nsAtom* aName, int32_t aType);
|
||||
|
||||
/**
|
||||
* Return the event message for the event with the given name. The name is
|
||||
@ -1445,14 +1445,14 @@ public:
|
||||
*
|
||||
* @param aName the event name to look up
|
||||
*/
|
||||
static mozilla::EventMessage GetEventMessage(nsIAtom* aName);
|
||||
static mozilla::EventMessage GetEventMessage(nsAtom* aName);
|
||||
|
||||
/**
|
||||
* Returns the EventMessage and nsIAtom to be used for event listener
|
||||
* Returns the EventMessage and nsAtom to be used for event listener
|
||||
* registration.
|
||||
*/
|
||||
static mozilla::EventMessage
|
||||
GetEventMessageAndAtomForListener(const nsAString& aName, nsIAtom** aOnName);
|
||||
GetEventMessageAndAtomForListener(const nsAString& aName, nsAtom** aOnName);
|
||||
|
||||
/**
|
||||
* Return the EventClassID for the event with the given name. The name is the
|
||||
@ -1472,7 +1472,7 @@ public:
|
||||
* @param aName the event name to look up
|
||||
* @param aEventClassID only return event id for aEventClassID
|
||||
*/
|
||||
static nsIAtom* GetEventMessageAndAtom(const nsAString& aName,
|
||||
static nsAtom* GetEventMessageAndAtom(const nsAString& aName,
|
||||
mozilla::EventClassID aEventClassID,
|
||||
mozilla::EventMessage* aEventMessage);
|
||||
|
||||
@ -1530,7 +1530,7 @@ public:
|
||||
* @param aPrefix prefix of the node
|
||||
* @param aNamespaceID namespace of the node
|
||||
*/
|
||||
static bool IsValidNodeName(nsIAtom *aLocalName, nsIAtom *aPrefix,
|
||||
static bool IsValidNodeName(nsAtom *aLocalName, nsAtom *aPrefix,
|
||||
int32_t aNamespaceID);
|
||||
|
||||
/**
|
||||
@ -1573,7 +1573,7 @@ public:
|
||||
*/
|
||||
static nsresult ParseFragmentHTML(const nsAString& aSourceBuffer,
|
||||
nsIContent* aTargetNode,
|
||||
nsIAtom* aContextLocalName,
|
||||
nsAtom* aContextLocalName,
|
||||
int32_t aContextNamespace,
|
||||
bool aQuirks,
|
||||
bool aPreventScriptExecution);
|
||||
@ -2585,7 +2585,7 @@ public:
|
||||
* false if the attribute doesn't exist, or has a malformed
|
||||
* value, such as an unknown or unterminated entity.
|
||||
*/
|
||||
static bool GetPseudoAttributeValue(const nsString& aSource, nsIAtom *aName,
|
||||
static bool GetPseudoAttributeValue(const nsString& aSource, nsAtom *aName,
|
||||
nsAString& aValue);
|
||||
|
||||
/**
|
||||
@ -3005,8 +3005,8 @@ public:
|
||||
|
||||
static mozilla::dom::CustomElementDefinition*
|
||||
GetElementDefinitionIfObservingAttr(Element* aCustomElement,
|
||||
nsIAtom* aExtensionType,
|
||||
nsIAtom* aAttrName);
|
||||
nsAtom* aExtensionType,
|
||||
nsAtom* aAttrName);
|
||||
|
||||
static void SyncInvokeReactions(nsIDocument::ElementCallbackType aType,
|
||||
Element* aCustomElement,
|
||||
@ -3023,7 +3023,7 @@ public:
|
||||
|
||||
static void GetCustomPrototype(nsIDocument* aDoc,
|
||||
int32_t aNamespaceID,
|
||||
nsIAtom* aAtom,
|
||||
nsAtom* aAtom,
|
||||
JS::MutableHandle<JSObject*> prototype);
|
||||
|
||||
static bool AttemptLargeAllocationLoad(nsIHttpChannel* aChannel);
|
||||
@ -3246,7 +3246,7 @@ private:
|
||||
|
||||
static bool MatchClassNames(mozilla::dom::Element* aElement,
|
||||
int32_t aNamespaceID,
|
||||
nsIAtom* aAtom, void* aData);
|
||||
nsAtom* aAtom, void* aData);
|
||||
static void DestroyClassNameArray(void* aData);
|
||||
static void* AllocClassMatchingInfo(nsINode* aRootNode,
|
||||
const nsString* aClasses);
|
||||
@ -3302,9 +3302,9 @@ private:
|
||||
|
||||
static nsIConsoleService* sConsoleService;
|
||||
|
||||
static nsDataHashtable<nsRefPtrHashKey<nsIAtom>, EventNameMapping>* sAtomEventTable;
|
||||
static nsDataHashtable<nsRefPtrHashKey<nsAtom>, EventNameMapping>* sAtomEventTable;
|
||||
static nsDataHashtable<nsStringHashKey, EventNameMapping>* sStringEventTable;
|
||||
static nsTArray<RefPtr<nsIAtom>>* sUserDefinedEvents;
|
||||
static nsTArray<RefPtr<nsAtom>>* sUserDefinedEvents;
|
||||
|
||||
static nsIStringBundleService* sStringBundleService;
|
||||
static nsIStringBundle* sStringBundles[PropertiesFile_COUNT];
|
||||
|
@ -115,7 +115,7 @@ nsDOMAttributeMap::SetOwnerDocument(nsIDocument* aDocument)
|
||||
}
|
||||
|
||||
void
|
||||
nsDOMAttributeMap::DropAttribute(int32_t aNamespaceID, nsIAtom* aLocalName)
|
||||
nsDOMAttributeMap::DropAttribute(int32_t aNamespaceID, nsAtom* aLocalName)
|
||||
{
|
||||
nsAttrKey attr(aNamespaceID, aLocalName);
|
||||
if (auto entry = mAttributeCache.Lookup(attr)) {
|
||||
@ -271,7 +271,7 @@ nsDOMAttributeMap::SetNamedItemNS(Attr& aAttr, ErrorResult& aError)
|
||||
for (i = 0; i < count; ++i) {
|
||||
const nsAttrName* name = mContent->GetAttrNameAt(i);
|
||||
int32_t attrNS = name->NamespaceID();
|
||||
nsIAtom* nameAtom = name->LocalName();
|
||||
nsAtom* nameAtom = name->LocalName();
|
||||
|
||||
// we're purposefully ignoring the prefix.
|
||||
if (aAttr.NodeInfo()->Equals(nameAtom, attrNS)) {
|
||||
@ -454,7 +454,7 @@ nsDOMAttributeMap::GetAttrNodeInfo(const nsAString& aNamespaceURI,
|
||||
for (i = 0; i < count; ++i) {
|
||||
const nsAttrName* name = mContent->GetAttrNameAt(i);
|
||||
int32_t attrNS = name->NamespaceID();
|
||||
nsIAtom* nameAtom = name->LocalName();
|
||||
nsAtom* nameAtom = name->LocalName();
|
||||
|
||||
// we're purposefully ignoring the prefix.
|
||||
if (nameSpaceID == attrNS &&
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "nsString.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
class nsIAtom;
|
||||
class nsAtom;
|
||||
class nsIDocument;
|
||||
|
||||
/**
|
||||
@ -40,7 +40,7 @@ public:
|
||||
*/
|
||||
void* mLocalName;
|
||||
|
||||
nsAttrKey(int32_t aNs, nsIAtom* aName)
|
||||
nsAttrKey(int32_t aNs, nsAtom* aName)
|
||||
: mNamespaceID(aNs), mLocalName(aName) {}
|
||||
|
||||
nsAttrKey(const nsAttrKey& aAttr)
|
||||
@ -115,7 +115,7 @@ public:
|
||||
* Drop an attribute from the map's cache (does not remove the attribute
|
||||
* from the node!)
|
||||
*/
|
||||
void DropAttribute(int32_t aNamespaceID, nsIAtom* aLocalName);
|
||||
void DropAttribute(int32_t aNamespaceID, nsAtom* aLocalName);
|
||||
|
||||
/**
|
||||
* Returns the number of attribute nodes currently in the map.
|
||||
|
@ -598,14 +598,14 @@ nsDOMDataChannel::ReleaseSelf()
|
||||
}
|
||||
|
||||
void
|
||||
nsDOMDataChannel::EventListenerAdded(nsIAtom* aType)
|
||||
nsDOMDataChannel::EventListenerAdded(nsAtom* aType)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
UpdateMustKeepAlive();
|
||||
}
|
||||
|
||||
void
|
||||
nsDOMDataChannel::EventListenerRemoved(nsIAtom* aType)
|
||||
nsDOMDataChannel::EventListenerRemoved(nsAtom* aType)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
UpdateMustKeepAlive();
|
||||
|
@ -44,10 +44,10 @@ public:
|
||||
|
||||
// EventTarget
|
||||
using EventTarget::EventListenerAdded;
|
||||
virtual void EventListenerAdded(nsIAtom* aType) override;
|
||||
virtual void EventListenerAdded(nsAtom* aType) override;
|
||||
|
||||
using EventTarget::EventListenerRemoved;
|
||||
virtual void EventListenerRemoved(nsIAtom* aType) override;
|
||||
virtual void EventListenerRemoved(nsAtom* aType) override;
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
||||
override;
|
||||
|
@ -158,7 +158,7 @@ void
|
||||
nsMutationReceiver::AttributeWillChange(nsIDocument* aDocument,
|
||||
mozilla::dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
nsAtom* aAttribute,
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
@ -683,7 +683,7 @@ nsDOMMutationObserver::Observe(nsINode& aTarget,
|
||||
return;
|
||||
}
|
||||
|
||||
nsTArray<RefPtr<nsIAtom>> filters;
|
||||
nsTArray<RefPtr<nsAtom>> filters;
|
||||
bool allAttrs = true;
|
||||
if (aOptions.mAttributeFilter.WasPassed()) {
|
||||
allAttrs = false;
|
||||
@ -767,7 +767,7 @@ nsDOMMutationObserver::GetObservingInfo(
|
||||
info.mCharacterDataOldValue.Construct(mr->CharacterDataOldValue());
|
||||
info.mNativeAnonymousChildList = mr->NativeAnonymousChildList();
|
||||
info.mAnimations = mr->Animations();
|
||||
nsTArray<RefPtr<nsIAtom>>& filters = mr->AttributeFilter();
|
||||
nsTArray<RefPtr<nsAtom>>& filters = mr->AttributeFilter();
|
||||
if (filters.Length()) {
|
||||
info.mAttributeFilter.Construct();
|
||||
mozilla::dom::Sequence<nsString>& filtersAsStrings =
|
||||
@ -930,7 +930,7 @@ nsDOMMutationObserver::HandleMutationsInternal()
|
||||
}
|
||||
|
||||
nsDOMMutationRecord*
|
||||
nsDOMMutationObserver::CurrentRecord(nsIAtom* aType)
|
||||
nsDOMMutationObserver::CurrentRecord(nsAtom* aType)
|
||||
{
|
||||
NS_ASSERTION(sMutationLevel > 0, "Unexpected mutation level!");
|
||||
|
||||
|
@ -39,7 +39,7 @@ class nsDOMMutationRecord final : public nsISupports,
|
||||
public:
|
||||
typedef nsTArray<RefPtr<mozilla::dom::Animation>> AnimationArray;
|
||||
|
||||
nsDOMMutationRecord(nsIAtom* aType, nsISupports* aOwner)
|
||||
nsDOMMutationRecord(nsAtom* aType, nsISupports* aOwner)
|
||||
: mType(aType), mAttrNamespace(VoidString()), mPrevValue(VoidString()), mOwner(aOwner)
|
||||
{
|
||||
}
|
||||
@ -112,8 +112,8 @@ public:
|
||||
}
|
||||
|
||||
nsCOMPtr<nsINode> mTarget;
|
||||
RefPtr<nsIAtom> mType;
|
||||
RefPtr<nsIAtom> mAttrName;
|
||||
RefPtr<nsAtom> mType;
|
||||
RefPtr<nsAtom> mAttrName;
|
||||
nsString mAttrNamespace;
|
||||
nsString mPrevValue;
|
||||
RefPtr<nsSimpleContentList> mAddedNodes;
|
||||
@ -218,8 +218,8 @@ public:
|
||||
mAttributeOldValue = aOldValue;
|
||||
}
|
||||
|
||||
nsTArray<RefPtr<nsIAtom>>& AttributeFilter() { return mAttributeFilter; }
|
||||
void SetAttributeFilter(nsTArray<RefPtr<nsIAtom>>&& aFilter)
|
||||
nsTArray<RefPtr<nsAtom>>& AttributeFilter() { return mAttributeFilter; }
|
||||
void SetAttributeFilter(nsTArray<RefPtr<nsAtom>>&& aFilter)
|
||||
{
|
||||
NS_ASSERTION(!mParent, "Shouldn't have parent");
|
||||
mAttributeFilter.Clear();
|
||||
@ -287,7 +287,7 @@ protected:
|
||||
bool ObservesAttr(nsINode* aRegisterTarget,
|
||||
mozilla::dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttr)
|
||||
nsAtom* aAttr)
|
||||
{
|
||||
if (mParent) {
|
||||
return mParent->ObservesAttr(aRegisterTarget, aElement, aNameSpaceID, aAttr);
|
||||
@ -306,7 +306,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
nsTArray<RefPtr<nsIAtom>>& filters = AttributeFilter();
|
||||
nsTArray<RefPtr<nsAtom>>& filters = AttributeFilter();
|
||||
for (size_t i = 0; i < filters.Length(); ++i) {
|
||||
if (filters[i] == aAttr) {
|
||||
return true;
|
||||
@ -337,7 +337,7 @@ private:
|
||||
bool mAllAttributes;
|
||||
bool mAttributeOldValue;
|
||||
bool mAnimations;
|
||||
nsTArray<RefPtr<nsIAtom>> mAttributeFilter;
|
||||
nsTArray<RefPtr<nsAtom>> mAttributeFilter;
|
||||
};
|
||||
|
||||
|
||||
@ -406,7 +406,7 @@ public:
|
||||
virtual void AttributeSetToCurrentValue(nsIDocument* aDocument,
|
||||
mozilla::dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute) override
|
||||
nsAtom* aAttribute) override
|
||||
{
|
||||
// We can reuse AttributeWillChange implementation.
|
||||
AttributeWillChange(aDocument, aElement, aNameSpaceID, aAttribute,
|
||||
@ -605,7 +605,7 @@ protected:
|
||||
void ScheduleForRun();
|
||||
void RescheduleForRun();
|
||||
|
||||
nsDOMMutationRecord* CurrentRecord(nsIAtom* aType);
|
||||
nsDOMMutationRecord* CurrentRecord(nsAtom* aType);
|
||||
bool HasCurrentRecord(const nsAString& aType);
|
||||
|
||||
bool Suppressed()
|
||||
|
@ -22,7 +22,7 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
nsDOMTokenList::nsDOMTokenList(Element* aElement, nsIAtom* aAttrAtom,
|
||||
nsDOMTokenList::nsDOMTokenList(Element* aElement, nsAtom* aAttrAtom,
|
||||
const DOMTokenListSupportedTokenArray aSupportedTokens)
|
||||
: mElement(aElement),
|
||||
mAttrAtom(aAttrAtom),
|
||||
@ -61,10 +61,10 @@ nsDOMTokenList::RemoveDuplicates(const nsAttrValue* aAttr)
|
||||
return;
|
||||
}
|
||||
|
||||
BloomFilter<8, nsIAtom> filter;
|
||||
BloomFilter<8, nsAtom> filter;
|
||||
nsAttrValue::AtomArray* array = aAttr->GetAtomArrayValue();
|
||||
for (uint32_t i = 0; i < array->Length(); i++) {
|
||||
nsIAtom* atom = array->ElementAt(i);
|
||||
nsAtom* atom = array->ElementAt(i);
|
||||
if (filter.mightContain(atom)) {
|
||||
// Start again, with a hashtable
|
||||
RemoveDuplicatesInternal(array, i);
|
||||
@ -79,10 +79,10 @@ void
|
||||
nsDOMTokenList::RemoveDuplicatesInternal(nsAttrValue::AtomArray* aArray,
|
||||
uint32_t aStart)
|
||||
{
|
||||
nsDataHashtable<nsPtrHashKey<nsIAtom>, bool> tokens;
|
||||
nsDataHashtable<nsPtrHashKey<nsAtom>, bool> tokens;
|
||||
|
||||
for (uint32_t i = 0; i < aArray->Length(); i++) {
|
||||
nsIAtom* atom = aArray->ElementAt(i);
|
||||
nsAtom* atom = aArray->ElementAt(i);
|
||||
// No need to check the hashtable below aStart
|
||||
if (i >= aStart && tokens.Get(atom)) {
|
||||
aArray->RemoveElementAt(i);
|
||||
|
@ -26,7 +26,7 @@ class ErrorResult;
|
||||
} // namespace mozilla
|
||||
|
||||
class nsAttrValue;
|
||||
class nsIAtom;
|
||||
class nsAtom;
|
||||
|
||||
// nsISupports must be on the primary inheritance chain
|
||||
|
||||
@ -42,7 +42,7 @@ public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMTokenList)
|
||||
|
||||
nsDOMTokenList(Element* aElement, nsIAtom* aAttrAtom,
|
||||
nsDOMTokenList(Element* aElement, nsAtom* aAttrAtom,
|
||||
const mozilla::dom::DOMTokenListSupportedTokenArray = nullptr);
|
||||
|
||||
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
@ -88,7 +88,7 @@ protected:
|
||||
|
||||
nsresult CheckToken(const nsAString& aStr);
|
||||
nsresult CheckTokens(const nsTArray<nsString>& aStr);
|
||||
void RemoveDuplicatesInternal(nsTArray<RefPtr<nsIAtom>>* aArray,
|
||||
void RemoveDuplicatesInternal(nsTArray<RefPtr<nsAtom>>* aArray,
|
||||
uint32_t aStart);
|
||||
void AddInternal(const nsAttrValue* aAttr,
|
||||
const nsTArray<nsString>& aTokens);
|
||||
@ -100,7 +100,7 @@ protected:
|
||||
inline const nsAttrValue* GetParsedAttr();
|
||||
|
||||
nsCOMPtr<Element> mElement;
|
||||
RefPtr<nsIAtom> mAttrAtom;
|
||||
RefPtr<nsAtom> mAttrAtom;
|
||||
const mozilla::dom::DOMTokenListSupportedTokenArray mSupportedTokens;
|
||||
};
|
||||
|
||||
|
@ -329,7 +329,7 @@ nsDOMWindowUtils::GetDocumentMetadata(const nsAString& aName,
|
||||
{
|
||||
nsIDocument* doc = GetDocument();
|
||||
if (doc) {
|
||||
RefPtr<nsIAtom> name = NS_Atomize(aName);
|
||||
RefPtr<nsAtom> name = NS_Atomize(aName);
|
||||
doc->GetHeaderData(name, aValue);
|
||||
return NS_OK;
|
||||
}
|
||||
@ -2973,7 +2973,7 @@ nsDOMWindowUtils::GetUnanimatedComputedStyle(nsIDOMElement* aElement,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
RefPtr<nsIAtom> pseudo = nsCSSPseudoElements::GetPseudoAtom(aPseudoElement);
|
||||
RefPtr<nsAtom> pseudo = nsCSSPseudoElements::GetPseudoAtom(aPseudoElement);
|
||||
RefPtr<nsStyleContext> styleContext =
|
||||
nsComputedDOMStyle::GetUnanimatedStyleContextNoFlush(element,
|
||||
pseudo, shell);
|
||||
|
@ -601,7 +601,7 @@ public:
|
||||
bool& aFound) override
|
||||
{
|
||||
aFound = false;
|
||||
RefPtr<nsIAtom> name = NS_Atomize(aName);
|
||||
RefPtr<nsAtom> name = NS_Atomize(aName);
|
||||
for (uint32_t i = 0; i < mElements.Length(); i++) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(mElements[i]);
|
||||
Element* element = mElements[i]->AsElement();
|
||||
@ -617,19 +617,19 @@ public:
|
||||
|
||||
virtual void GetSupportedNames(nsTArray<nsString>& aNames) override
|
||||
{
|
||||
AutoTArray<nsIAtom*, 8> atoms;
|
||||
AutoTArray<nsAtom*, 8> atoms;
|
||||
for (uint32_t i = 0; i < mElements.Length(); i++) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(mElements[i]);
|
||||
Element* element = mElements[i]->AsElement();
|
||||
|
||||
nsIAtom* id = element->GetID();
|
||||
nsAtom* id = element->GetID();
|
||||
MOZ_ASSERT(id != nsGkAtoms::_empty);
|
||||
if (id && !atoms.Contains(id)) {
|
||||
atoms.AppendElement(id);
|
||||
}
|
||||
|
||||
if (element->HasName()) {
|
||||
nsIAtom* name = element->GetParsedAttr(nsGkAtoms::name)->GetAtomValue();
|
||||
nsAtom* name = element->GetParsedAttr(nsGkAtoms::name)->GetAtomValue();
|
||||
MOZ_ASSERT(name && name != nsGkAtoms::_empty);
|
||||
if (name && !atoms.Contains(name)) {
|
||||
atoms.AppendElement(name);
|
||||
@ -3170,7 +3170,7 @@ nsIDocument::GetLastModified(nsAString& aLastModified) const
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::AddToNameTable(Element *aElement, nsIAtom* aName)
|
||||
nsDocument::AddToNameTable(Element *aElement, nsAtom* aName)
|
||||
{
|
||||
MOZ_ASSERT(nsGenericHTMLElement::ShouldExposeNameAsHTMLDocumentProperty(aElement),
|
||||
"Only put elements that need to be exposed as document['name'] in "
|
||||
@ -3189,7 +3189,7 @@ nsDocument::AddToNameTable(Element *aElement, nsIAtom* aName)
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::RemoveFromNameTable(Element *aElement, nsIAtom* aName)
|
||||
nsDocument::RemoveFromNameTable(Element *aElement, nsAtom* aName)
|
||||
{
|
||||
// Speed up document teardown
|
||||
if (mIdentifierMap.Count() == 0)
|
||||
@ -3207,7 +3207,7 @@ nsDocument::RemoveFromNameTable(Element *aElement, nsIAtom* aName)
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::AddToIdTable(Element *aElement, nsIAtom* aId)
|
||||
nsDocument::AddToIdTable(Element *aElement, nsAtom* aId)
|
||||
{
|
||||
nsIdentifierMapEntry* entry = mIdentifierMap.PutEntry(aId);
|
||||
|
||||
@ -3222,7 +3222,7 @@ nsDocument::AddToIdTable(Element *aElement, nsIAtom* aId)
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::RemoveFromIdTable(Element *aElement, nsIAtom* aId)
|
||||
nsDocument::RemoveFromIdTable(Element *aElement, nsAtom* aId)
|
||||
{
|
||||
NS_ASSERTION(aId, "huhwhatnow?");
|
||||
|
||||
@ -3956,7 +3956,7 @@ nsIDocument::GetSandboxFlagsAsString(nsAString& aFlags)
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::GetHeaderData(nsIAtom* aHeaderField, nsAString& aData) const
|
||||
nsDocument::GetHeaderData(nsAtom* aHeaderField, nsAString& aData) const
|
||||
{
|
||||
aData.Truncate();
|
||||
const nsDocHeaderData* data = mHeaderData;
|
||||
@ -3971,7 +3971,7 @@ nsDocument::GetHeaderData(nsIAtom* aHeaderField, nsAString& aData) const
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::SetHeaderData(nsIAtom* aHeaderField, const nsAString& aData)
|
||||
nsDocument::SetHeaderData(nsAtom* aHeaderField, const nsAString& aData)
|
||||
{
|
||||
if (!aHeaderField) {
|
||||
NS_ERROR("null headerField");
|
||||
@ -5430,7 +5430,7 @@ nsDocument::GetElementById(const nsAString& aId, nsIDOMElement** aReturn)
|
||||
}
|
||||
|
||||
Element*
|
||||
nsDocument::AddIDTargetObserver(nsIAtom* aID, IDTargetObserver aObserver,
|
||||
nsDocument::AddIDTargetObserver(nsAtom* aID, IDTargetObserver aObserver,
|
||||
void* aData, bool aForImage)
|
||||
{
|
||||
nsDependentAtomString id(aID);
|
||||
@ -5446,7 +5446,7 @@ nsDocument::AddIDTargetObserver(nsIAtom* aID, IDTargetObserver aObserver,
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::RemoveIDTargetObserver(nsIAtom* aID, IDTargetObserver aObserver,
|
||||
nsDocument::RemoveIDTargetObserver(nsAtom* aID, IDTargetObserver aObserver,
|
||||
void* aData, bool aForImage)
|
||||
{
|
||||
nsDependentAtomString id(aID);
|
||||
@ -6000,7 +6000,7 @@ GetPseudoElementType(const nsString& aString, ErrorResult& aRv)
|
||||
aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
|
||||
return CSSPseudoElementType::NotPseudo;
|
||||
}
|
||||
RefPtr<nsIAtom> pseudo = NS_Atomize(Substring(aString, 1));
|
||||
RefPtr<nsAtom> pseudo = NS_Atomize(Substring(aString, 1));
|
||||
return nsCSSPseudoElements::GetPseudoType(pseudo,
|
||||
nsCSSProps::EnabledState::eInUASheets);
|
||||
}
|
||||
@ -6339,7 +6339,7 @@ nsDocument::CustomElementConstructor(JSContext* aCx, unsigned aArgc, JS::Value*
|
||||
return true;
|
||||
}
|
||||
|
||||
RefPtr<nsIAtom> typeAtom(NS_Atomize(elemName));
|
||||
RefPtr<nsAtom> typeAtom(NS_Atomize(elemName));
|
||||
CustomElementDefinition* definition =
|
||||
registry->mCustomDefinitions.GetWeak(typeAtom);
|
||||
if (!definition) {
|
||||
@ -6965,7 +6965,7 @@ nsIDocument::GetBindingParent(nsINode& aNode)
|
||||
}
|
||||
|
||||
static Element*
|
||||
GetElementByAttribute(nsIContent* aContent, nsIAtom* aAttrName,
|
||||
GetElementByAttribute(nsIContent* aContent, nsAtom* aAttrName,
|
||||
const nsAString& aAttrValue, bool aUniversalMatch)
|
||||
{
|
||||
if (aUniversalMatch ? aContent->HasAttr(kNameSpaceID_None, aAttrName) :
|
||||
@ -6989,7 +6989,7 @@ GetElementByAttribute(nsIContent* aContent, nsIAtom* aAttrName,
|
||||
|
||||
Element*
|
||||
nsDocument::GetAnonymousElementByAttribute(nsIContent* aElement,
|
||||
nsIAtom* aAttrName,
|
||||
nsAtom* aAttrName,
|
||||
const nsAString& aAttrValue) const
|
||||
{
|
||||
nsINodeList* nodeList = BindingManager()->GetAnonymousNodesFor(aElement);
|
||||
@ -7034,7 +7034,7 @@ nsIDocument::GetAnonymousElementByAttribute(Element& aElement,
|
||||
const nsAString& aAttrName,
|
||||
const nsAString& aAttrValue)
|
||||
{
|
||||
RefPtr<nsIAtom> attribute = NS_Atomize(aAttrName);
|
||||
RefPtr<nsAtom> attribute = NS_Atomize(aAttrName);
|
||||
|
||||
return GetAnonymousElementByAttribute(&aElement, attribute, aAttrValue);
|
||||
}
|
||||
@ -7197,7 +7197,7 @@ nsIDocument::GetHtmlElement() const
|
||||
}
|
||||
|
||||
Element*
|
||||
nsIDocument::GetHtmlChildElement(nsIAtom* aTag)
|
||||
nsIDocument::GetHtmlChildElement(nsAtom* aTag)
|
||||
{
|
||||
Element* html = GetHtmlElement();
|
||||
if (!html)
|
||||
@ -7440,7 +7440,7 @@ nsDocument::GetBoxObjectFor(Element* aElement, ErrorResult& aRv)
|
||||
}
|
||||
|
||||
int32_t namespaceID;
|
||||
RefPtr<nsIAtom> tag = BindingManager()->ResolveTag(aElement, &namespaceID);
|
||||
RefPtr<nsAtom> tag = BindingManager()->ResolveTag(aElement, &namespaceID);
|
||||
#ifdef MOZ_XUL
|
||||
if (namespaceID == kNameSpaceID_XUL) {
|
||||
if (tag == nsGkAtoms::browser ||
|
||||
@ -8831,7 +8831,7 @@ nsDocument::RetrieveRelevantHeaders(nsIChannel *aChannel)
|
||||
rv =
|
||||
httpChannel->GetResponseHeader(nsDependentCString(*name), headerVal);
|
||||
if (NS_SUCCEEDED(rv) && !headerVal.IsEmpty()) {
|
||||
RefPtr<nsIAtom> key = NS_Atomize(*name);
|
||||
RefPtr<nsAtom> key = NS_Atomize(*name);
|
||||
SetHeaderData(key, NS_ConvertASCIItoUTF16(headerVal));
|
||||
}
|
||||
++name;
|
||||
@ -8866,7 +8866,7 @@ nsDocument::RetrieveRelevantHeaders(nsIChannel *aChannel)
|
||||
}
|
||||
|
||||
already_AddRefed<Element>
|
||||
nsDocument::CreateElem(const nsAString& aName, nsIAtom *aPrefix,
|
||||
nsDocument::CreateElem(const nsAString& aName, nsAtom *aPrefix,
|
||||
int32_t aNamespaceID, const nsAString* aIs)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
@ -13398,7 +13398,7 @@ nsIDocument::SetStateObject(nsIStructuredCloneContainer *scContainer)
|
||||
}
|
||||
|
||||
already_AddRefed<Element>
|
||||
nsIDocument::CreateHTMLElement(nsIAtom* aTag)
|
||||
nsIDocument::CreateHTMLElement(nsAtom* aTag)
|
||||
{
|
||||
RefPtr<mozilla::dom::NodeInfo> nodeInfo;
|
||||
nodeInfo = mNodeInfoManager->GetNodeInfo(aTag, nullptr, kNameSpaceID_XHTML,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user