зеркало из https://github.com/mozilla/gecko-dev.git
Added Get/Set methods to content IDs. An ID is used as a key to store state information about a content object and its associated frame object. The state information is stored in a dictionary that is manipulated by the frame manager (nsIFrameManager) inside layout. An opaque pointer to this dictionary is passed to the session history as a handle associated with the current document's state.
This commit is contained in:
Родитель
cabd43268a
Коммит
a3d25a6149
|
@ -229,6 +229,19 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus) = 0;
|
||||
|
||||
/**
|
||||
* Get and set a unique ID for this piece of content.
|
||||
* This ID is used as a key to store state information
|
||||
* about this content object and its associated frame object.
|
||||
* The state information is stored in a dictionary that is
|
||||
* manipulated by the frame manager (nsIFrameManager) inside layout.
|
||||
* An opaque pointer to this dictionary is passed to the session
|
||||
* history as a handle associated with the current document's state
|
||||
*/
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) = 0;
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) = 0;
|
||||
|
||||
};
|
||||
|
||||
// nsresult codes for GetAttribute
|
||||
|
|
|
@ -151,6 +151,16 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = mContentID;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
mContentID = aID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange){
|
||||
return mInner.RangeAdd(aRange);
|
||||
}
|
||||
|
@ -181,6 +191,7 @@ public:
|
|||
|
||||
protected:
|
||||
nsGenericDOMDataNode mInner;
|
||||
PRUint32 mContentID;
|
||||
};
|
||||
|
||||
nsresult NS_NewCommentNode(nsIContent** aInstancePtrResult);
|
||||
|
@ -202,6 +213,7 @@ nsCommentNode::nsCommentNode()
|
|||
{
|
||||
NS_INIT_REFCNT();
|
||||
mInner.Init(this);
|
||||
mContentID = 0;
|
||||
}
|
||||
|
||||
nsCommentNode::~nsCommentNode()
|
||||
|
|
|
@ -185,6 +185,16 @@ public:
|
|||
aEventStatus = nsEventStatus_eIgnore;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange)
|
||||
{ return mInner.RangeAdd(aRange); }
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange)
|
||||
|
|
|
@ -465,6 +465,8 @@ struct nsGenericDOMDataNode {
|
|||
nsIDOMEvent** aDOMEvent, \
|
||||
PRUint32 aFlags, \
|
||||
nsEventStatus& aEventStatus); \
|
||||
NS_IMETHOD GetContentID(PRUint32* aID); \
|
||||
NS_IMETHOD SetContentID(PRUint32 aID); \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange){ \
|
||||
return _g.RangeAdd(aRange); \
|
||||
} \
|
||||
|
|
|
@ -173,6 +173,7 @@ nsGenericElement::nsGenericElement()
|
|||
mContent = nsnull;
|
||||
mDOMSlots = nsnull;
|
||||
mListenerManager = nsnull;
|
||||
mContentID = 0;
|
||||
}
|
||||
|
||||
nsGenericElement::~nsGenericElement()
|
||||
|
|
|
@ -150,6 +150,16 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = mContentID;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
mContentID = aID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult RangeAdd(nsIDOMRange& aRange);
|
||||
nsresult RangeRemove(nsIDOMRange& aRange);
|
||||
nsresult GetRangeList(nsVoidArray*& aResult) const;
|
||||
|
@ -210,6 +220,7 @@ public:
|
|||
nsIAtom* mTag;
|
||||
nsIEventListenerManager* mListenerManager;
|
||||
nsDOMSlots *mDOMSlots;
|
||||
PRUint32 mContentID;
|
||||
};
|
||||
|
||||
class nsGenericContainerElement : public nsGenericElement {
|
||||
|
@ -501,6 +512,12 @@ public:
|
|||
nsIDOMEvent** aDOMEvent, \
|
||||
PRUint32 aFlags, \
|
||||
nsEventStatus& aEventStatus); \
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) { \
|
||||
return _g.GetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) { \
|
||||
return _g.SetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) { \
|
||||
return _g.RangeAdd(aRange); \
|
||||
} \
|
||||
|
@ -603,6 +620,12 @@ public:
|
|||
nsIDOMEvent** aDOMEvent, \
|
||||
PRUint32 aFlags, \
|
||||
nsEventStatus& aEventStatus); \
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) { \
|
||||
return _g.GetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) { \
|
||||
return _g.SetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) { \
|
||||
return _g.RangeAdd(aRange); \
|
||||
} \
|
||||
|
@ -705,6 +728,12 @@ public:
|
|||
nsIDOMEvent** aDOMEvent, \
|
||||
PRUint32 aFlags, \
|
||||
nsEventStatus& aEventStatus); \
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) { \
|
||||
return _g.GetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) { \
|
||||
return _g.SetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) { \
|
||||
return _g.RangeAdd(aRange); \
|
||||
} \
|
||||
|
@ -805,6 +834,12 @@ public:
|
|||
nsIDOMEvent** aDOMEvent, \
|
||||
PRUint32 aFlags, \
|
||||
nsEventStatus& aEventStatus); \
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) { \
|
||||
return _g.GetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) { \
|
||||
return _g.SetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) { \
|
||||
return _g.RangeAdd(aRange); \
|
||||
} \
|
||||
|
|
|
@ -67,6 +67,7 @@ public:
|
|||
|
||||
protected:
|
||||
nsGenericDOMDataNode mInner;
|
||||
PRUint32 mContentID;
|
||||
};
|
||||
|
||||
nsresult NS_NewTextNode(nsIContent** aInstancePtrResult);
|
||||
|
@ -89,6 +90,7 @@ nsTextNode::nsTextNode()
|
|||
{
|
||||
NS_INIT_REFCNT();
|
||||
mInner.Init(this);
|
||||
mContentID = 0;
|
||||
}
|
||||
|
||||
nsTextNode::~nsTextNode()
|
||||
|
@ -197,3 +199,17 @@ nsTextNode::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
return mInner.HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
|
||||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextNode::GetContentID(PRUint32* aID)
|
||||
{
|
||||
*aID = mContentID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextNode::SetContentID(PRUint32 aID)
|
||||
{
|
||||
mContentID = aID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -136,6 +136,16 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange);
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange);
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const;
|
||||
|
|
|
@ -158,6 +158,14 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
return mInner.GetContentID(aID);
|
||||
}
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
return mInner.SetContentID(aID);
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) {
|
||||
return mInner.RangeAdd(aRange);
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ public:
|
|||
|
||||
protected:
|
||||
nsGenericDOMDataNode mInner;
|
||||
PRUint32 mContentID;
|
||||
};
|
||||
|
||||
nsresult
|
||||
|
@ -89,6 +90,7 @@ nsXMLCDATASection::nsXMLCDATASection()
|
|||
{
|
||||
NS_INIT_REFCNT();
|
||||
mInner.Init(this);
|
||||
mContentID = 0;
|
||||
}
|
||||
|
||||
nsXMLCDATASection::~nsXMLCDATASection()
|
||||
|
@ -203,3 +205,17 @@ nsXMLCDATASection::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
return mInner.HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
|
||||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLCDATASection::GetContentID(PRUint32* aID)
|
||||
{
|
||||
*aID = mContentID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLCDATASection::SetContentID(PRUint32 aID)
|
||||
{
|
||||
mContentID = aID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ nsXMLElement::nsXMLElement(nsIAtom *aTag)
|
|||
NS_INIT_REFCNT();
|
||||
mInner.Init((nsIContent *)(nsIXMLContent *)this, aTag);
|
||||
mIsLink = PR_FALSE;
|
||||
mContentID = 0;
|
||||
|
||||
if (0 == kElementCount++) {
|
||||
kLinkAtom = NS_NewAtom("link");
|
||||
|
|
|
@ -145,6 +145,16 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = mContentID;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
mContentID = aID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) {
|
||||
return mInner.RangeAdd(aRange);
|
||||
}
|
||||
|
@ -204,6 +214,7 @@ public:
|
|||
protected:
|
||||
nsGenericXMLElement mInner;
|
||||
PRBool mIsLink;
|
||||
PRUint32 mContentID;
|
||||
};
|
||||
|
||||
#endif // nsXMLElement_h___
|
||||
|
|
|
@ -300,3 +300,15 @@ nsXMLEntity::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLEntity::GetContentID(PRUint32* aID)
|
||||
{
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLEntity::SetContentID(PRUint32 aID)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
|
@ -283,3 +283,15 @@ nsXMLNotation::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLNotation::GetContentID(PRUint32* aID)
|
||||
{
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLNotation::SetContentID(PRUint32 aID)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
|
@ -273,3 +273,15 @@ nsXMLProcessingInstruction::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLProcessingInstruction::GetContentID(PRUint32* aID)
|
||||
{
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLProcessingInstruction::SetContentID(PRUint32 aID)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
|
@ -286,6 +286,16 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange);
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange);
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const;
|
||||
|
@ -422,7 +432,7 @@ private:
|
|||
nsVoidArray* mBroadcastListeners; // [WEAK]
|
||||
nsIDOMXULElement* mBroadcaster; // [WEAK]
|
||||
nsIController* mController; // [OWNER]
|
||||
nsCOMPtr<nsIRDFCompositeDataSource> mDatabase; // [OWNER]
|
||||
nsCOMPtr<nsIRDFCompositeDataSource> mDatabase; // [OWNER]
|
||||
|
||||
// An unreferenced bare pointer to an aggregate that can implement
|
||||
// element-specific APIs.
|
||||
|
|
|
@ -229,6 +229,19 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus) = 0;
|
||||
|
||||
/**
|
||||
* Get and set a unique ID for this piece of content.
|
||||
* This ID is used as a key to store state information
|
||||
* about this content object and its associated frame object.
|
||||
* The state information is stored in a dictionary that is
|
||||
* manipulated by the frame manager (nsIFrameManager) inside layout.
|
||||
* An opaque pointer to this dictionary is passed to the session
|
||||
* history as a handle associated with the current document's state
|
||||
*/
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) = 0;
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) = 0;
|
||||
|
||||
};
|
||||
|
||||
// nsresult codes for GetAttribute
|
||||
|
|
|
@ -151,6 +151,16 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = mContentID;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
mContentID = aID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange){
|
||||
return mInner.RangeAdd(aRange);
|
||||
}
|
||||
|
@ -181,6 +191,7 @@ public:
|
|||
|
||||
protected:
|
||||
nsGenericDOMDataNode mInner;
|
||||
PRUint32 mContentID;
|
||||
};
|
||||
|
||||
nsresult NS_NewCommentNode(nsIContent** aInstancePtrResult);
|
||||
|
@ -202,6 +213,7 @@ nsCommentNode::nsCommentNode()
|
|||
{
|
||||
NS_INIT_REFCNT();
|
||||
mInner.Init(this);
|
||||
mContentID = 0;
|
||||
}
|
||||
|
||||
nsCommentNode::~nsCommentNode()
|
||||
|
|
|
@ -185,6 +185,16 @@ public:
|
|||
aEventStatus = nsEventStatus_eIgnore;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange)
|
||||
{ return mInner.RangeAdd(aRange); }
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange)
|
||||
|
|
|
@ -465,6 +465,8 @@ struct nsGenericDOMDataNode {
|
|||
nsIDOMEvent** aDOMEvent, \
|
||||
PRUint32 aFlags, \
|
||||
nsEventStatus& aEventStatus); \
|
||||
NS_IMETHOD GetContentID(PRUint32* aID); \
|
||||
NS_IMETHOD SetContentID(PRUint32 aID); \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange){ \
|
||||
return _g.RangeAdd(aRange); \
|
||||
} \
|
||||
|
|
|
@ -173,6 +173,7 @@ nsGenericElement::nsGenericElement()
|
|||
mContent = nsnull;
|
||||
mDOMSlots = nsnull;
|
||||
mListenerManager = nsnull;
|
||||
mContentID = 0;
|
||||
}
|
||||
|
||||
nsGenericElement::~nsGenericElement()
|
||||
|
|
|
@ -150,6 +150,16 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = mContentID;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
mContentID = aID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult RangeAdd(nsIDOMRange& aRange);
|
||||
nsresult RangeRemove(nsIDOMRange& aRange);
|
||||
nsresult GetRangeList(nsVoidArray*& aResult) const;
|
||||
|
@ -210,6 +220,7 @@ public:
|
|||
nsIAtom* mTag;
|
||||
nsIEventListenerManager* mListenerManager;
|
||||
nsDOMSlots *mDOMSlots;
|
||||
PRUint32 mContentID;
|
||||
};
|
||||
|
||||
class nsGenericContainerElement : public nsGenericElement {
|
||||
|
@ -501,6 +512,12 @@ public:
|
|||
nsIDOMEvent** aDOMEvent, \
|
||||
PRUint32 aFlags, \
|
||||
nsEventStatus& aEventStatus); \
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) { \
|
||||
return _g.GetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) { \
|
||||
return _g.SetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) { \
|
||||
return _g.RangeAdd(aRange); \
|
||||
} \
|
||||
|
@ -603,6 +620,12 @@ public:
|
|||
nsIDOMEvent** aDOMEvent, \
|
||||
PRUint32 aFlags, \
|
||||
nsEventStatus& aEventStatus); \
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) { \
|
||||
return _g.GetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) { \
|
||||
return _g.SetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) { \
|
||||
return _g.RangeAdd(aRange); \
|
||||
} \
|
||||
|
@ -705,6 +728,12 @@ public:
|
|||
nsIDOMEvent** aDOMEvent, \
|
||||
PRUint32 aFlags, \
|
||||
nsEventStatus& aEventStatus); \
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) { \
|
||||
return _g.GetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) { \
|
||||
return _g.SetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) { \
|
||||
return _g.RangeAdd(aRange); \
|
||||
} \
|
||||
|
@ -805,6 +834,12 @@ public:
|
|||
nsIDOMEvent** aDOMEvent, \
|
||||
PRUint32 aFlags, \
|
||||
nsEventStatus& aEventStatus); \
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) { \
|
||||
return _g.GetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) { \
|
||||
return _g.SetContentID(aID); \
|
||||
} \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) { \
|
||||
return _g.RangeAdd(aRange); \
|
||||
} \
|
||||
|
|
|
@ -67,6 +67,7 @@ public:
|
|||
|
||||
protected:
|
||||
nsGenericDOMDataNode mInner;
|
||||
PRUint32 mContentID;
|
||||
};
|
||||
|
||||
nsresult NS_NewTextNode(nsIContent** aInstancePtrResult);
|
||||
|
@ -89,6 +90,7 @@ nsTextNode::nsTextNode()
|
|||
{
|
||||
NS_INIT_REFCNT();
|
||||
mInner.Init(this);
|
||||
mContentID = 0;
|
||||
}
|
||||
|
||||
nsTextNode::~nsTextNode()
|
||||
|
@ -197,3 +199,17 @@ nsTextNode::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
return mInner.HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
|
||||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextNode::GetContentID(PRUint32* aID)
|
||||
{
|
||||
*aID = mContentID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextNode::SetContentID(PRUint32 aID)
|
||||
{
|
||||
mContentID = aID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -136,6 +136,16 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange);
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange);
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const;
|
||||
|
|
|
@ -158,6 +158,14 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
return mInner.GetContentID(aID);
|
||||
}
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
return mInner.SetContentID(aID);
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) {
|
||||
return mInner.RangeAdd(aRange);
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ public:
|
|||
|
||||
protected:
|
||||
nsGenericDOMDataNode mInner;
|
||||
PRUint32 mContentID;
|
||||
};
|
||||
|
||||
nsresult
|
||||
|
@ -89,6 +90,7 @@ nsXMLCDATASection::nsXMLCDATASection()
|
|||
{
|
||||
NS_INIT_REFCNT();
|
||||
mInner.Init(this);
|
||||
mContentID = 0;
|
||||
}
|
||||
|
||||
nsXMLCDATASection::~nsXMLCDATASection()
|
||||
|
@ -203,3 +205,17 @@ nsXMLCDATASection::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
return mInner.HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
|
||||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLCDATASection::GetContentID(PRUint32* aID)
|
||||
{
|
||||
*aID = mContentID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLCDATASection::SetContentID(PRUint32 aID)
|
||||
{
|
||||
mContentID = aID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -296,3 +296,15 @@ nsXMLDocumentType::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLDocumentType::GetContentID(PRUint32* aID)
|
||||
{
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLDocumentType::SetContentID(PRUint32 aID)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
|
@ -56,6 +56,7 @@ nsXMLElement::nsXMLElement(nsIAtom *aTag)
|
|||
NS_INIT_REFCNT();
|
||||
mInner.Init((nsIContent *)(nsIXMLContent *)this, aTag);
|
||||
mIsLink = PR_FALSE;
|
||||
mContentID = 0;
|
||||
|
||||
if (0 == kElementCount++) {
|
||||
kLinkAtom = NS_NewAtom("link");
|
||||
|
|
|
@ -145,6 +145,16 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = mContentID;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
mContentID = aID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) {
|
||||
return mInner.RangeAdd(aRange);
|
||||
}
|
||||
|
@ -204,6 +214,7 @@ public:
|
|||
protected:
|
||||
nsGenericXMLElement mInner;
|
||||
PRBool mIsLink;
|
||||
PRUint32 mContentID;
|
||||
};
|
||||
|
||||
#endif // nsXMLElement_h___
|
||||
|
|
|
@ -300,3 +300,15 @@ nsXMLEntity::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLEntity::GetContentID(PRUint32* aID)
|
||||
{
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLEntity::SetContentID(PRUint32 aID)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
|
@ -283,3 +283,15 @@ nsXMLNotation::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLNotation::GetContentID(PRUint32* aID)
|
||||
{
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLNotation::SetContentID(PRUint32 aID)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
|
@ -273,3 +273,15 @@ nsXMLProcessingInstruction::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
aFlags, aEventStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLProcessingInstruction::GetContentID(PRUint32* aID)
|
||||
{
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXMLProcessingInstruction::SetContentID(PRUint32 aID)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
|
@ -286,6 +286,16 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange);
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange);
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const;
|
||||
|
@ -422,7 +432,7 @@ private:
|
|||
nsVoidArray* mBroadcastListeners; // [WEAK]
|
||||
nsIDOMXULElement* mBroadcaster; // [WEAK]
|
||||
nsIController* mController; // [OWNER]
|
||||
nsCOMPtr<nsIRDFCompositeDataSource> mDatabase; // [OWNER]
|
||||
nsCOMPtr<nsIRDFCompositeDataSource> mDatabase; // [OWNER]
|
||||
|
||||
// An unreferenced bare pointer to an aggregate that can implement
|
||||
// element-specific APIs.
|
||||
|
|
|
@ -286,6 +286,16 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
NS_IMETHOD GetContentID(PRUint32* aID) {
|
||||
*aID = 0;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD SetContentID(PRUint32 aID) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange);
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange);
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const;
|
||||
|
@ -422,7 +432,7 @@ private:
|
|||
nsVoidArray* mBroadcastListeners; // [WEAK]
|
||||
nsIDOMXULElement* mBroadcaster; // [WEAK]
|
||||
nsIController* mController; // [OWNER]
|
||||
nsCOMPtr<nsIRDFCompositeDataSource> mDatabase; // [OWNER]
|
||||
nsCOMPtr<nsIRDFCompositeDataSource> mDatabase; // [OWNER]
|
||||
|
||||
// An unreferenced bare pointer to an aggregate that can implement
|
||||
// element-specific APIs.
|
||||
|
|
Загрузка…
Ссылка в новой задаче