Bug 737976: Remove nsINodeInfo. rs=bent

This commit is contained in:
Kyle Huey 2012-03-28 19:07:37 -07:00
Родитель d1a4187582
Коммит af59c30e6d
265 изменённых файлов: 1233 добавлений и 1348 удалений

Просмотреть файл

@ -59,7 +59,7 @@
#include "nsIFrame.h"
#include "nsIScrollableFrame.h"
#include "nsINameSpaceManager.h"
#include "nsINodeInfo.h"
#include "nsNodeInfo.h"
#include "nsRootAccessible.h"
#include "nsIServiceManager.h"
#include "nsTextFormatter.h"
@ -380,7 +380,7 @@ __try {
if (!document)
return E_FAIL;
nsINodeInfo *nodeInfo = content->NodeInfo();
nsNodeInfo *nodeInfo = content->NodeInfo();
nodeInfo->GetName(roleString);
// Only append name space if different from that of current document.

Просмотреть файл

@ -515,7 +515,7 @@ nsXFormsSelectableAccessible::GetItemByIndex(PRUint32* aIndex,
for (PRInt32 childIdx = 0; childIdx < childCount; childIdx++) {
nsAccessible *child = accessible->GetChildAt(childIdx);
nsIContent* childContent = child->GetContent();
nsINodeInfo *nodeInfo = childContent->NodeInfo();
nsNodeInfo *nodeInfo = childContent->NodeInfo();
if (nodeInfo->NamespaceEquals(NS_LITERAL_STRING(NS_NAMESPACE_XFORMS))) {
if (nodeInfo->Equals(nsGkAtoms::item)) {
if (!*aIndex)
@ -579,7 +579,7 @@ nsXFormsSelectableItemAccessible::IsSelected()
if (!content)
return false;
nsCOMPtr<nsINodeInfo> nodeinfo = content->NodeInfo();
nsRefPtr<nsNodeInfo> nodeinfo = content->NodeInfo();
if (!nodeinfo->NamespaceEquals(NS_LITERAL_STRING(NS_NAMESPACE_XFORMS)))
continue;

Просмотреть файл

@ -96,7 +96,7 @@ class Element : public nsIContent
{
public:
#ifdef MOZILLA_INTERNAL_API
Element(already_AddRefed<nsINodeInfo> aNodeInfo) :
Element(already_AddRefed<nsNodeInfo> aNodeInfo) :
nsIContent(aNodeInfo),
mState(NS_EVENT_STATE_MOZ_READONLY)
{}

Просмотреть файл

@ -60,7 +60,6 @@ nsIMutationObserver.h \
nsIMutationObserver2.h \
nsINameSpaceManager.h \
nsINode.h \
nsINodeInfo.h \
nsINodeList.h \
nsIScriptElement.h \
nsIStyleSheetLinkingElement.h \

Просмотреть файл

@ -52,18 +52,18 @@
class nsAString;
class nsIContent;
class nsIDocument;
class nsINodeInfo;
class nsNodeInfo;
class imgIRequest;
class nsNodeInfoManager;
class nsGenericHTMLElement;
nsresult
NS_NewElement(nsIContent** aResult,
already_AddRefed<nsINodeInfo> aNodeInfo,
already_AddRefed<nsNodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser);
nsresult
NS_NewXMLElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
NS_NewXMLElement(nsIContent** aResult, already_AddRefed<nsNodeInfo> aNodeInfo);
/**
* aNodeInfoManager must not be null.
@ -102,38 +102,38 @@ NS_NewXMLCDATASection(nsIContent** aInstancePtrResult,
nsNodeInfoManager *aNodeInfoManager);
nsresult
NS_NewHTMLElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo,
NS_NewHTMLElement(nsIContent** aResult, already_AddRefed<nsNodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser);
// First argument should be nsHTMLTag, but that adds dependency to parser
// for a bunch of files.
already_AddRefed<nsGenericHTMLElement>
CreateHTMLElement(PRUint32 aNodeType, already_AddRefed<nsINodeInfo> aNodeInfo,
CreateHTMLElement(PRUint32 aNodeType, already_AddRefed<nsNodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser);
nsresult
NS_NewMathMLElement(nsIContent** aResult,
already_AddRefed<nsINodeInfo> aNodeInfo);
already_AddRefed<nsNodeInfo> aNodeInfo);
#ifdef MOZ_XUL
nsresult
NS_NewXULElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
NS_NewXULElement(nsIContent** aResult, already_AddRefed<nsNodeInfo> aNodeInfo);
void
NS_TrustedNewXULElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
NS_TrustedNewXULElement(nsIContent** aResult, already_AddRefed<nsNodeInfo> aNodeInfo);
#endif
nsresult
NS_NewSVGElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo,
NS_NewSVGElement(nsIContent** aResult, already_AddRefed<nsNodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser);
nsresult
NS_NewGenConImageContent(nsIContent** aResult,
already_AddRefed<nsINodeInfo> aNodeInfo,
already_AddRefed<nsNodeInfo> aNodeInfo,
imgIRequest* aImageRequest);
nsresult
NS_NewXMLEventsElement(nsIContent** aResult,
already_AddRefed<nsINodeInfo> aNodeInfo);
already_AddRefed<nsNodeInfo> aNodeInfo);
#endif // nsContentCreatorFunctions_h__

Просмотреть файл

@ -64,7 +64,7 @@ static fp_except_t oldmask = fpsetmask(~allmask);
#include "nsAString.h"
#include "nsIStatefulFrame.h"
#include "nsINodeInfo.h"
#include "nsNodeInfo.h"
#include "nsNodeInfoManager.h"
#include "nsContentList.h"
#include "nsDOMClassInfoID.h"
@ -614,7 +614,7 @@ public:
const nsAString& aQualifiedName,
nsNodeInfoManager* aNodeInfoManager,
PRUint16 aNodeType,
nsINodeInfo** aNodeInfo);
nsNodeInfo** aNodeInfo);
static void SplitExpatName(const PRUnichar *aExpatName, nsIAtom **aPrefix,
nsIAtom **aTagName, PRInt32 *aNameSpaceID);
@ -746,8 +746,8 @@ public:
* Convenience method to create a new nodeinfo that differs only by name
* from aNodeInfo.
*/
static nsresult NameChanged(nsINodeInfo *aNodeInfo, nsIAtom *aName,
nsINodeInfo** aResult)
static nsresult NameChanged(nsNodeInfo *aNodeInfo, nsIAtom *aName,
nsNodeInfo** aResult)
{
nsNodeInfoManager *niMgr = aNodeInfo->NodeInfoManager();

Просмотреть файл

@ -61,7 +61,7 @@ public:
return mAttrMap;
}
nsINodeInfo *NodeInfo()
nsNodeInfo *NodeInfo()
{
return mNodeInfo;
}
@ -76,7 +76,7 @@ public:
protected:
#ifdef MOZILLA_INTERNAL_API
nsIAttribute(nsDOMAttributeMap *aAttrMap, already_AddRefed<nsINodeInfo> aNodeInfo,
nsIAttribute(nsDOMAttributeMap *aAttrMap, already_AddRefed<nsNodeInfo> aNodeInfo,
bool aNsAware)
: nsINode(aNodeInfo), mAttrMap(aAttrMap), mNsAware(aNsAware)
{

Просмотреть файл

@ -92,11 +92,11 @@ public:
// If you're using the external API, the only thing you can know about
// nsIContent is that it exists with an IID
nsIContent(already_AddRefed<nsINodeInfo> aNodeInfo)
nsIContent(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsINode(aNodeInfo)
{
NS_ASSERTION(mNodeInfo,
"No nsINodeInfo passed to nsIContent, PREPARE TO CRASH!!!");
"No nsNodeInfo passed to nsIContent, PREPARE TO CRASH!!!");
}
#endif // MOZILLA_INTERNAL_API
@ -303,7 +303,7 @@ public:
* Get the NodeInfo for this element
* @return the nodes node info
*/
nsINodeInfo *NodeInfo() const
nsNodeInfo *NodeInfo() const
{
return mNodeInfo;
}
@ -357,7 +357,7 @@ public:
* @param aStr the unparsed attribute string
* @return the node info. May be nsnull.
*/
virtual already_AddRefed<nsINodeInfo> GetExistingAttrNameFromQName(const nsAString& aStr) const = 0;
virtual already_AddRefed<nsNodeInfo> GetExistingAttrNameFromQName(const nsAString& aStr) const = 0;
/**
* Set attribute values. All attribute values are assumed to have a

Просмотреть файл

@ -42,8 +42,9 @@
#include "nsEvent.h"
#include "nsPropertyTable.h"
#include "nsTObserverArray.h"
#include "nsINodeInfo.h"
#include "nsNodeInfo.h"
#include "nsCOMPtr.h"
#include "nsAutoPtr.h"
#include "nsWrapperCache.h"
#include "nsIProgrammingLanguage.h" // for ::JAVASCRIPT
#include "nsDOMError.h"
@ -350,7 +351,7 @@ public:
// Disable annoying warning about 'this' in initializers.
#pragma warning(disable:4355)
#endif
nsINode(already_AddRefed<nsINodeInfo> aNodeInfo)
nsINode(already_AddRefed<nsNodeInfo> aNodeInfo)
: mNodeInfo(aNodeInfo),
mParent(nsnull),
mFlags(0),
@ -865,7 +866,7 @@ public:
* @param aNodeInfo the nodeinfo to use for the clone
* @param aResult the clone
*/
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const = 0;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const = 0;
/**
* Checks if a node has the same ownerDocument as this one. Note that this
@ -1552,7 +1553,7 @@ protected:
static bool Traverse(nsINode *tmp, nsCycleCollectionTraversalCallback &cb);
static void Unlink(nsINode *tmp);
nsCOMPtr<nsINodeInfo> mNodeInfo;
nsRefPtr<nsNodeInfo> mNodeInfo;
nsINode* mParent;

Просмотреть файл

@ -1,387 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* nsINodeInfo is an interface to node info, such as name, prefix, namespace
* ID and possibly other data that is shared between nodes (elements
* and attributes) that have the same name, prefix and namespace ID within
* the same document.
*
* nsNodeInfoManager's are internal objects that manage a list of
* nsINodeInfo's, every document object should hold a strong reference to
* a nsNodeInfoManager and every nsINodeInfo also holds a strong reference
* to their owning manager. When a nsINodeInfo is no longer used it will
* automatically remove itself from its owner manager, and when all
* nsINodeInfo's have been removed from a nsNodeInfoManager and all external
* references are released the nsNodeInfoManager deletes itself.
*
* -- jst@netscape.com
*/
#ifndef nsINodeInfo_h___
#define nsINodeInfo_h___
#include "nsISupports.h"
#include "nsIAtom.h"
#include "nsINameSpaceManager.h"
#include "nsNodeInfoManager.h"
#include "nsCOMPtr.h"
#ifdef MOZILLA_INTERNAL_API
#include "nsDOMString.h"
#endif
// Forward declarations
class nsIDocument;
class nsIURI;
class nsIPrincipal;
// IID for the nsINodeInfo interface
#define NS_INODEINFO_IID \
{ 0xc5188ea1, 0x0a9c, 0x43e6, \
{ 0x95, 0x90, 0xcc, 0x43, 0x6b, 0xe9, 0xcf, 0xa0 } }
class nsINodeInfo : public nsISupports
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INODEINFO_IID)
nsINodeInfo()
: mInner(nsnull, nsnull, kNameSpaceID_None, 0, nsnull),
mOwnerManager(nsnull)
{
}
/*
* Get the name from this node as a string, this does not include the prefix.
*
* For the HTML element "<body>" this will return "body" and for the XML
* element "<html:body>" this will return "body".
*/
void GetName(nsAString& aName) const
{
mInner.mName->ToString(aName);
}
/*
* Get the name from this node as an atom, this does not include the prefix.
* This function never returns a null atom.
*
* 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
{
return mInner.mName;
}
/*
* Get the qualified name from this node as a string, the qualified name
* includes the prefix, if one exists.
*
* For the HTML element "<body>" this will return "body" and for the XML
* element "<html:body>" this will return "html:body".
*/
const nsString& QualifiedName() const {
return mQualifiedName;
}
/*
* Returns the node's nodeName as defined in DOM Core
*/
const nsString& NodeName() const {
return mNodeName;
}
/*
* Returns the node's localName as defined in DOM Core
*/
const nsString& LocalName() const {
return mLocalName;
}
#ifdef MOZILLA_INTERNAL_API
/*
* Get the prefix from this node as a string.
*
* For the HTML element "<body>" this will return a null string and for
* the XML element "<html:body>" this will return the string "html".
*/
void GetPrefix(nsAString& aPrefix) const
{
if (mInner.mPrefix) {
mInner.mPrefix->ToString(aPrefix);
} else {
SetDOMStringToNull(aPrefix);
}
}
#endif
/*
* Get the prefix from this node as an atom.
*
* 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
{
return mInner.mPrefix;
}
/*
* Get the namespace URI for a node, if the node has a namespace URI.
*/
virtual nsresult GetNamespaceURI(nsAString& aNameSpaceURI) const = 0;
/*
* Get the namespace ID for a node if the node has a namespace, if not this
* returns kNameSpaceID_None.
*/
PRInt32 NamespaceID() const
{
return mInner.mNamespaceID;
}
/*
* Get the nodetype for the node. Returns the values specified in nsIDOMNode
* for nsIDOMNode.nodeType
*/
PRUint16 NodeType() const
{
return mInner.mNodeType;
}
/*
* Get the extra name, used by PIs and DocTypes, for the node.
*/
nsIAtom* GetExtraName() const
{
return mInner.mExtraName;
}
/*
* Get and set the ID attribute atom for this node.
* See http://www.w3.org/TR/1998/REC-xml-19980210#sec-attribute-types
* for the definition of an ID attribute.
*
*/
nsIAtom* GetIDAttributeAtom() const
{
return mIDAttributeAtom;
}
void SetIDAttributeAtom(nsIAtom* aID)
{
mIDAttributeAtom = aID;
}
/**
* Get the owning node info manager. Only to be used inside Gecko, you can't
* really do anything with the pointer outside Gecko anyway.
*/
nsNodeInfoManager *NodeInfoManager() const
{
return mOwnerManager;
}
/*
* Utility functions that can be used to check if a nodeinfo holds a specific
* name, name and prefix, name and prefix and namespace ID, or just
* namespace ID.
*/
bool Equals(nsINodeInfo *aNodeInfo) const
{
return aNodeInfo == this || aNodeInfo->Equals(mInner.mName, mInner.mPrefix,
mInner.mNamespaceID);
}
bool NameAndNamespaceEquals(nsINodeInfo *aNodeInfo) const
{
return aNodeInfo == this || aNodeInfo->Equals(mInner.mName,
mInner.mNamespaceID);
}
bool Equals(nsIAtom *aNameAtom) const
{
return mInner.mName == aNameAtom;
}
bool Equals(nsIAtom *aNameAtom, nsIAtom *aPrefixAtom) const
{
return (mInner.mName == aNameAtom) && (mInner.mPrefix == aPrefixAtom);
}
bool Equals(nsIAtom *aNameAtom, PRInt32 aNamespaceID) const
{
return ((mInner.mName == aNameAtom) &&
(mInner.mNamespaceID == aNamespaceID));
}
bool Equals(nsIAtom *aNameAtom, nsIAtom *aPrefixAtom,
PRInt32 aNamespaceID) const
{
return ((mInner.mName == aNameAtom) &&
(mInner.mPrefix == aPrefixAtom) &&
(mInner.mNamespaceID == aNamespaceID));
}
bool NamespaceEquals(PRInt32 aNamespaceID) const
{
return mInner.mNamespaceID == aNamespaceID;
}
bool Equals(const nsAString& aName) const
{
return mInner.mName->Equals(aName);
}
bool Equals(const nsAString& aName, const nsAString& aPrefix) const
{
return mInner.mName->Equals(aName) &&
(mInner.mPrefix ? mInner.mPrefix->Equals(aPrefix) : aPrefix.IsEmpty());
}
bool Equals(const nsAString& aName, PRInt32 aNamespaceID) const
{
return mInner.mNamespaceID == aNamespaceID &&
mInner.mName->Equals(aName);
}
bool Equals(const nsAString& aName, const nsAString& aPrefix,
PRInt32 aNamespaceID) const
{
return mInner.mName->Equals(aName) && mInner.mNamespaceID == aNamespaceID &&
(mInner.mPrefix ? mInner.mPrefix->Equals(aPrefix) : aPrefix.IsEmpty());
}
virtual bool NamespaceEquals(const nsAString& aNamespaceURI) const = 0;
bool QualifiedNameEquals(nsIAtom* aNameAtom) const
{
NS_PRECONDITION(aNameAtom, "Must have name atom");
if (!GetPrefixAtom())
return Equals(aNameAtom);
return aNameAtom->Equals(mQualifiedName);
}
bool QualifiedNameEquals(const nsAString& aQualifiedName) const
{
return mQualifiedName == aQualifiedName;
}
/*
* Retrieve a pointer to the document that owns this node info.
*/
nsIDocument* GetDocument() const
{
return mDocument;
}
protected:
/*
* nsNodeInfoInner is used for two things:
*
* 1. as a member in nsNodeInfo for holding the name, prefix and
* namespace ID
* 2. as the hash key in the hash table in nsNodeInfoManager
*
* nsNodeInfoInner does not do any kind of reference counting,
* that's up to the user of this class. Since nsNodeInfoInner is
* typically used as a member of nsNodeInfo, the hash table doesn't
* need to delete the keys. When the value (nsNodeInfo) is deleted
* the key is automatically deleted.
*/
class nsNodeInfoInner
{
public:
nsNodeInfoInner()
: mName(nsnull), mPrefix(nsnull), mNamespaceID(kNameSpaceID_Unknown),
mNodeType(0), mNameString(nsnull), mExtraName(nsnull)
{
}
nsNodeInfoInner(nsIAtom *aName, nsIAtom *aPrefix, PRInt32 aNamespaceID,
PRUint16 aNodeType, nsIAtom* aExtraName)
: mName(aName), mPrefix(aPrefix), mNamespaceID(aNamespaceID),
mNodeType(aNodeType), mNameString(nsnull), mExtraName(aExtraName)
{
}
nsNodeInfoInner(const nsAString& aTmpName, nsIAtom *aPrefix,
PRInt32 aNamespaceID, PRUint16 aNodeType)
: mName(nsnull), mPrefix(aPrefix), mNamespaceID(aNamespaceID),
mNodeType(aNodeType), mNameString(&aTmpName), mExtraName(nsnull)
{
}
nsIAtom* mName;
nsIAtom* mPrefix;
PRInt32 mNamespaceID;
PRUint16 mNodeType; // As defined by nsIDOMNode.nodeType
const nsAString* mNameString;
nsIAtom* mExtraName; // Only used by PIs and DocTypes
};
// nsNodeInfoManager needs to pass mInner to the hash table.
friend class nsNodeInfoManager;
nsIDocument* mDocument; // Weak. Cache of mOwnerManager->mDocument
nsNodeInfoInner mInner;
nsCOMPtr<nsIAtom> mIDAttributeAtom;
nsNodeInfoManager* mOwnerManager; // Strong reference!
/*
* Members for various functions of mName+mPrefix that we can be
* asked to compute.
*/
// Qualified name
nsString mQualifiedName;
// nodeName for the node.
nsString mNodeName;
// localName for the node. This is either equal to mInner.mName, or a
// void string, depending on mInner.mNodeType.
nsString mLocalName;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsINodeInfo, NS_INODEINFO_IID)
#endif /* nsINodeInfo_h___ */

Просмотреть файл

@ -56,6 +56,7 @@ EXPORTS = \
nsGkAtomList.h \
nsGkAtoms.h \
nsNodeInfoManager.h \
nsNodeInfo.h \
nsNodeUtils.h \
nsPropertyTable.h \
nsRange.h \

Просмотреть файл

@ -394,7 +394,7 @@ nsAttrAndChildArray::SetAndTakeAttr(nsIAtom* aLocalName, nsAttrValue& aValue)
}
nsresult
nsAttrAndChildArray::SetAndTakeAttr(nsINodeInfo* aName, nsAttrValue& aValue)
nsAttrAndChildArray::SetAndTakeAttr(nsNodeInfo* aName, nsAttrValue& aValue)
{
PRInt32 namespaceID = aName->NamespaceID();
nsIAtom* localName = aName->NameAtom();

Просмотреть файл

@ -106,7 +106,7 @@ public:
const nsAttrValue* GetAttr(nsIAtom* aLocalName, PRInt32 aNamespaceID = kNameSpaceID_None) const;
const nsAttrValue* AttrAt(PRUint32 aPos) const;
nsresult SetAndTakeAttr(nsIAtom* aLocalName, nsAttrValue& aValue);
nsresult SetAndTakeAttr(nsINodeInfo* aName, nsAttrValue& aValue);
nsresult SetAndTakeAttr(nsNodeInfo* aName, nsAttrValue& aValue);
// Remove the attr at position aPos. The value of the attr is placed in
// aValue; any value that was already in aValue is destroyed.

Просмотреть файл

@ -45,7 +45,7 @@
#ifndef nsAttrName_h___
#define nsAttrName_h___
#include "nsINodeInfo.h"
#include "nsNodeInfo.h"
#include "nsIAtom.h"
#include "nsDOMString.h"
@ -68,7 +68,7 @@ public:
NS_ADDREF(aAtom);
}
explicit nsAttrName(nsINodeInfo* aNodeInfo)
explicit nsAttrName(nsNodeInfo* aNodeInfo)
{
NS_ASSERTION(aNodeInfo, "null nodeinfo-name in nsAttrName");
if (aNodeInfo->NamespaceEquals(kNameSpaceID_None)) {
@ -87,7 +87,7 @@ public:
ReleaseInternalName();
}
void SetTo(nsINodeInfo* aNodeInfo)
void SetTo(nsNodeInfo* aNodeInfo)
{
NS_ASSERTION(aNodeInfo, "null nodeinfo-name in nsAttrName");
@ -117,10 +117,10 @@ public:
return !(mBits & NS_ATTRNAME_NODEINFO_BIT);
}
nsINodeInfo* NodeInfo() const
nsNodeInfo* NodeInfo() const
{
NS_ASSERTION(!IsAtom(), "getting nodeinfo-value of atom-name");
return reinterpret_cast<nsINodeInfo*>(mBits & ~NS_ATTRNAME_NODEINFO_BIT);
return reinterpret_cast<nsNodeInfo*>(mBits & ~NS_ATTRNAME_NODEINFO_BIT);
}
nsIAtom* Atom() const
@ -148,7 +148,7 @@ public:
return !IsAtom() && NodeInfo()->Equals(aLocalName, aNamespaceID);
}
bool Equals(nsINodeInfo* aNodeInfo) const
bool Equals(nsNodeInfo* aNodeInfo) const
{
return Equals(aNodeInfo->NameAtom(), aNodeInfo->NamespaceID());
}
@ -218,22 +218,20 @@ private:
void AddRefInternalName()
{
// Since both nsINodeInfo and nsIAtom inherit nsISupports as its first
// interface we can safely assume that it's first in the vtable
nsISupports* name = reinterpret_cast<nsISupports *>
(mBits & ~NS_ATTRNAME_NODEINFO_BIT);
NS_ADDREF(name);
if (IsAtom()) {
NS_ADDREF(Atom());
} else {
NS_ADDREF(NodeInfo());
}
}
void ReleaseInternalName()
{
// Since both nsINodeInfo and nsIAtom inherit nsISupports as its first
// interface we can safely assume that it's first in the vtable
nsISupports* name = reinterpret_cast<nsISupports *>
(mBits & ~NS_ATTRNAME_NODEINFO_BIT);
NS_RELEASE(name);
if (IsAtom()) {
Atom()->Release();
} else {
NodeInfo()->Release();
}
}
PtrBits mBits;

Просмотреть файл

@ -50,7 +50,7 @@ class nsCommentNode : public nsGenericDOMDataNode,
public nsIDOMComment
{
public:
nsCommentNode(already_AddRefed<nsINodeInfo> aNodeInfo);
nsCommentNode(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsCommentNode();
// nsISupports
@ -68,7 +68,7 @@ public:
// nsINode
virtual bool IsNodeOfType(PRUint32 aFlags) const;
virtual nsGenericDOMDataNode* CloneDataNode(nsINodeInfo *aNodeInfo,
virtual nsGenericDOMDataNode* CloneDataNode(nsNodeInfo *aNodeInfo,
bool aCloneText) const;
virtual nsXPCClassInfo* GetClassInfo();
@ -90,7 +90,7 @@ NS_NewCommentNode(nsIContent** aInstancePtrResult,
*aInstancePtrResult = nsnull;
nsCOMPtr<nsINodeInfo> ni = aNodeInfoManager->GetCommentNodeInfo();
nsRefPtr<nsNodeInfo> ni = aNodeInfoManager->GetCommentNodeInfo();
NS_ENSURE_TRUE(ni, NS_ERROR_OUT_OF_MEMORY);
nsCommentNode *instance = new nsCommentNode(ni.forget());
@ -103,7 +103,7 @@ NS_NewCommentNode(nsIContent** aInstancePtrResult,
return NS_OK;
}
nsCommentNode::nsCommentNode(already_AddRefed<nsINodeInfo> aNodeInfo)
nsCommentNode::nsCommentNode(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericDOMDataNode(aNodeInfo)
{
NS_ABORT_IF_FALSE(mNodeInfo->NodeType() == nsIDOMNode::COMMENT_NODE,
@ -135,9 +135,9 @@ nsCommentNode::IsNodeOfType(PRUint32 aFlags) const
}
nsGenericDOMDataNode*
nsCommentNode::CloneDataNode(nsINodeInfo *aNodeInfo, bool aCloneText) const
nsCommentNode::CloneDataNode(nsNodeInfo *aNodeInfo, bool aCloneText) const
{
nsCOMPtr<nsINodeInfo> ni = aNodeInfo;
nsRefPtr<nsNodeInfo> ni = aNodeInfo;
nsCommentNode *it = new nsCommentNode(ni.forget());
if (it && aCloneText) {
it->mText = mText;

Просмотреть файл

@ -842,7 +842,7 @@ nsContentList::Match(Element *aElement)
if (!mXMLMatchAtom)
return false;
nsINodeInfo *ni = aElement->NodeInfo();
nsNodeInfo *ni = aElement->NodeInfo();
bool unknown = mMatchNameSpaceId == kNameSpaceID_Unknown;
bool wildcard = mMatchNameSpaceId == kNameSpaceID_Wildcard;

Просмотреть файл

@ -49,7 +49,6 @@
#include "mozilla/css/Loader.h"
#include "nsStyleConsts.h"
#include "nsStyleLinkElement.h"
#include "nsINodeInfo.h"
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
#include "nsCPrefetchService.h"

Просмотреть файл

@ -62,7 +62,7 @@
#include "nsIContent.h"
#include "mozilla/dom/Element.h"
#include "nsIDocument.h"
#include "nsINodeInfo.h"
#include "nsNodeInfo.h"
#include "nsReadableUtils.h"
#include "nsIDOMDocument.h"
#include "nsIDOMNodeList.h"
@ -2438,7 +2438,7 @@ nsContentUtils::GetNodeInfoFromQName(const nsAString& aNamespaceURI,
const nsAString& aQualifiedName,
nsNodeInfoManager* aNodeInfoManager,
PRUint16 aNodeType,
nsINodeInfo** aNodeInfo)
nsNodeInfo** aNodeInfo)
{
nsIParserService* parserService = GetParserService();
NS_ENSURE_TRUE(parserService, NS_ERROR_FAILURE);
@ -3929,7 +3929,7 @@ nsContentUtils::CreateContextualFragment(nsINode* aContextNode,
}
if (!setDefaultNamespace) {
nsINodeInfo* info = content->NodeInfo();
nsNodeInfo* info = content->NodeInfo();
if (!info->GetPrefixAtom() &&
info->NamespaceID() != kNameSpaceID_None) {
// We have no namespace prefix, but have a namespace ID. Push

Просмотреть файл

@ -68,7 +68,7 @@ using namespace mozilla::dom;
bool nsDOMAttribute::sInitialized;
nsDOMAttribute::nsDOMAttribute(nsDOMAttributeMap *aAttrMap,
already_AddRefed<nsINodeInfo> aNodeInfo,
already_AddRefed<nsNodeInfo> aNodeInfo,
const nsAString &aValue, bool aNsAware)
: nsIAttribute(aAttrMap, aNodeInfo, aNsAware), mValue(aValue), mChild(nsnull)
{
@ -183,7 +183,7 @@ nsDOMAttribute::SetOwnerDocument(nsIDocument* aDocument)
NS_ASSERTION(doc != aDocument, "bad call to nsDOMAttribute::SetOwnerDocument");
doc->DeleteAllPropertiesFor(this);
nsCOMPtr<nsINodeInfo> newNodeInfo;
nsRefPtr<nsNodeInfo> newNodeInfo;
newNodeInfo = aDocument->NodeInfoManager()->
GetNodeInfo(mNodeInfo->NameAtom(), mNodeInfo->GetPrefixAtom(),
mNodeInfo->NamespaceID(),
@ -463,12 +463,12 @@ nsDOMAttribute::AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn)
}
nsresult
nsDOMAttribute::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
nsDOMAttribute::Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const
{
nsAutoString value;
const_cast<nsDOMAttribute*>(this)->GetValue(value);
nsCOMPtr<nsINodeInfo> ni = aNodeInfo;
nsRefPtr<nsNodeInfo> ni = aNodeInfo;
*aResult = new nsDOMAttribute(nsnull, ni.forget(), value, mNsAware);
if (!*aResult) {
return NS_ERROR_OUT_OF_MEMORY;

Просмотреть файл

@ -48,7 +48,6 @@
#include "nsIDOMNodeList.h"
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsINodeInfo.h"
#include "nsDOMAttributeMap.h"
#include "nsCycleCollectionParticipant.h"
#include "nsStubMutationObserver.h"
@ -61,7 +60,7 @@ class nsDOMAttribute : public nsIAttribute,
{
public:
nsDOMAttribute(nsDOMAttributeMap* aAttrMap,
already_AddRefed<nsINodeInfo> aNodeInfo,
already_AddRefed<nsNodeInfo> aNodeInfo,
const nsAString& aValue,
bool aNsAware);
virtual ~nsDOMAttribute();
@ -91,7 +90,7 @@ public:
bool aNotify);
virtual nsresult AppendChildTo(nsIContent* aKid, bool aNotify);
virtual nsresult RemoveChildAt(PRUint32 aIndex, bool aNotify);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual already_AddRefed<nsIURI> GetBaseURI() const;
static void Initialize();

Просмотреть файл

@ -164,7 +164,7 @@ nsDOMAttributeMap::DropAttribute(PRInt32 aNamespaceID, nsIAtom* aLocalName)
}
nsresult
nsDOMAttributeMap::RemoveAttribute(nsINodeInfo* aNodeInfo, nsIDOMNode** aReturn)
nsDOMAttributeMap::RemoveAttribute(nsNodeInfo* aNodeInfo, nsIDOMNode** aReturn)
{
NS_ASSERTION(aNodeInfo, "RemoveAttribute() called with aNodeInfo == nsnull!");
NS_ASSERTION(aReturn, "RemoveAttribute() called with aReturn == nsnull");
@ -179,7 +179,7 @@ nsDOMAttributeMap::RemoveAttribute(nsINodeInfo* aNodeInfo, nsIDOMNode** aReturn)
// As we are removing the attribute we need to set the current value in
// the attribute node.
mContent->GetAttr(aNodeInfo->NamespaceID(), aNodeInfo->NameAtom(), value);
nsCOMPtr<nsINodeInfo> ni = aNodeInfo;
nsRefPtr<nsNodeInfo> ni = aNodeInfo;
nsCOMPtr<nsIDOMNode> newAttr =
new nsDOMAttribute(nsnull, ni.forget(), value, true);
if (!newAttr) {
@ -201,7 +201,7 @@ nsDOMAttributeMap::RemoveAttribute(nsINodeInfo* aNodeInfo, nsIDOMNode** aReturn)
}
nsDOMAttribute*
nsDOMAttributeMap::GetAttribute(nsINodeInfo* aNodeInfo, bool aNsAware)
nsDOMAttributeMap::GetAttribute(nsNodeInfo* aNodeInfo, bool aNsAware)
{
NS_ASSERTION(aNodeInfo, "GetAttribute() called with aNodeInfo == nsnull!");
@ -209,7 +209,7 @@ nsDOMAttributeMap::GetAttribute(nsINodeInfo* aNodeInfo, bool aNsAware)
nsDOMAttribute* node = mAttributeCache.GetWeak(attr);
if (!node) {
nsCOMPtr<nsINodeInfo> ni = aNodeInfo;
nsRefPtr<nsNodeInfo> ni = aNodeInfo;
nsRefPtr<nsDOMAttribute> newAttr =
new nsDOMAttribute(this, ni.forget(), EmptyString(), aNsAware);
if (newAttr && mAttributeCache.Put(attr, newAttr)) {
@ -226,7 +226,7 @@ nsDOMAttributeMap::GetNamedItem(const nsAString& aAttrName, nsresult *aResult)
*aResult = NS_OK;
if (mContent) {
nsCOMPtr<nsINodeInfo> ni =
nsRefPtr<nsNodeInfo> ni =
mContent->GetExistingAttrNameFromQName(aAttrName);
if (ni) {
return GetAttribute(ni, false);
@ -311,7 +311,7 @@ nsDOMAttributeMap::SetNamedItemInternal(nsIDOMNode *aNode,
// Get nodeinfo and preexisting attribute (if it exists)
nsAutoString name;
nsCOMPtr<nsINodeInfo> ni;
nsRefPtr<nsNodeInfo> ni;
// SetNamedItemNS()
if (aWithNS) {
@ -378,7 +378,7 @@ nsDOMAttributeMap::RemoveNamedItem(const nsAString& aName,
nsresult rv = NS_OK;
if (mContent) {
nsCOMPtr<nsINodeInfo> ni = mContent->GetExistingAttrNameFromQName(aName);
nsRefPtr<nsNodeInfo> ni = mContent->GetExistingAttrNameFromQName(aName);
if (!ni) {
return NS_ERROR_DOM_NOT_FOUND_ERR;
}
@ -404,7 +404,7 @@ nsDOMAttributeMap::GetItemAt(PRUint32 aIndex, nsresult *aResult)
if (mContent && (name = mContent->GetAttrNameAt(aIndex))) {
// Don't use the nodeinfo even if one exists since it can
// have the wrong owner document.
nsCOMPtr<nsINodeInfo> ni;
nsRefPtr<nsNodeInfo> ni;
ni = mContent->NodeInfo()->NodeInfoManager()->
GetNodeInfo(name->LocalName(), name->GetPrefix(), name->NamespaceID(),
nsIDOMNode::ATTRIBUTE_NODE);
@ -482,7 +482,7 @@ nsDOMAttributeMap::GetNamedItemNSInternal(const nsAString& aNamespaceURI,
if (nameSpaceID == attrNS &&
nameAtom->Equals(aLocalName)) {
nsCOMPtr<nsINodeInfo> ni;
nsRefPtr<nsNodeInfo> ni;
ni = mContent->NodeInfo()->NodeInfoManager()->
GetNodeInfo(nameAtom, name->GetPrefix(), nameSpaceID,
nsIDOMNode::ATTRIBUTE_NODE);
@ -524,7 +524,7 @@ nsDOMAttributeMap::RemoveNamedItemNS(const nsAString& aNamespaceURI,
"didn't implement nsIAttribute");
NS_ENSURE_TRUE(attr, NS_ERROR_UNEXPECTED);
nsINodeInfo *ni = attr->NodeInfo();
nsNodeInfo *ni = attr->NodeInfo();
mContent->UnsetAttr(ni->NamespaceID(), ni->NameAtom(), true);
return NS_OK;

Просмотреть файл

@ -53,7 +53,7 @@
class nsIAtom;
class nsIContent;
class nsDOMAttribute;
class nsINodeInfo;
class nsNodeInfo;
class nsIDocument;
namespace mozilla {
@ -224,12 +224,12 @@ private:
nsIDOMNode** aReturn,
bool aRemove = false);
nsDOMAttribute* GetAttribute(nsINodeInfo* aNodeInfo, bool aNsAware);
nsDOMAttribute* GetAttribute(nsNodeInfo* aNodeInfo, bool aNsAware);
/**
* Remove an attribute, returns the removed node.
*/
nsresult RemoveAttribute(nsINodeInfo* aNodeInfo,
nsresult RemoveAttribute(nsNodeInfo* aNodeInfo,
nsIDOMNode** aReturn);
};

Просмотреть файл

@ -64,7 +64,7 @@ NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
NS_ENSURE_ARG_POINTER(aDocType);
NS_ENSURE_ARG_POINTER(aName);
nsCOMPtr<nsINodeInfo> ni =
nsRefPtr<nsNodeInfo> ni =
aNodeInfoManager->GetNodeInfo(nsGkAtoms::documentTypeNodeName, nsnull,
kNameSpaceID_None,
nsIDOMNode::DOCUMENT_TYPE_NODE,
@ -78,7 +78,7 @@ NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
return NS_OK;
}
nsDOMDocumentType::nsDOMDocumentType(already_AddRefed<nsINodeInfo> aNodeInfo,
nsDOMDocumentType::nsDOMDocumentType(already_AddRefed<nsNodeInfo> aNodeInfo,
const nsAString& aPublicId,
const nsAString& aSystemId,
const nsAString& aInternalSubset) :
@ -155,9 +155,9 @@ nsDOMDocumentType::GetInternalSubset(nsAString& aInternalSubset)
}
nsGenericDOMDataNode*
nsDOMDocumentType::CloneDataNode(nsINodeInfo *aNodeInfo, bool aCloneText) const
nsDOMDocumentType::CloneDataNode(nsNodeInfo *aNodeInfo, bool aCloneText) const
{
nsCOMPtr<nsINodeInfo> ni = aNodeInfo;
nsRefPtr<nsNodeInfo> ni = aNodeInfo;
return new nsDOMDocumentType(ni.forget(), mPublicId, mSystemId,
mInternalSubset);
}

Просмотреть файл

@ -57,7 +57,7 @@ class nsDOMDocumentTypeForward : public nsGenericDOMDataNode,
public nsIDOMDocumentType
{
public:
nsDOMDocumentTypeForward(already_AddRefed<nsINodeInfo> aNodeInfo)
nsDOMDocumentTypeForward(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericDOMDataNode(aNodeInfo)
{
}
@ -69,7 +69,7 @@ public:
class nsDOMDocumentType : public nsDOMDocumentTypeForward
{
public:
nsDOMDocumentType(already_AddRefed<nsINodeInfo> aNodeInfo,
nsDOMDocumentType(already_AddRefed<nsNodeInfo> aNodeInfo,
const nsAString& aPublicId,
const nsAString& aSystemId,
const nsAString& aInternalSubset);
@ -102,7 +102,7 @@ public:
// nsIContent overrides
virtual const nsTextFragment* GetText();
virtual nsGenericDOMDataNode* CloneDataNode(nsINodeInfo *aNodeInfo,
virtual nsGenericDOMDataNode* CloneDataNode(nsNodeInfo *aNodeInfo,
bool aCloneText) const;
virtual nsXPCClassInfo* GetClassInfo();

Просмотреть файл

@ -4458,7 +4458,7 @@ nsDocument::CreateElementNS(const nsAString& aNamespaceURI,
const nsAString& aQualifiedName,
nsIContent** aReturn)
{
nsCOMPtr<nsINodeInfo> nodeInfo;
nsRefPtr<nsNodeInfo> nodeInfo;
nsresult rv = nsContentUtils::GetNodeInfoFromQName(aNamespaceURI,
aQualifiedName,
mNodeInfoManager,
@ -4586,7 +4586,7 @@ nsDocument::CreateAttribute(const nsAString& aName,
nsresult rv = nsContentUtils::CheckQName(aName, false);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsINodeInfo> nodeInfo;
nsRefPtr<nsNodeInfo> nodeInfo;
rv = mNodeInfoManager->GetNodeInfo(aName, nsnull, kNameSpaceID_None,
nsIDOMNode::ATTRIBUTE_NODE,
getter_AddRefs(nodeInfo));
@ -4609,7 +4609,7 @@ nsDocument::CreateAttributeNS(const nsAString & aNamespaceURI,
WarnOnceAbout(eCreateAttributeNS);
nsCOMPtr<nsINodeInfo> nodeInfo;
nsRefPtr<nsNodeInfo> nodeInfo;
nsresult rv = nsContentUtils::GetNodeInfoFromQName(aNamespaceURI,
aQualifiedName,
mNodeInfoManager,
@ -5277,7 +5277,7 @@ nsDocument::SetTitle(const nsAString& aTitle)
return NS_OK;
{
nsCOMPtr<nsINodeInfo> titleInfo;
nsRefPtr<nsNodeInfo> titleInfo;
titleInfo = mNodeInfoManager->GetNodeInfo(nsGkAtoms::title, nsnull,
kNameSpaceID_XHTML,
nsIDOMNode::ELEMENT_NODE);
@ -6821,7 +6821,7 @@ nsDocument::CreateElem(const nsAString& aName, nsIAtom *aPrefix, PRInt32 aNamesp
*aResult = nsnull;
nsCOMPtr<nsINodeInfo> nodeInfo;
nsRefPtr<nsNodeInfo> nodeInfo;
mNodeInfoManager->GetNodeInfo(aName, aPrefix, aNamespaceID,
nsIDOMNode::ELEMENT_NODE,
getter_AddRefs(nodeInfo));

Просмотреть файл

@ -62,7 +62,6 @@
#include "nsIPrincipal.h"
#include "nsIParser.h"
#include "nsBindingManager.h"
#include "nsINodeInfo.h"
#include "nsHashtable.h"
#include "nsInterfaceHashtable.h"
#include "nsIBoxObject.h"
@ -725,7 +724,7 @@ public:
bool aNotify);
virtual nsresult AppendChildTo(nsIContent* aKid, bool aNotify);
virtual nsresult RemoveChildAt(PRUint32 aIndex, bool aNotify);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const
{
return NS_ERROR_NOT_IMPLEMENTED;
}

Просмотреть файл

@ -44,7 +44,7 @@
#include "nsIDOMDocumentFragment.h"
#include "nsGenericElement.h"
#include "nsINameSpaceManager.h"
#include "nsINodeInfo.h"
#include "nsNodeInfo.h"
#include "nsNodeInfoManager.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
@ -67,7 +67,7 @@ public:
// interface nsIDOMDocumentFragment
// NS_DECL_NSIDOCUMENTFRAGMENT Empty
nsDocumentFragment(already_AddRefed<nsINodeInfo> aNodeInfo);
nsDocumentFragment(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsDocumentFragment()
{
}
@ -107,7 +107,7 @@ public:
virtual nsIAtom *GetIDAttributeName() const;
protected:
nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
};
nsresult
@ -116,7 +116,7 @@ NS_NewDocumentFragment(nsIDOMDocumentFragment** aInstancePtrResult,
{
NS_ENSURE_ARG(aNodeInfoManager);
nsCOMPtr<nsINodeInfo> nodeInfo;
nsRefPtr<nsNodeInfo> nodeInfo;
nodeInfo = aNodeInfoManager->GetNodeInfo(nsGkAtoms::documentFragmentNodeName,
nsnull, kNameSpaceID_None,
nsIDOMNode::DOCUMENT_FRAGMENT_NODE);
@ -132,7 +132,7 @@ NS_NewDocumentFragment(nsIDOMDocumentFragment** aInstancePtrResult,
return NS_OK;
}
nsDocumentFragment::nsDocumentFragment(already_AddRefed<nsINodeInfo> aNodeInfo)
nsDocumentFragment::nsDocumentFragment(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericElement(aNodeInfo)
{
ClearIsElement();

Просмотреть файл

@ -52,7 +52,7 @@ class nsGenConImageContent : public nsXMLElement,
public nsImageLoadingContent
{
public:
nsGenConImageContent(already_AddRefed<nsINodeInfo> aNodeInfo)
nsGenConImageContent(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsXMLElement(aNodeInfo)
{
// nsImageLoadingContent starts out broken, so we start out
@ -80,7 +80,7 @@ NS_IMPL_ISUPPORTS_INHERITED3(nsGenConImageContent, nsXMLElement,
nsIImageLoadingContent, imgIContainerObserver, imgIDecoderObserver)
nsresult
NS_NewGenConImageContent(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo,
NS_NewGenConImageContent(nsIContent** aResult, already_AddRefed<nsNodeInfo> aNodeInfo,
imgIRequest* aImageRequest)
{
NS_PRECONDITION(aImageRequest, "Must have request!");

Просмотреть файл

@ -70,7 +70,7 @@
using namespace mozilla;
nsGenericDOMDataNode::nsGenericDOMDataNode(already_AddRefed<nsINodeInfo> aNodeInfo)
nsGenericDOMDataNode::nsGenericDOMDataNode(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsIContent(aNodeInfo)
{
NS_ABORT_IF_FALSE(mNodeInfo->NodeType() == nsIDOMNode::TEXT_NODE ||
@ -600,7 +600,7 @@ nsGenericDOMDataNode::GetIDAttributeName() const
return nsnull;
}
already_AddRefed<nsINodeInfo>
already_AddRefed<nsNodeInfo>
nsGenericDOMDataNode::GetExistingAttrNameFromQName(const nsAString& aStr) const
{
return nsnull;

Просмотреть файл

@ -70,7 +70,7 @@ class nsIDOMEventListener;
class nsIDOMNodeList;
class nsIFrame;
class nsIDOMText;
class nsINodeInfo;
class nsNodeInfo;
class nsURI;
class nsGenericDOMDataNode : public nsIContent
@ -80,7 +80,7 @@ public:
NS_DECL_SIZEOF_EXCLUDING_THIS
nsGenericDOMDataNode(already_AddRefed<nsINodeInfo> aNodeInfo);
nsGenericDOMDataNode(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsGenericDOMDataNode();
// Implementation for nsIDOMNode
@ -194,7 +194,7 @@ public:
virtual already_AddRefed<nsINodeList> GetChildren(PRUint32 aFilter);
virtual nsIAtom *GetIDAttributeName() const;
virtual already_AddRefed<nsINodeInfo> GetExistingAttrNameFromQName(const nsAString& aStr) const;
virtual already_AddRefed<nsNodeInfo> GetExistingAttrNameFromQName(const nsAString& aStr) const;
nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString& aValue, bool aNotify)
{
@ -254,7 +254,7 @@ public:
PRInt32 aModType) const;
virtual nsIAtom *GetClassAttributeName() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const
{
*aResult = CloneDataNode(aNodeInfo, true);
if (!*aResult) {
@ -346,7 +346,7 @@ protected:
* @param aCloneText if true the text content will be cloned too
* @return the clone
*/
virtual nsGenericDOMDataNode *CloneDataNode(nsINodeInfo *aNodeInfo,
virtual nsGenericDOMDataNode *CloneDataNode(nsNodeInfo *aNodeInfo,
bool aCloneText) const = 0;
nsTextFragment mText;

Просмотреть файл

@ -50,7 +50,7 @@
#include "nsDOMAttribute.h"
#include "nsDOMAttributeMap.h"
#include "nsIAtom.h"
#include "nsINodeInfo.h"
#include "nsNodeInfo.h"
#include "nsIDocument.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMDocument.h"
@ -906,8 +906,8 @@ nsINode::IsEqualTo(nsINode* aOther)
return false;
}
nsINodeInfo* nodeInfo1 = node1->mNodeInfo;
nsINodeInfo* nodeInfo2 = node2->mNodeInfo;
nsNodeInfo* nodeInfo1 = node1->mNodeInfo;
nsNodeInfo* nodeInfo2 = node2->mNodeInfo;
if (!nodeInfo1->Equals(nodeInfo2) ||
nodeInfo1->GetExtraName() != nodeInfo2->GetExtraName()) {
return false;
@ -1250,7 +1250,7 @@ nsINode::Traverse(nsINode *tmp, nsCycleCollectionTraversalCallback &cb)
}
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mNodeInfo)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_PTR(tmp->mNodeInfo, nsNodeInfo, "mNodeInfo")
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_RAWPTR(GetParent())
nsSlots *slots = tmp->GetExistingSlots();
@ -2481,7 +2481,7 @@ nsGenericElement::nsDOMSlots::Unlink(bool aIsXUL)
}
}
nsGenericElement::nsGenericElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsGenericElement::nsGenericElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: Element(aNodeInfo)
{
NS_ABORT_IF_FALSE(mNodeInfo->NodeType() == nsIDOMNode::ELEMENT_NODE ||
@ -2862,7 +2862,7 @@ nsGenericElement::SetAttributeNS(const nsAString& aNamespaceURI,
const nsAString& aQualifiedName,
const nsAString& aValue)
{
nsCOMPtr<nsINodeInfo> ni;
nsRefPtr<nsNodeInfo> ni;
nsresult rv =
nsContentUtils::GetNodeInfoFromQName(aNamespaceURI, aQualifiedName,
mNodeInfo->NodeInfoManager(),
@ -3648,7 +3648,7 @@ nsGenericElement::FindAttributeDependence(const nsIAtom* aAttribute,
return false;
}
already_AddRefed<nsINodeInfo>
already_AddRefed<nsNodeInfo>
nsGenericElement::GetExistingAttrNameFromQName(const nsAString& aStr) const
{
const nsAttrName* name = InternalGetExistingAttrNameFromQName(aStr);
@ -3656,7 +3656,7 @@ nsGenericElement::GetExistingAttrNameFromQName(const nsAString& aStr) const
return nsnull;
}
nsINodeInfo* nodeInfo;
nsNodeInfo* nodeInfo;
if (name->IsAtom()) {
nodeInfo = mNodeInfo->NodeInfoManager()->
GetNodeInfo(name->Atom(), nsnull, kNameSpaceID_None,
@ -5042,7 +5042,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsGenericElement)
if (!name->IsAtom()) {
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb,
"mAttrsAndChildren[i]->NodeInfo()");
cb.NoteXPCOMChild(name->NodeInfo());
cb.NoteNativeChild(name->NodeInfo(), &NS_CYCLE_COLLECTION_NAME(nsNodeInfo));
}
}
@ -5332,7 +5332,7 @@ nsGenericElement::SetAttrAndNotify(PRInt32 aNamespaceID,
}
}
else {
nsCOMPtr<nsINodeInfo> ni;
nsRefPtr<nsNodeInfo> ni;
ni = mNodeInfo->NodeInfoManager()->GetNodeInfo(aName, aPrefix,
aNamespaceID,
nsIDOMNode::ATTRIBUTE_NODE);

Просмотреть файл

@ -76,7 +76,7 @@ class nsIDOMNamedNodeMap;
class nsICSSDeclaration;
class nsIDOMCSSStyleDeclaration;
class nsIURI;
class nsINodeInfo;
class nsNodeInfo;
class nsIControllers;
class nsEventListenerManager;
class nsIScrollableFrame;
@ -240,7 +240,7 @@ class nsInlineEventHandlersTearoff;
class nsGenericElement : public mozilla::dom::Element
{
public:
nsGenericElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsGenericElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsGenericElement();
friend class nsTouchEventReceiverTearoff;
@ -277,7 +277,7 @@ public:
bool aNullParent = true);
virtual already_AddRefed<nsINodeList> GetChildren(PRUint32 aFilter);
virtual nsIAtom *GetClassAttributeName() const;
virtual already_AddRefed<nsINodeInfo> GetExistingAttrNameFromQName(const nsAString& aStr) const;
virtual already_AddRefed<nsNodeInfo> GetExistingAttrNameFromQName(const nsAString& aStr) const;
nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString& aValue, bool aNotify)
{
@ -613,7 +613,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsGenericElement)
virtual void NodeInfoChanged(nsINodeInfo* aOldNodeInfo)
virtual void NodeInfoChanged(nsNodeInfo* aOldNodeInfo)
{
}
@ -1001,10 +1001,10 @@ private:
*/
#define NS_IMPL_ELEMENT_CLONE(_elementName) \
nsresult \
_elementName::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const \
_elementName::Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const \
{ \
*aResult = nsnull; \
nsCOMPtr<nsINodeInfo> ni = aNodeInfo; \
nsRefPtr<nsNodeInfo> ni = aNodeInfo; \
_elementName *it = new _elementName(ni.forget()); \
if (!it) { \
return NS_ERROR_OUT_OF_MEMORY; \
@ -1021,10 +1021,10 @@ _elementName::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const \
#define NS_IMPL_ELEMENT_CLONE_WITH_INIT(_elementName) \
nsresult \
_elementName::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const \
_elementName::Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const \
{ \
*aResult = nsnull; \
nsCOMPtr<nsINodeInfo> ni = aNodeInfo; \
nsRefPtr<nsNodeInfo> ni = aNodeInfo; \
_elementName *it = new _elementName(ni.forget()); \
if (!it) { \
return NS_ERROR_OUT_OF_MEMORY; \

Просмотреть файл

@ -60,7 +60,7 @@ class nsMappedAttributeElement : public nsMappedAttributeElementBase
protected:
nsMappedAttributeElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsMappedAttributeElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsMappedAttributeElementBase(aNodeInfo)
{}

Просмотреть файл

@ -43,7 +43,7 @@
#include "nscore.h"
#include "nsINameSpaceManager.h"
#include "nsAutoPtr.h"
#include "nsINodeInfo.h"
#include "nsNodeInfo.h"
#include "nsCOMArray.h"
#include "nsTArray.h"
#include "nsContentCreatorFunctions.h"
@ -226,7 +226,7 @@ NameSpaceManagerImpl::GetNameSpaceID(const nsAString& aURI)
nsresult
NS_NewElement(nsIContent** aResult,
already_AddRefed<nsINodeInfo> aNodeInfo, FromParser aFromParser)
already_AddRefed<nsNodeInfo> aNodeInfo, FromParser aFromParser)
{
PRInt32 ns = aNodeInfo.get()->NamespaceID();
if (ns == kNameSpaceID_XHTML) {

Просмотреть файл

@ -176,7 +176,9 @@ nsNodeInfo::nsNodeInfo(nsIAtom *aName, nsIAtom *aPrefix, PRInt32 aNamespaceID,
// nsISupports
NS_IMPL_CYCLE_COLLECTION_CLASS(nsNodeInfo)
NS_IMPL_CYCLE_COLLECTION_UNLINK_0(nsNodeInfo)
NS_IMPL_CYCLE_COLLECTION_UNLINK_NATIVE_0(nsNodeInfo)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsNodeInfo, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsNodeInfo, Release)
static const char* kNSURIs[] = {
" ([none])",
@ -191,7 +193,7 @@ static const char* kNSURIs[] = {
" (XUL)"
};
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsNodeInfo)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_BEGIN_INTERNAL(nsNodeInfo)
if (NS_UNLIKELY(cb.WantDebugInfo())) {
char name[72];
PRUint32 nsid = tmp->NamespaceID();
@ -214,14 +216,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsNodeInfo)
nsNodeInfoManager)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsNodeInfo)
NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_DESTROY(nsNodeInfo, LastRelease())
NS_INTERFACE_TABLE_HEAD(nsNodeInfo)
NS_INTERFACE_TABLE1(nsNodeInfo, nsINodeInfo)
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsNodeInfo)
NS_INTERFACE_MAP_END
// nsINodeInfo
// nsNodeInfo
nsresult
nsNodeInfo::GetNamespaceURI(nsAString& aNameSpaceURI) const
@ -245,7 +240,7 @@ nsNodeInfo::NamespaceEquals(const nsAString& aNamespaceURI) const
PRInt32 nsid =
nsContentUtils::NameSpaceManager()->GetNameSpaceID(aNamespaceURI);
return nsINodeInfo::NamespaceEquals(nsid);
return nsNodeInfo::NamespaceEquals(nsid);
}
// static

Просмотреть файл

@ -44,27 +44,23 @@
#ifndef nsNodeInfo_h___
#define nsNodeInfo_h___
#include "nsINodeInfo.h"
#include "nsNodeInfoManager.h"
#include "plhash.h"
#include "nsIAtom.h"
#include "nsINameSpaceManager.h"
#include "nsCOMPtr.h"
#include "nsDOMString.h"
class nsFixedSizeAllocator;
class nsNodeInfo : public nsINodeInfo
class nsNodeInfo
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(nsNodeInfo)
// nsINodeInfo
virtual nsresult GetNamespaceURI(nsAString& aNameSpaceURI) const;
virtual bool NamespaceEquals(const nsAString& aNamespaceURI) const;
NS_INLINE_DECL_REFCOUNTING_WITH_DESTROY(nsNodeInfo, LastRelease())
NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(nsNodeInfo)
// nsNodeInfo
// Create objects with Create
public:
/*
* aName and aOwnerManager may not be null.
*/
@ -72,6 +68,300 @@ public:
PRInt32 aNamespaceID, PRUint16 aNodeType,
nsIAtom *aExtraName,
nsNodeInfoManager *aOwnerManager);
/*
* Get the name from this node as a string, this does not include the prefix.
*
* For the HTML element "<body>" this will return "body" and for the XML
* element "<html:body>" this will return "body".
*/
void GetName(nsAString& aName) const
{
mInner.mName->ToString(aName);
}
/*
* Get the name from this node as an atom, this does not include the prefix.
* This function never returns a null atom.
*
* 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
{
return mInner.mName;
}
/*
* Get the qualified name from this node as a string, the qualified name
* includes the prefix, if one exists.
*
* For the HTML element "<body>" this will return "body" and for the XML
* element "<html:body>" this will return "html:body".
*/
const nsString& QualifiedName() const {
return mQualifiedName;
}
/*
* Returns the node's nodeName as defined in DOM Core
*/
const nsString& NodeName() const {
return mNodeName;
}
/*
* Returns the node's localName as defined in DOM Core
*/
const nsString& LocalName() const {
return mLocalName;
}
/*
* Get the prefix from this node as a string.
*
* For the HTML element "<body>" this will return a null string and for
* the XML element "<html:body>" this will return the string "html".
*/
void GetPrefix(nsAString& aPrefix) const
{
if (mInner.mPrefix) {
mInner.mPrefix->ToString(aPrefix);
} else {
SetDOMStringToNull(aPrefix);
}
}
/*
* Get the prefix from this node as an atom.
*
* 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
{
return mInner.mPrefix;
}
/*
* Get the namespace URI for a node, if the node has a namespace URI.
*/
nsresult GetNamespaceURI(nsAString& aNameSpaceURI) const;
/*
* Get the namespace ID for a node if the node has a namespace, if not this
* returns kNameSpaceID_None.
*/
PRInt32 NamespaceID() const
{
return mInner.mNamespaceID;
}
/*
* Get the nodetype for the node. Returns the values specified in nsIDOMNode
* for nsIDOMNode.nodeType
*/
PRUint16 NodeType() const
{
return mInner.mNodeType;
}
/*
* Get the extra name, used by PIs and DocTypes, for the node.
*/
nsIAtom* GetExtraName() const
{
return mInner.mExtraName;
}
/*
* Get and set the ID attribute atom for this node.
* See http://www.w3.org/TR/1998/REC-xml-19980210#sec-attribute-types
* for the definition of an ID attribute.
*
*/
nsIAtom* GetIDAttributeAtom() const
{
return mIDAttributeAtom;
}
void SetIDAttributeAtom(nsIAtom* aID)
{
mIDAttributeAtom = aID;
}
/**
* Get the owning node info manager. Only to be used inside Gecko, you can't
* really do anything with the pointer outside Gecko anyway.
*/
nsNodeInfoManager *NodeInfoManager() const
{
return mOwnerManager;
}
/*
* Utility functions that can be used to check if a nodeinfo holds a specific
* name, name and prefix, name and prefix and namespace ID, or just
* namespace ID.
*/
bool Equals(nsNodeInfo *aNodeInfo) const
{
return aNodeInfo == this || aNodeInfo->Equals(mInner.mName, mInner.mPrefix,
mInner.mNamespaceID);
}
bool NameAndNamespaceEquals(nsNodeInfo *aNodeInfo) const
{
return aNodeInfo == this || aNodeInfo->Equals(mInner.mName,
mInner.mNamespaceID);
}
bool Equals(nsIAtom *aNameAtom) const
{
return mInner.mName == aNameAtom;
}
bool Equals(nsIAtom *aNameAtom, nsIAtom *aPrefixAtom) const
{
return (mInner.mName == aNameAtom) && (mInner.mPrefix == aPrefixAtom);
}
bool Equals(nsIAtom *aNameAtom, PRInt32 aNamespaceID) const
{
return ((mInner.mName == aNameAtom) &&
(mInner.mNamespaceID == aNamespaceID));
}
bool Equals(nsIAtom *aNameAtom, nsIAtom *aPrefixAtom,
PRInt32 aNamespaceID) const
{
return ((mInner.mName == aNameAtom) &&
(mInner.mPrefix == aPrefixAtom) &&
(mInner.mNamespaceID == aNamespaceID));
}
bool NamespaceEquals(PRInt32 aNamespaceID) const
{
return mInner.mNamespaceID == aNamespaceID;
}
bool Equals(const nsAString& aName) const
{
return mInner.mName->Equals(aName);
}
bool Equals(const nsAString& aName, const nsAString& aPrefix) const
{
return mInner.mName->Equals(aName) &&
(mInner.mPrefix ? mInner.mPrefix->Equals(aPrefix) : aPrefix.IsEmpty());
}
bool Equals(const nsAString& aName, PRInt32 aNamespaceID) const
{
return mInner.mNamespaceID == aNamespaceID &&
mInner.mName->Equals(aName);
}
bool Equals(const nsAString& aName, const nsAString& aPrefix,
PRInt32 aNamespaceID) const
{
return mInner.mName->Equals(aName) && mInner.mNamespaceID == aNamespaceID &&
(mInner.mPrefix ? mInner.mPrefix->Equals(aPrefix) : aPrefix.IsEmpty());
}
bool NamespaceEquals(const nsAString& aNamespaceURI) const;
bool QualifiedNameEquals(nsIAtom* aNameAtom) const
{
NS_PRECONDITION(aNameAtom, "Must have name atom");
if (!GetPrefixAtom())
return Equals(aNameAtom);
return aNameAtom->Equals(mQualifiedName);
}
bool QualifiedNameEquals(const nsAString& aQualifiedName) const
{
return mQualifiedName == aQualifiedName;
}
/*
* Retrieve a pointer to the document that owns this node info.
*/
nsIDocument* GetDocument() const
{
return mDocument;
}
protected:
/*
* nsNodeInfoInner is used for two things:
*
* 1. as a member in nsNodeInfo for holding the name, prefix and
* namespace ID
* 2. as the hash key in the hash table in nsNodeInfoManager
*
* nsNodeInfoInner does not do any kind of reference counting,
* that's up to the user of this class. Since nsNodeInfoInner is
* typically used as a member of nsNodeInfo, the hash table doesn't
* need to delete the keys. When the value (nsNodeInfo) is deleted
* the key is automatically deleted.
*/
class nsNodeInfoInner
{
public:
nsNodeInfoInner()
: mName(nsnull), mPrefix(nsnull), mNamespaceID(kNameSpaceID_Unknown),
mNodeType(0), mNameString(nsnull), mExtraName(nsnull)
{
}
nsNodeInfoInner(nsIAtom *aName, nsIAtom *aPrefix, PRInt32 aNamespaceID,
PRUint16 aNodeType, nsIAtom* aExtraName)
: mName(aName), mPrefix(aPrefix), mNamespaceID(aNamespaceID),
mNodeType(aNodeType), mNameString(nsnull), mExtraName(aExtraName)
{
}
nsNodeInfoInner(const nsAString& aTmpName, nsIAtom *aPrefix,
PRInt32 aNamespaceID, PRUint16 aNodeType)
: mName(nsnull), mPrefix(aPrefix), mNamespaceID(aNamespaceID),
mNodeType(aNodeType), mNameString(&aTmpName), mExtraName(nsnull)
{
}
nsIAtom* mName;
nsIAtom* mPrefix;
PRInt32 mNamespaceID;
PRUint16 mNodeType; // As defined by nsIDOMNode.nodeType
const nsAString* mNameString;
nsIAtom* mExtraName; // Only used by PIs and DocTypes
};
// nsNodeInfoManager needs to pass mInner to the hash table.
friend class nsNodeInfoManager;
nsIDocument* mDocument; // Weak. Cache of mOwnerManager->mDocument
nsNodeInfoInner mInner;
nsCOMPtr<nsIAtom> mIDAttributeAtom;
nsNodeInfoManager* mOwnerManager; // Strong reference!
/*
* Members for various functions of mName+mPrefix that we can be
* asked to compute.
*/
// Qualified name
nsString mQualifiedName;
// nodeName for the node.
nsString mNodeName;
// localName for the node. This is either equal to mInner.mName, or a
// void string, depending on mInner.mNodeType.
nsString mLocalName;
private:
nsNodeInfo(); // Unimplemented
nsNodeInfo(const nsNodeInfo& aOther); // Unimplemented
@ -79,7 +369,7 @@ private:
PRUint16 aNodeType, nsIAtom *aExtraName,
nsNodeInfoManager *aOwnerManager);
protected:
virtual ~nsNodeInfo();
~nsNodeInfo();
public:
/**

Просмотреть файл

@ -73,8 +73,8 @@ nsNodeInfoManager::GetNodeInfoInnerHashValue(const void *key)
{
NS_ASSERTION(key, "Null key passed to nsNodeInfo::GetHashValue!");
const nsINodeInfo::nsNodeInfoInner *node =
reinterpret_cast<const nsINodeInfo::nsNodeInfoInner *>(key);
const nsNodeInfo::nsNodeInfoInner *node =
reinterpret_cast<const nsNodeInfo::nsNodeInfoInner *>(key);
if (node->mName) {
// Ideally, we'd return node->mName->hash() here. But that doesn't work at
@ -91,10 +91,10 @@ nsNodeInfoManager::NodeInfoInnerKeyCompare(const void *key1, const void *key2)
{
NS_ASSERTION(key1 && key2, "Null key passed to NodeInfoInnerKeyCompare!");
const nsINodeInfo::nsNodeInfoInner *node1 =
reinterpret_cast<const nsINodeInfo::nsNodeInfoInner *>(key1);
const nsINodeInfo::nsNodeInfoInner *node2 =
reinterpret_cast<const nsINodeInfo::nsNodeInfoInner *>(key2);
const nsNodeInfo::nsNodeInfoInner *node1 =
reinterpret_cast<const nsNodeInfo::nsNodeInfoInner *>(key1);
const nsNodeInfo::nsNodeInfoInner *node2 =
reinterpret_cast<const nsNodeInfo::nsNodeInfoInner *>(key2);
if (node1->mPrefix != node2->mPrefix ||
node1->mNamespaceID != node2->mNamespaceID ||
@ -213,7 +213,7 @@ nsNodeInfoManager::Init(nsIDocument *aDocument)
PRIntn
nsNodeInfoManager::DropNodeInfoDocument(PLHashEntry *he, PRIntn hashIndex, void *arg)
{
static_cast<nsINodeInfo*>(he->value)->mDocument = nsnull;
static_cast<nsNodeInfo*>(he->value)->mDocument = nsnull;
return HT_ENUMERATE_NEXT;
}
@ -232,20 +232,20 @@ nsNodeInfoManager::DropDocumentReference()
}
already_AddRefed<nsINodeInfo>
already_AddRefed<nsNodeInfo>
nsNodeInfoManager::GetNodeInfo(nsIAtom *aName, nsIAtom *aPrefix,
PRInt32 aNamespaceID, PRUint16 aNodeType,
nsIAtom* aExtraName /* = nsnull */)
{
CHECK_VALID_NODEINFO(aNodeType, aName, aNamespaceID, aExtraName);
nsINodeInfo::nsNodeInfoInner tmpKey(aName, aPrefix, aNamespaceID, aNodeType,
aExtraName);
nsNodeInfo::nsNodeInfoInner tmpKey(aName, aPrefix, aNamespaceID, aNodeType,
aExtraName);
void *node = PL_HashTableLookup(mNodeInfoHash, &tmpKey);
if (node) {
nsINodeInfo* nodeInfo = static_cast<nsINodeInfo *>(node);
nsNodeInfo* nodeInfo = static_cast<nsNodeInfo *>(node);
NS_ADDREF(nodeInfo);
@ -262,7 +262,7 @@ nsNodeInfoManager::GetNodeInfo(nsIAtom *aName, nsIAtom *aPrefix,
NS_ENSURE_TRUE(he, nsnull);
// Have to do the swap thing, because already_AddRefed<nsNodeInfo>
// doesn't cast to already_AddRefed<nsINodeInfo>
// doesn't cast to already_AddRefed<nsNodeInfo>
++mNonDocumentNodeInfos;
if (mNonDocumentNodeInfos == 1) {
NS_IF_ADDREF(mDocument);
@ -278,7 +278,7 @@ nsNodeInfoManager::GetNodeInfo(nsIAtom *aName, nsIAtom *aPrefix,
nsresult
nsNodeInfoManager::GetNodeInfo(const nsAString& aName, nsIAtom *aPrefix,
PRInt32 aNamespaceID, PRUint16 aNodeType,
nsINodeInfo** aNodeInfo)
nsNodeInfo** aNodeInfo)
{
#ifdef DEBUG
{
@ -287,12 +287,12 @@ nsNodeInfoManager::GetNodeInfo(const nsAString& aName, nsIAtom *aPrefix,
}
#endif
nsINodeInfo::nsNodeInfoInner tmpKey(aName, aPrefix, aNamespaceID, aNodeType);
nsNodeInfo::nsNodeInfoInner tmpKey(aName, aPrefix, aNamespaceID, aNodeType);
void *node = PL_HashTableLookup(mNodeInfoHash, &tmpKey);
if (node) {
nsINodeInfo* nodeInfo = static_cast<nsINodeInfo *>(node);
nsNodeInfo* nodeInfo = static_cast<nsNodeInfo *>(node);
NS_ADDREF(*aNodeInfo = nodeInfo);
@ -327,7 +327,7 @@ nsresult
nsNodeInfoManager::GetNodeInfo(const nsAString& aName, nsIAtom *aPrefix,
const nsAString& aNamespaceURI,
PRUint16 aNodeType,
nsINodeInfo** aNodeInfo)
nsNodeInfo** aNodeInfo)
{
PRInt32 nsid = kNameSpaceID_None;
@ -340,7 +340,7 @@ nsNodeInfoManager::GetNodeInfo(const nsAString& aName, nsIAtom *aPrefix,
return GetNodeInfo(aName, aPrefix, nsid, aNodeType, aNodeInfo);
}
already_AddRefed<nsINodeInfo>
already_AddRefed<nsNodeInfo>
nsNodeInfoManager::GetTextNodeInfo()
{
if (!mTextNodeInfo) {
@ -355,7 +355,7 @@ nsNodeInfoManager::GetTextNodeInfo()
return mTextNodeInfo;
}
already_AddRefed<nsINodeInfo>
already_AddRefed<nsNodeInfo>
nsNodeInfoManager::GetCommentNodeInfo()
{
if (!mCommentNodeInfo) {
@ -370,7 +370,7 @@ nsNodeInfoManager::GetCommentNodeInfo()
return mCommentNodeInfo;
}
already_AddRefed<nsINodeInfo>
already_AddRefed<nsNodeInfo>
nsNodeInfoManager::GetDocumentNodeInfo()
{
if (!mDocumentNodeInfo) {
@ -433,5 +433,5 @@ nsNodeInfoManager::RemoveNodeInfo(nsNodeInfo *aNodeInfo)
#endif
PL_HashTableRemove(mNodeInfoHash, &aNodeInfo->mInner);
NS_POSTCONDITION(ret, "Can't find nsINodeInfo to remove!!!");
NS_POSTCONDITION(ret, "Can't find nsNodeInfo to remove!!!");
}

Просмотреть файл

@ -48,7 +48,6 @@
class nsIAtom;
class nsIDocument;
class nsINodeInfo;
class nsNodeInfo;
class nsIPrincipal;
class nsIURI;
@ -84,31 +83,31 @@ public:
/**
* Methods for creating nodeinfo's from atoms and/or strings.
*/
already_AddRefed<nsINodeInfo> GetNodeInfo(nsIAtom *aName, nsIAtom *aPrefix,
PRInt32 aNamespaceID,
PRUint16 aNodeType,
nsIAtom* aExtraName = nsnull);
already_AddRefed<nsNodeInfo> GetNodeInfo(nsIAtom *aName, nsIAtom *aPrefix,
PRInt32 aNamespaceID,
PRUint16 aNodeType,
nsIAtom* aExtraName = nsnull);
nsresult GetNodeInfo(const nsAString& aName, nsIAtom *aPrefix,
PRInt32 aNamespaceID, PRUint16 aNodeType,
nsINodeInfo** aNodeInfo);
nsNodeInfo** aNodeInfo);
nsresult GetNodeInfo(const nsAString& aName, nsIAtom *aPrefix,
const nsAString& aNamespaceURI, PRUint16 aNodeType,
nsINodeInfo** aNodeInfo);
nsNodeInfo** aNodeInfo);
/**
* Returns the nodeinfo for text nodes. Can return null if OOM.
*/
already_AddRefed<nsINodeInfo> GetTextNodeInfo();
already_AddRefed<nsNodeInfo> GetTextNodeInfo();
/**
* Returns the nodeinfo for comment nodes. Can return null if OOM.
*/
already_AddRefed<nsINodeInfo> GetCommentNodeInfo();
already_AddRefed<nsNodeInfo> GetCommentNodeInfo();
/**
* Returns the nodeinfo for the document node. Can return null if OOM.
*/
already_AddRefed<nsINodeInfo> GetDocumentNodeInfo();
already_AddRefed<nsNodeInfo> GetDocumentNodeInfo();
/**
* Retrieve a pointer to the document that owns this node info
@ -162,9 +161,9 @@ private:
// while inlining DocumentPrincipal(). Never null
// after Init() succeeds.
nsCOMPtr<nsIPrincipal> mDefaultPrincipal; // Never null after Init() succeeds
nsINodeInfo *mTextNodeInfo; // WEAK to avoid circular ownership
nsINodeInfo *mCommentNodeInfo; // WEAK to avoid circular ownership
nsINodeInfo *mDocumentNodeInfo; // WEAK to avoid circular ownership
nsNodeInfo *mTextNodeInfo; // WEAK to avoid circular ownership
nsNodeInfo *mCommentNodeInfo; // WEAK to avoid circular ownership
nsNodeInfo *mDocumentNodeInfo; // WEAK to avoid circular ownership
nsBindingManager* mBindingManager; // STRONG, but not nsCOMPtr to avoid
// include hell while inlining
// GetBindingManager().

Просмотреть файл

@ -456,8 +456,8 @@ nsNodeUtils::CloneAndAdopt(nsINode *aNode, bool aClone, bool aDeep,
nsNodeInfoManager *nodeInfoManager = aNewNodeInfoManager;
// aNode.
nsINodeInfo *nodeInfo = aNode->mNodeInfo;
nsCOMPtr<nsINodeInfo> newNodeInfo;
nsNodeInfo *nodeInfo = aNode->mNodeInfo;
nsRefPtr<nsNodeInfo> newNodeInfo;
if (nodeInfoManager) {
// Don't allow importing/adopting nodes from non-privileged "scriptable"

Просмотреть файл

@ -62,7 +62,7 @@ class nsStyledElementNotElementCSSInlineStyle : public nsStyledElementBase
protected:
inline nsStyledElementNotElementCSSInlineStyle(already_AddRefed<nsINodeInfo> aNodeInfo)
inline nsStyledElementNotElementCSSInlineStyle(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsStyledElementBase(aNodeInfo)
{}
@ -112,7 +112,7 @@ protected:
class nsStyledElement : public nsStyledElementNotElementCSSInlineStyle {
protected:
inline nsStyledElement(already_AddRefed<nsINodeInfo> aNodeInfo)
inline nsStyledElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsStyledElementNotElementCSSInlineStyle(aNodeInfo)
{}
};

Просмотреть файл

@ -61,7 +61,7 @@ class nsAttributeTextNode : public nsTextNode,
public:
NS_DECL_ISUPPORTS_INHERITED
nsAttributeTextNode(already_AddRefed<nsINodeInfo> aNodeInfo,
nsAttributeTextNode(already_AddRefed<nsNodeInfo> aNodeInfo,
PRInt32 aNameSpaceID,
nsIAtom* aAttrName) :
nsTextNode(aNodeInfo),
@ -86,10 +86,10 @@ public:
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
virtual nsGenericDOMDataNode *CloneDataNode(nsINodeInfo *aNodeInfo,
virtual nsGenericDOMDataNode *CloneDataNode(nsNodeInfo *aNodeInfo,
bool aCloneText) const
{
nsCOMPtr<nsINodeInfo> ni = aNodeInfo;
nsRefPtr<nsNodeInfo> ni = aNodeInfo;
nsAttributeTextNode *it = new nsAttributeTextNode(ni.forget(),
mNameSpaceID,
mAttrName);
@ -127,7 +127,7 @@ NS_NewTextNode(nsIContent** aInstancePtrResult,
*aInstancePtrResult = nsnull;
nsCOMPtr<nsINodeInfo> ni = aNodeInfoManager->GetTextNodeInfo();
nsRefPtr<nsNodeInfo> ni = aNodeInfoManager->GetTextNodeInfo();
if (!ni) {
return NS_ERROR_OUT_OF_MEMORY;
}
@ -142,7 +142,7 @@ NS_NewTextNode(nsIContent** aInstancePtrResult,
return NS_OK;
}
nsTextNode::nsTextNode(already_AddRefed<nsINodeInfo> aNodeInfo)
nsTextNode::nsTextNode(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericDOMDataNode(aNodeInfo)
{
NS_ABORT_IF_FALSE(mNodeInfo->NodeType() == nsIDOMNode::TEXT_NODE,
@ -173,9 +173,9 @@ nsTextNode::IsNodeOfType(PRUint32 aFlags) const
}
nsGenericDOMDataNode*
nsTextNode::CloneDataNode(nsINodeInfo *aNodeInfo, bool aCloneText) const
nsTextNode::CloneDataNode(nsNodeInfo *aNodeInfo, bool aCloneText) const
{
nsCOMPtr<nsINodeInfo> ni = aNodeInfo;
nsRefPtr<nsNodeInfo> ni = aNodeInfo;
nsTextNode *it = new nsTextNode(ni.forget());
if (it && aCloneText) {
it->mText = mText;
@ -271,7 +271,7 @@ NS_NewAttributeContent(nsNodeInfoManager *aNodeInfoManager,
*aResult = nsnull;
nsCOMPtr<nsINodeInfo> ni = aNodeInfoManager->GetTextNodeInfo();
nsRefPtr<nsNodeInfo> ni = aNodeInfoManager->GetTextNodeInfo();
if (!ni) {
return NS_ERROR_OUT_OF_MEMORY;
}

Просмотреть файл

@ -53,7 +53,7 @@ class nsTextNode : public nsGenericDOMDataNode,
public nsIDOMText
{
public:
nsTextNode(already_AddRefed<nsINodeInfo> aNodeInfo);
nsTextNode(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsTextNode();
// nsISupports
@ -71,7 +71,7 @@ public:
// nsINode
virtual bool IsNodeOfType(PRUint32 aFlags) const;
virtual nsGenericDOMDataNode* CloneDataNode(nsINodeInfo *aNodeInfo,
virtual nsGenericDOMDataNode* CloneDataNode(nsNodeInfo *aNodeInfo,
bool aCloneText) const;
void BindToAttribute(nsIAttribute* aAttr);

Просмотреть файл

@ -1451,7 +1451,7 @@ nsTreeSanitizer::SanitizeChildren(nsINode* aRoot)
while (node) {
if (node->IsElement()) {
mozilla::dom::Element* elt = node->AsElement();
nsINodeInfo* nodeInfo = node->NodeInfo();
nsNodeInfo* nodeInfo = node->NodeInfo();
nsIAtom* localName = nodeInfo->NameAtom();
PRInt32 ns = nodeInfo->NamespaceID();

Просмотреть файл

@ -52,7 +52,6 @@
#include "nsIMEStateManager.h"
#include "nsContentEventHandler.h"
#include "nsIContent.h"
#include "nsINodeInfo.h"
#include "nsIDocument.h"
#include "nsIFrame.h"
#include "nsIWidget.h"

Просмотреть файл

@ -42,7 +42,7 @@
class nsXMLEventsElement : public nsXMLElement {
public:
nsXMLEventsElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsXMLEventsElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsXMLEventsElement();
NS_FORWARD_NSIDOMNODE(nsXMLElement::)
@ -50,10 +50,10 @@ public:
virtual nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsIAtom* aPrefix, const nsAString& aValue,
bool aNotify);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
};
nsXMLEventsElement::nsXMLEventsElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsXMLEventsElement::nsXMLEventsElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsXMLElement(aNodeInfo)
{
}
@ -86,7 +86,7 @@ NS_IMPL_ELEMENT_CLONE(nsXMLEventsElement)
nsresult
NS_NewXMLEventsElement(nsIContent** aInstancePtrResult,
already_AddRefed<nsINodeInfo> aNodeInfo)
already_AddRefed<nsNodeInfo> aNodeInfo)
{
nsXMLEventsElement* it = new nsXMLEventsElement(aNodeInfo);
if (!it) {

Просмотреть файл

@ -46,7 +46,6 @@
#include "nsIURL.h"
#include "nsIDOMEventListener.h"
#include "nsINameSpaceManager.h"
#include "nsINodeInfo.h"
#include "mozilla/dom/Element.h"
using namespace mozilla::dom;

Просмотреть файл

@ -50,7 +50,7 @@ class nsHTMLAudioElement : public nsHTMLMediaElement,
public nsIJSNativeInitializer
{
public:
nsHTMLAudioElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLAudioElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLAudioElement();
// nsISupports
@ -75,7 +75,7 @@ public:
NS_IMETHOD Initialize(nsISupports* aOwner, JSContext* aContext,
JSObject* aObj, PRUint32 argc, jsval* argv);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult SetAcceptHeader(nsIHttpChannel* aChannel);
virtual nsXPCClassInfo* GetClassInfo();

Просмотреть файл

@ -65,7 +65,7 @@ class nsHTMLCanvasElement : public nsGenericHTMLElement,
typedef mozilla::layers::LayerManager LayerManager;
public:
nsHTMLCanvasElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLCanvasElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLCanvasElement();
static nsHTMLCanvasElement* FromContent(nsIContent* aPossibleCanvas)
@ -162,7 +162,7 @@ public:
virtual nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsIAtom* aPrefix, const nsAString& aValue,
bool aNotify);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
nsresult CopyInnerTo(nsGenericElement* aDest) const;
/*

Просмотреть файл

@ -76,7 +76,7 @@ public:
return mCORSMode;
}
nsHTMLMediaElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLMediaElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLMediaElement();
/**

Просмотреть файл

@ -45,7 +45,7 @@ class nsHTMLVideoElement : public nsHTMLMediaElement,
public nsIDOMHTMLVideoElement
{
public:
nsHTMLVideoElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLVideoElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLVideoElement();
static nsHTMLVideoElement* FromContent(nsIContent* aPossibleVideo)
@ -81,7 +81,7 @@ public:
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
// Returns the current video frame width and height.
// If there is no video frame, returns the given default size.

Просмотреть файл

@ -129,7 +129,7 @@ using namespace mozilla::dom;
#include "nsThreadUtils.h"
class nsINodeInfo;
class nsNodeInfo;
class nsIDOMNodeList;
class nsRuleWalker;
@ -144,7 +144,7 @@ class nsRuleWalker;
static nsHashtable sGEUS_ElementCounts;
void GEUS_ElementCreated(nsINodeInfo *aNodeInfo)
void GEUS_ElementCreated(nsNodeInfo *aNodeInfo)
{
nsAutoString name;
aNodeInfo->GetName(name);
@ -178,7 +178,7 @@ void GEUS_DumpElementCounts()
}
nsresult
nsGenericHTMLElement::Init(nsINodeInfo *aNodeInfo)
nsGenericHTMLElement::Init(nsNodeInfo *aNodeInfo)
{
GEUS_ElementCreated(aNodeInfo);
@ -846,7 +846,7 @@ nsGenericHTMLElement::SetOuterHTML(const nsAString& aOuterHTML)
} else {
NS_ASSERTION(parent->NodeType() == nsIDOMNode::DOCUMENT_FRAGMENT_NODE,
"How come the parent isn't a document, a fragment or an element?");
nsCOMPtr<nsINodeInfo> info =
nsRefPtr<nsNodeInfo> info =
OwnerDoc()->NodeInfoManager()->GetNodeInfo(nsGkAtoms::body,
nsnull,
kNameSpaceID_XHTML,
@ -2558,7 +2558,7 @@ nsGenericHTMLElement::GetContextMenu(nsIDOMHTMLMenuElement** aContextMenu)
//----------------------------------------------------------------------
nsGenericHTMLFormElement::nsGenericHTMLFormElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsGenericHTMLFormElement::nsGenericHTMLFormElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
, mForm(nsnull)
, mFieldSet(nsnull)

Просмотреть файл

@ -74,7 +74,7 @@ typedef nsMappedAttributeElement nsGenericHTMLElementBase;
class nsGenericHTMLElement : public nsGenericHTMLElementBase
{
public:
nsGenericHTMLElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsGenericHTMLElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElementBase(aNodeInfo)
{
NS_ASSERTION(mNodeInfo->NamespaceID() == kNameSpaceID_XHTML,
@ -840,7 +840,7 @@ class nsGenericHTMLFormElement : public nsGenericHTMLElement,
public nsIFormControl
{
public:
nsGenericHTMLFormElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsGenericHTMLFormElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsGenericHTMLFormElement();
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
@ -1535,12 +1535,12 @@ PR_STATIC_ASSERT(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET + 1 < 32);
*/
#define NS_DECLARE_NS_NEW_HTML_ELEMENT(_elementName) \
nsGenericHTMLElement* \
NS_NewHTML##_elementName##Element(already_AddRefed<nsINodeInfo> aNodeInfo, \
NS_NewHTML##_elementName##Element(already_AddRefed<nsNodeInfo> aNodeInfo, \
mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
#define NS_DECLARE_NS_NEW_HTML_ELEMENT_AS_SHARED(_elementName) \
inline nsGenericHTMLElement* \
NS_NewHTML##_elementName##Element(already_AddRefed<nsINodeInfo> aNodeInfo, \
NS_NewHTML##_elementName##Element(already_AddRefed<nsNodeInfo> aNodeInfo, \
mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER) \
{ \
return NS_NewHTMLSharedElement(aNodeInfo, aFromParser); \
@ -1551,7 +1551,7 @@ NS_NewHTML##_elementName##Element(already_AddRefed<nsINodeInfo> aNodeInfo, \
*/
#define NS_IMPL_NS_NEW_HTML_ELEMENT(_elementName) \
nsGenericHTMLElement* \
NS_NewHTML##_elementName##Element(already_AddRefed<nsINodeInfo> aNodeInfo, \
NS_NewHTML##_elementName##Element(already_AddRefed<nsNodeInfo> aNodeInfo, \
mozilla::dom::FromParser aFromParser) \
{ \
return new nsHTML##_elementName##Element(aNodeInfo); \
@ -1559,7 +1559,7 @@ NS_NewHTML##_elementName##Element(already_AddRefed<nsINodeInfo> aNodeInfo, \
#define NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(_elementName) \
nsGenericHTMLElement* \
NS_NewHTML##_elementName##Element(already_AddRefed<nsINodeInfo> aNodeInfo, \
NS_NewHTML##_elementName##Element(already_AddRefed<nsNodeInfo> aNodeInfo, \
mozilla::dom::FromParser aFromParser) \
{ \
return new nsHTML##_elementName##Element(aNodeInfo, aFromParser); \
@ -1568,7 +1568,7 @@ NS_NewHTML##_elementName##Element(already_AddRefed<nsINodeInfo> aNodeInfo, \
// Here, we expand 'NS_DECLARE_NS_NEW_HTML_ELEMENT()' by hand.
// (Calling the macro directly (with no args) produces compiler warnings.)
nsGenericHTMLElement*
NS_NewHTMLElement(already_AddRefed<nsINodeInfo> aNodeInfo,
NS_NewHTMLElement(already_AddRefed<nsNodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
NS_DECLARE_NS_NEW_HTML_ELEMENT(Shared)

Просмотреть файл

@ -18,7 +18,7 @@ class nsGenericHTMLFrameElement : public nsGenericHTMLElement,
public nsIMozBrowserFrame
{
public:
nsGenericHTMLFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsGenericHTMLFrameElement(already_AddRefed<nsNodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser)
: nsGenericHTMLElement(aNodeInfo)
, mNetworkCreated(aFromParser == mozilla::dom::FROM_PARSER_NETWORK)

Просмотреть файл

@ -63,7 +63,7 @@ public:
using nsGenericElement::GetText;
using nsGenericElement::SetText;
nsHTMLAnchorElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLAnchorElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLAnchorElement();
// nsISupports
@ -132,7 +132,7 @@ public:
const nsAString& aValue,
nsAttrValue& aResult);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsEventStates IntrinsicState() const;
@ -155,7 +155,7 @@ PR_STATIC_ASSERT(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET+1 < 32);
NS_IMPL_NS_NEW_HTML_ELEMENT(Anchor)
nsHTMLAnchorElement::nsHTMLAnchorElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLAnchorElement::nsHTMLAnchorElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
, Link(this)
{

Просмотреть файл

@ -55,7 +55,7 @@ class nsHTMLAreaElement : public nsGenericHTMLElement,
public Link
{
public:
nsHTMLAreaElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLAreaElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLAreaElement();
// nsISupports
@ -120,7 +120,7 @@ public:
virtual nsresult UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
bool aNotify);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsEventStates IntrinsicState() const;
@ -131,7 +131,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(Area)
nsHTMLAreaElement::nsHTMLAreaElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLAreaElement::nsHTMLAreaElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo),
Link(this)
{

Просмотреть файл

@ -69,15 +69,15 @@
using namespace mozilla::dom;
nsGenericHTMLElement*
NS_NewHTMLAudioElement(already_AddRefed<nsINodeInfo> aNodeInfo,
NS_NewHTMLAudioElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser)
{
/*
* nsHTMLAudioElement's will be created without a nsINodeInfo passed in
* nsHTMLAudioElement's will be created without a nsNodeInfo passed in
* if someone says "var audio = new Audio();" in JavaScript, in a case like
* that we request the nsINodeInfo from the document's nodeinfo list.
* that we request the nsNodeInfo from the document's nodeinfo list.
*/
nsCOMPtr<nsINodeInfo> nodeInfo(aNodeInfo);
nsRefPtr<nsNodeInfo> nodeInfo(aNodeInfo);
if (!nodeInfo) {
nsCOMPtr<nsIDocument> doc =
do_QueryInterface(nsContentUtils::GetDocumentFromCaller());
@ -107,7 +107,7 @@ NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLAudioElement)
NS_IMPL_ELEMENT_CLONE(nsHTMLAudioElement)
nsHTMLAudioElement::nsHTMLAudioElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLAudioElement::nsHTMLAudioElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsHTMLMediaElement(aNodeInfo)
{
}

Просмотреть файл

@ -51,7 +51,7 @@ class nsHTMLBRElement : public nsGenericHTMLElement,
public nsIDOMHTMLBRElement
{
public:
nsHTMLBRElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLBRElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLBRElement();
// nsISupports
@ -75,7 +75,7 @@ public:
nsAttrValue& aResult);
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -83,7 +83,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(BR)
nsHTMLBRElement::nsHTMLBRElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLBRElement::nsHTMLBRElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -92,7 +92,7 @@ public:
using nsGenericElement::GetText;
using nsGenericElement::SetText;
nsHTMLBodyElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLBodyElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLBodyElement();
// nsISupports
@ -130,7 +130,7 @@ public:
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual already_AddRefed<nsIEditor> GetAssociatedEditor();
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
private:
nsresult GetColorHelper(nsIAtom* aAtom, nsAString& aColor);
@ -300,7 +300,7 @@ BodyRule::List(FILE* out, PRInt32 aIndent) const
NS_IMPL_NS_NEW_HTML_ELEMENT(Body)
nsHTMLBodyElement::nsHTMLBodyElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLBodyElement::nsHTMLBodyElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo),
mContentStyleRule(nsnull)
{

Просмотреть файл

@ -86,7 +86,7 @@ class nsHTMLButtonElement : public nsGenericHTMLFormElement,
public:
using nsIConstraintValidation::GetValidationMessage;
nsHTMLButtonElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsHTMLButtonElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser = NOT_FROM_PARSER);
virtual ~nsHTMLButtonElement();
@ -158,7 +158,7 @@ public:
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual void DoneCreatingElement();
virtual nsXPCClassInfo* GetClassInfo();
@ -181,7 +181,7 @@ private:
NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(Button)
nsHTMLButtonElement::nsHTMLButtonElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsHTMLButtonElement::nsHTMLButtonElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser)
: nsGenericHTMLFormElement(aNodeInfo),
mType(kButtonDefaultType->value),

Просмотреть файл

@ -69,13 +69,13 @@ using namespace mozilla::dom;
using namespace mozilla::layers;
nsGenericHTMLElement*
NS_NewHTMLCanvasElement(already_AddRefed<nsINodeInfo> aNodeInfo,
NS_NewHTMLCanvasElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser)
{
return new nsHTMLCanvasElement(aNodeInfo);
}
nsHTMLCanvasElement::nsHTMLCanvasElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLCanvasElement::nsHTMLCanvasElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo), mWriteOnly(false)
{
}

Просмотреть файл

@ -46,7 +46,7 @@ class nsHTMLDataListElement : public nsGenericHTMLElement,
public nsIDOMHTMLDataListElement
{
public:
nsHTMLDataListElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLDataListElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLDataListElement();
// nsISupports
@ -64,7 +64,7 @@ public:
// nsIDOMHTMLDataListElement
NS_DECL_NSIDOMHTMLDATALISTELEMENT
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
// This function is used to generate the nsContentList (option elements).
static bool MatchOptions(nsIContent* aContent, PRInt32 aNamespaceID,
@ -85,7 +85,7 @@ protected:
NS_IMPL_NS_NEW_HTML_ELEMENT(DataList)
nsHTMLDataListElement::nsHTMLDataListElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLDataListElement::nsHTMLDataListElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -50,7 +50,7 @@ class nsHTMLDivElement : public nsGenericHTMLElement,
public nsIDOMHTMLDivElement
{
public:
nsHTMLDivElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLDivElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLDivElement();
// nsISupports
@ -74,7 +74,7 @@ public:
nsAttrValue& aResult);
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -83,7 +83,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(Div)
nsHTMLDivElement::nsHTMLDivElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLDivElement::nsHTMLDivElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -46,7 +46,7 @@ class nsHTMLElement : public nsGenericHTMLElement,
public nsIDOMHTMLElement
{
public:
nsHTMLElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLElement();
// nsISupports
@ -80,7 +80,7 @@ public:
return nsGenericHTMLElement::SetInnerHTML(aInnerHTML);
}
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const;
nsresult Clone(nsNodeInfo* aNodeInfo, nsINode** aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -88,13 +88,13 @@ public:
// Here, we expand 'NS_IMPL_NS_NEW_HTML_ELEMENT()' by hand.
// (Calling the macro directly (with no args) produces compiler warnings.)
nsGenericHTMLElement*
NS_NewHTMLElement(already_AddRefed<nsINodeInfo> aNodeInfo,
NS_NewHTMLElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser)
{
return new nsHTMLElement(aNodeInfo);
}
nsHTMLElement::nsHTMLElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLElement::nsHTMLElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -48,7 +48,7 @@
NS_IMPL_NS_NEW_HTML_ELEMENT(FieldSet)
nsHTMLFieldSetElement::nsHTMLFieldSetElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLFieldSetElement::nsHTMLFieldSetElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLFormElement(aNodeInfo)
, mElements(nsnull)
, mFirstLegend(nsnull)

Просмотреть файл

@ -50,7 +50,7 @@ class nsHTMLFieldSetElement : public nsGenericHTMLFormElement,
public:
using nsIConstraintValidation::GetValidationMessage;
nsHTMLFieldSetElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLFieldSetElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLFieldSetElement();
/** Typesafe, non-refcounting cast from nsIContent. Cheaper than QI. **/
@ -90,7 +90,7 @@ public:
NS_IMETHOD_(PRUint32) GetType() const { return NS_FORM_FIELDSET; }
NS_IMETHOD Reset();
NS_IMETHOD SubmitNamesValues(nsFormSubmission* aFormSubmission);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
const nsIContent* GetFirstLegend() const { return mFirstLegend; }

Просмотреть файл

@ -55,7 +55,7 @@ class nsHTMLFontElement : public nsGenericHTMLElement,
public nsIDOMHTMLFontElement
{
public:
nsHTMLFontElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLFontElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLFontElement();
// nsISupports
@ -79,7 +79,7 @@ public:
nsAttrValue& aResult);
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -87,7 +87,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(Font)
nsHTMLFontElement::nsHTMLFontElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLFontElement::nsHTMLFontElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -232,7 +232,7 @@ ShouldBeInElements(nsIFormControl* aFormControl)
// construction, destruction
nsGenericHTMLElement*
NS_NewHTMLFormElement(already_AddRefed<nsINodeInfo> aNodeInfo,
NS_NewHTMLFormElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser)
{
nsHTMLFormElement* it = new nsHTMLFormElement(aNodeInfo);
@ -247,7 +247,7 @@ NS_NewHTMLFormElement(already_AddRefed<nsINodeInfo> aNodeInfo,
return it;
}
nsHTMLFormElement::nsHTMLFormElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLFormElement::nsHTMLFormElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo),
mGeneratingSubmit(false),
mGeneratingReset(false),

Просмотреть файл

@ -63,7 +63,7 @@ class nsHTMLFormElement : public nsGenericHTMLElement,
public nsIRadioGroupContainer
{
public:
nsHTMLFormElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLFormElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLFormElement();
nsresult Init();
@ -150,7 +150,7 @@ public:
*/
void ForgetCurrentSubmission();
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(nsHTMLFormElement,
nsGenericHTMLElement)

Просмотреть файл

@ -51,7 +51,7 @@ class nsHTMLFrameElement : public nsGenericHTMLFrameElement,
public nsIDOMHTMLFrameElement
{
public:
nsHTMLFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsHTMLFrameElement(already_AddRefed<nsNodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
virtual ~nsHTMLFrameElement();
@ -77,7 +77,7 @@ public:
nsAttrValue& aResult);
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -85,7 +85,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(Frame)
nsHTMLFrameElement::nsHTMLFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsHTMLFrameElement::nsHTMLFrameElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser)
: nsGenericHTMLFrameElement(aNodeInfo, aFromParser)
{

Просмотреть файл

@ -41,7 +41,7 @@
NS_IMPL_NS_NEW_HTML_ELEMENT(FrameSet)
nsHTMLFrameSetElement::nsHTMLFrameSetElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLFrameSetElement::nsHTMLFrameSetElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo), mNumRows(0), mNumCols(0),
mCurrentRowColHint(NS_STYLE_HINT_REFLOW)
{

Просмотреть файл

@ -80,7 +80,7 @@ class nsHTMLFrameSetElement : public nsGenericHTMLElement,
public nsIDOMHTMLFrameSetElement
{
public:
nsHTMLFrameSetElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLFrameSetElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLFrameSetElement();
// nsISupports
@ -144,7 +144,7 @@ public:
virtual nsChangeHint GetAttributeChangeHint(const nsIAtom* aAttribute,
PRInt32 aModType) const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
static nsHTMLFrameSetElement* FromContent(nsIContent *aContent)
{

Просмотреть файл

@ -54,7 +54,7 @@ class nsHTMLHRElement : public nsGenericHTMLElement,
public nsIDOMHTMLHRElement
{
public:
nsHTMLHRElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLHRElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLHRElement();
// nsISupports
@ -78,7 +78,7 @@ public:
nsAttrValue& aResult);
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -86,7 +86,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(HR)
nsHTMLHRElement::nsHTMLHRElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLHRElement::nsHTMLHRElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -52,7 +52,7 @@ class nsHTMLHeadingElement : public nsGenericHTMLElement,
public nsIDOMHTMLHeadingElement
{
public:
nsHTMLHeadingElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLHeadingElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLHeadingElement();
// nsISupports
@ -76,7 +76,7 @@ public:
nsAttrValue& aResult);
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -84,7 +84,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(Heading)
nsHTMLHeadingElement::nsHTMLHeadingElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLHeadingElement::nsHTMLHeadingElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -57,7 +57,7 @@ class nsHTMLIFrameElement : public nsGenericHTMLFrameElement
, public nsIDOMGetSVGDocument
{
public:
nsHTMLIFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsHTMLIFrameElement(already_AddRefed<nsNodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
virtual ~nsHTMLIFrameElement();
@ -87,7 +87,7 @@ public:
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -95,7 +95,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(IFrame)
nsHTMLIFrameElement::nsHTMLIFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsHTMLIFrameElement::nsHTMLIFrameElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser)
: nsGenericHTMLFrameElement(aNodeInfo, aFromParser)
{

Просмотреть файл

@ -88,7 +88,7 @@ class nsHTMLImageElement : public nsGenericHTMLElement,
public nsIJSNativeInitializer
{
public:
nsHTMLImageElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLImageElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLImageElement();
// nsISupports
@ -164,7 +164,7 @@ public:
bool aCompileEventHandlers);
virtual nsEventStates IntrinsicState() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
nsresult CopyInnerTo(nsGenericElement* aDest) const;
@ -175,15 +175,15 @@ protected:
};
nsGenericHTMLElement*
NS_NewHTMLImageElement(already_AddRefed<nsINodeInfo> aNodeInfo,
NS_NewHTMLImageElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser)
{
/*
* nsHTMLImageElement's will be created without a nsINodeInfo passed in
* nsHTMLImageElement's will be created without a nsNodeInfo passed in
* if someone says "var img = new Image();" in JavaScript, in a case like
* that we request the nsINodeInfo from the document's nodeinfo list.
* that we request the nsNodeInfo from the document's nodeinfo list.
*/
nsCOMPtr<nsINodeInfo> nodeInfo(aNodeInfo);
nsRefPtr<nsNodeInfo> nodeInfo(aNodeInfo);
if (!nodeInfo) {
nsCOMPtr<nsIDocument> doc =
do_QueryInterface(nsContentUtils::GetDocumentFromCaller());
@ -198,7 +198,7 @@ NS_NewHTMLImageElement(already_AddRefed<nsINodeInfo> aNodeInfo,
return new nsHTMLImageElement(nodeInfo.forget());
}
nsHTMLImageElement::nsHTMLImageElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLImageElement::nsHTMLImageElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
// We start out broken

Просмотреть файл

@ -551,7 +551,7 @@ static nsresult FireEventForAccessibility(nsIDOMHTMLInputElement* aTarget,
NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(Input)
nsHTMLInputElement::nsHTMLInputElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsHTMLInputElement::nsHTMLInputElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser)
: nsGenericHTMLFormElement(aNodeInfo)
, mType(kInputDefaultType->value)
@ -671,11 +671,11 @@ NS_IMPL_NSICONSTRAINTVALIDATION_EXCEPT_SETCUSTOMVALIDITY(nsHTMLInputElement)
// nsIDOMNode
nsresult
nsHTMLInputElement::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
nsHTMLInputElement::Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const
{
*aResult = nsnull;
nsCOMPtr<nsINodeInfo> ni = aNodeInfo;
nsRefPtr<nsNodeInfo> ni = aNodeInfo;
nsRefPtr<nsHTMLInputElement> it =
new nsHTMLInputElement(ni.forget(), NOT_FROM_PARSER);

Просмотреть файл

@ -92,7 +92,7 @@ class nsHTMLInputElement : public nsGenericHTMLFormElement,
public:
using nsIConstraintValidation::GetValidationMessage;
nsHTMLInputElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsHTMLInputElement(already_AddRefed<nsNodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser);
virtual ~nsHTMLInputElement();
@ -219,7 +219,7 @@ public:
*/
already_AddRefed<nsIDOMHTMLInputElement> GetSelectedRadioButton();
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
NS_IMETHOD FireAsyncClickHandler();

Просмотреть файл

@ -51,7 +51,7 @@ class nsHTMLLIElement : public nsGenericHTMLElement,
public nsIDOMHTMLLIElement
{
public:
nsHTMLLIElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLLIElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLLIElement();
// nsISupports
@ -75,7 +75,7 @@ public:
nsAttrValue& aResult);
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -83,7 +83,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(LI)
nsHTMLLIElement::nsHTMLLIElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLLIElement::nsHTMLLIElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -61,7 +61,7 @@ using namespace mozilla::dom;
NS_IMPL_NS_NEW_HTML_ELEMENT(Label)
nsHTMLLabelElement::nsHTMLLabelElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLLabelElement::nsHTMLLabelElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLFormElement(aNodeInfo)
, mHandlingEvent(false)
{

Просмотреть файл

@ -48,7 +48,7 @@ class nsHTMLLabelElement : public nsGenericHTMLFormElement,
public nsIDOMHTMLLabelElement
{
public:
nsHTMLLabelElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLLabelElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLLabelElement();
static nsHTMLLabelElement* FromContent(nsIContent* aPossibleLabel)
@ -122,7 +122,7 @@ public:
bool aNotify);
virtual void PerformAccesskey(bool aKeyCausesActivation,
bool aIsTrustedEvent);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();

Просмотреть файл

@ -50,7 +50,7 @@
NS_IMPL_NS_NEW_HTML_ELEMENT(Legend)
nsHTMLLegendElement::nsHTMLLegendElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLLegendElement::nsHTMLLegendElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -45,7 +45,7 @@ class nsHTMLLegendElement : public nsGenericHTMLElement,
public nsIDOMHTMLLegendElement
{
public:
nsHTMLLegendElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLLegendElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLLegendElement();
static nsHTMLLegendElement* FromContent(nsIContent *aContent)
@ -116,7 +116,7 @@ public:
virtual nsresult UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
bool aNotify);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
mozilla::dom::Element *GetFormElement()
{

Просмотреть файл

@ -66,7 +66,7 @@ class nsHTMLLinkElement : public nsGenericHTMLElement,
public Link
{
public:
nsHTMLLinkElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLLinkElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLLinkElement();
// nsISupports
@ -115,7 +115,7 @@ public:
virtual nsLinkState GetLinkState() const;
virtual already_AddRefed<nsIURI> GetHrefURI() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsEventStates IntrinsicState() const;
@ -132,7 +132,7 @@ protected:
NS_IMPL_NS_NEW_HTML_ELEMENT(Link)
nsHTMLLinkElement::nsHTMLLinkElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLLinkElement::nsHTMLLinkElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo),
Link(this)
{

Просмотреть файл

@ -49,7 +49,7 @@ class nsHTMLMapElement : public nsGenericHTMLElement,
public nsIDOMHTMLMapElement
{
public:
nsHTMLMapElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLMapElement(already_AddRefed<nsNodeInfo> aNodeInfo);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
@ -66,7 +66,7 @@ public:
// nsIDOMHTMLMapElement
NS_DECL_NSIDOMHTMLMAPELEMENT
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(nsHTMLMapElement,
nsGenericHTMLElement)
@ -80,7 +80,7 @@ protected:
NS_IMPL_NS_NEW_HTML_ELEMENT(Map)
nsHTMLMapElement::nsHTMLMapElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLMapElement::nsHTMLMapElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -1420,7 +1420,7 @@ nsHTMLMediaElement::LookupMediaElementURITable(nsIURI* aURI)
return nsnull;
}
nsHTMLMediaElement::nsHTMLMediaElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLMediaElement::nsHTMLMediaElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo),
mCurrentLoadID(0),
mNetworkState(nsIDOMHTMLMediaElement::NETWORK_EMPTY),

Просмотреть файл

@ -70,7 +70,7 @@ enum SeparatorType
NS_IMPL_NS_NEW_HTML_ELEMENT(Menu)
nsHTMLMenuElement::nsHTMLMenuElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLMenuElement::nsHTMLMenuElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo), mType(MENU_TYPE_LIST)
{
}

Просмотреть файл

@ -43,7 +43,7 @@ class nsHTMLMenuElement : public nsGenericHTMLElement,
public nsIHTMLMenu
{
public:
nsHTMLMenuElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLMenuElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLMenuElement();
/** Typesafe, non-refcounting cast from nsIContent. Cheaper than QI. **/
@ -77,7 +77,7 @@ public:
const nsAString& aValue,
nsAttrValue& aResult);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();

Просмотреть файл

@ -182,7 +182,7 @@ protected:
NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(MenuItem)
nsHTMLMenuItemElement::nsHTMLMenuItemElement(
already_AddRefed<nsINodeInfo> aNodeInfo, FromParser aFromParser)
already_AddRefed<nsNodeInfo> aNodeInfo, FromParser aFromParser)
: nsGenericHTMLElement(aNodeInfo),
mType(kMenuItemDefaultType->value),
mParserCreating(false),
@ -215,10 +215,10 @@ NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLMenuItemElement)
//NS_IMPL_ELEMENT_CLONE(nsHTMLMenuItemElement)
nsresult
nsHTMLMenuItemElement::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
nsHTMLMenuItemElement::Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const
{
*aResult = nsnull;
nsCOMPtr<nsINodeInfo> ni = aNodeInfo;
nsRefPtr<nsNodeInfo> ni = aNodeInfo;
nsRefPtr<nsHTMLMenuItemElement> it =
new nsHTMLMenuItemElement(ni.forget(), NOT_FROM_PARSER);
nsresult rv = CopyInnerTo(it);

Просмотреть файл

@ -45,7 +45,7 @@ class nsHTMLMenuItemElement : public nsGenericHTMLElement,
public:
using nsGenericElement::GetText;
nsHTMLMenuItemElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsHTMLMenuItemElement(already_AddRefed<nsNodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser);
virtual ~nsHTMLMenuItemElement();
@ -90,7 +90,7 @@ public:
virtual void DoneCreatingElement();
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();

Просмотреть файл

@ -47,7 +47,7 @@ class nsHTMLMetaElement : public nsGenericHTMLElement,
public nsIDOMHTMLMetaElement
{
public:
nsHTMLMetaElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLMetaElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLMetaElement();
// nsISupports
@ -72,7 +72,7 @@ public:
bool aNullParent = true);
void CreateAndDispatchEvent(nsIDocument* aDoc, const nsAString& aEventName);
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -81,7 +81,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(Meta)
nsHTMLMetaElement::nsHTMLMetaElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLMetaElement::nsHTMLMetaElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -46,7 +46,7 @@ class nsHTMLModElement : public nsGenericHTMLElement,
public nsIDOMHTMLModElement
{
public:
nsHTMLModElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLModElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLModElement();
// nsISupports
@ -64,7 +64,7 @@ public:
// nsIDOMHTMLModElement
NS_DECL_NSIDOMHTMLMODELEMENT
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -72,7 +72,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(Mod)
nsHTMLModElement::nsHTMLModElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLModElement::nsHTMLModElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -55,7 +55,7 @@ class nsHTMLSharedListElement : public nsGenericHTMLElement,
public nsIDOMHTMLUListElement
{
public:
nsHTMLSharedListElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLSharedListElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLSharedListElement();
// nsISupports
@ -85,7 +85,7 @@ public:
nsAttrValue& aResult);
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo()
{
return static_cast<nsXPCClassInfo*>(GetClassInfoInternal());
@ -97,7 +97,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(SharedList)
nsHTMLSharedListElement::nsHTMLSharedListElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLSharedListElement::nsHTMLSharedListElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -66,7 +66,7 @@ class nsHTMLObjectElement : public nsGenericHTMLFormElement
public:
using nsIConstraintValidation::GetValidationMessage;
nsHTMLObjectElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsHTMLObjectElement(already_AddRefed<nsNodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
virtual ~nsHTMLObjectElement();
@ -145,7 +145,7 @@ public:
// nsObjectLoadingContent
virtual PRUint32 GetCapabilities() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
nsresult CopyInnerTo(nsGenericElement* aDest) const;
@ -174,7 +174,7 @@ private:
NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(Object)
nsHTMLObjectElement::nsHTMLObjectElement(already_AddRefed<nsINodeInfo> aNodeInfo,
nsHTMLObjectElement::nsHTMLObjectElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser)
: nsGenericHTMLFormElement(aNodeInfo),
mIsDoneAddingChildren(!aFromParser)

Просмотреть файл

@ -54,7 +54,7 @@ class nsHTMLOptGroupElement : public nsGenericHTMLElement,
public nsIDOMHTMLOptGroupElement
{
public:
nsHTMLOptGroupElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLOptGroupElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLOptGroupElement();
// nsISupports
@ -82,7 +82,7 @@ public:
virtual nsEventStates IntrinsicState() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
@ -102,7 +102,7 @@ protected:
NS_IMPL_NS_NEW_HTML_ELEMENT(OptGroup)
nsHTMLOptGroupElement::nsHTMLOptGroupElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLOptGroupElement::nsHTMLOptGroupElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
// We start off enabled

Просмотреть файл

@ -70,15 +70,15 @@ using namespace mozilla::dom;
*/
nsGenericHTMLElement*
NS_NewHTMLOptionElement(already_AddRefed<nsINodeInfo> aNodeInfo,
NS_NewHTMLOptionElement(already_AddRefed<nsNodeInfo> aNodeInfo,
FromParser aFromParser)
{
/*
* nsHTMLOptionElement's will be created without a nsINodeInfo passed in
* nsHTMLOptionElement's will be created without a nsNodeInfo passed in
* if someone says "var opt = new Option();" in JavaScript, in a case like
* that we request the nsINodeInfo from the document's nodeinfo list.
* that we request the nsNodeInfo from the document's nodeinfo list.
*/
nsCOMPtr<nsINodeInfo> nodeInfo(aNodeInfo);
nsRefPtr<nsNodeInfo> nodeInfo(aNodeInfo);
if (!nodeInfo) {
nsCOMPtr<nsIDocument> doc =
do_QueryInterface(nsContentUtils::GetDocumentFromCaller());
@ -93,7 +93,7 @@ NS_NewHTMLOptionElement(already_AddRefed<nsINodeInfo> aNodeInfo,
return new nsHTMLOptionElement(nodeInfo.forget());
}
nsHTMLOptionElement::nsHTMLOptionElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLOptionElement::nsHTMLOptionElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo),
mSelectedChanged(false),
mIsSelected(false),

Просмотреть файл

@ -52,7 +52,7 @@ class nsHTMLOptionElement : public nsGenericHTMLElement,
public nsIJSNativeInitializer
{
public:
nsHTMLOptionElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLOptionElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLOptionElement();
/** Typesafe, non-refcounting cast from nsIContent. Cheaper than QI. **/
@ -99,7 +99,7 @@ public:
// nsIContent
virtual nsEventStates IntrinsicState() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
nsresult CopyInnerTo(nsGenericElement* aDest) const;

Просмотреть файл

@ -54,7 +54,7 @@ class nsHTMLOutputElement : public nsGenericHTMLFormElement,
public:
using nsIConstraintValidation::GetValidationMessage;
nsHTMLOutputElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLOutputElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLOutputElement();
// nsISupports
@ -79,7 +79,7 @@ public:
virtual bool IsDisabled() const { return false; }
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const;
nsresult Clone(nsNodeInfo* aNodeInfo, nsINode** aResult) const;
bool ParseAttribute(PRInt32 aNamespaceID, nsIAtom* aAttribute,
const nsAString& aValue, nsAttrValue& aResult);
@ -119,7 +119,7 @@ protected:
NS_IMPL_NS_NEW_HTML_ELEMENT(Output)
nsHTMLOutputElement::nsHTMLOutputElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLOutputElement::nsHTMLOutputElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLFormElement(aNodeInfo)
, mValueModeFlag(eModeDefault)
{

Просмотреть файл

@ -53,7 +53,7 @@ class nsHTMLParagraphElement : public nsGenericHTMLElement,
public nsIDOMHTMLParagraphElement
{
public:
nsHTMLParagraphElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLParagraphElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLParagraphElement();
// nsISupports
@ -78,7 +78,7 @@ public:
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -87,7 +87,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(Paragraph)
nsHTMLParagraphElement::nsHTMLParagraphElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLParagraphElement::nsHTMLParagraphElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -51,7 +51,7 @@ class nsHTMLPreElement : public nsGenericHTMLElement,
public nsIDOMHTMLPreElement
{
public:
nsHTMLPreElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLPreElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLPreElement();
// nsISupports
@ -77,7 +77,7 @@ public:
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsresult Clone(nsNodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
};
@ -86,7 +86,7 @@ public:
NS_IMPL_NS_NEW_HTML_ELEMENT(Pre)
nsHTMLPreElement::nsHTMLPreElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLPreElement::nsHTMLPreElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
}

Просмотреть файл

@ -45,7 +45,7 @@ class nsHTMLProgressElement : public nsGenericHTMLFormElement,
public nsIDOMHTMLProgressElement
{
public:
nsHTMLProgressElement(already_AddRefed<nsINodeInfo> aNodeInfo);
nsHTMLProgressElement(already_AddRefed<nsNodeInfo> aNodeInfo);
virtual ~nsHTMLProgressElement();
// nsISupports
@ -70,7 +70,7 @@ public:
nsEventStates IntrinsicState() const;
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const;
nsresult Clone(nsNodeInfo* aNodeInfo, nsINode** aResult) const;
bool ParseAttribute(PRInt32 aNamespaceID, nsIAtom* aAttribute,
const nsAString& aValue, nsAttrValue& aResult);
@ -99,7 +99,7 @@ const double nsHTMLProgressElement::kDefaultMax = 1.0;
NS_IMPL_NS_NEW_HTML_ELEMENT(Progress)
nsHTMLProgressElement::nsHTMLProgressElement(already_AddRefed<nsINodeInfo> aNodeInfo)
nsHTMLProgressElement::nsHTMLProgressElement(already_AddRefed<nsNodeInfo> aNodeInfo)
: nsGenericHTMLFormElement(aNodeInfo)
{
// We start out indeterminate

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше