mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
We don't pass references to 'interfaces' in general, so let's not do it here either. r=bryner@netscape.com. sr=jaggernaut@netscape.com
This commit is contained in:
parent
dbe74a7cca
commit
70c3c11153
@ -249,8 +249,8 @@ public:
|
||||
* GetRangeList -- returns the list of ranges that have one or both endpoints
|
||||
* within this content item
|
||||
*/
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange) = 0;
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange) = 0;
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange* aRange) = 0;
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange* aRange) = 0;
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const = 0;
|
||||
|
||||
/**
|
||||
|
@ -176,10 +176,10 @@ public:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange){
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange* aRange){
|
||||
return mInner.RangeAdd(aRange);
|
||||
}
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange){
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange* aRange){
|
||||
return mInner.RangeRemove(aRange);
|
||||
}
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const {
|
||||
|
@ -748,7 +748,7 @@ nsGenericDOMDataNode::HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
|
||||
|
||||
nsresult
|
||||
nsGenericDOMDataNode::RangeAdd(nsIDOMRange& aRange)
|
||||
nsGenericDOMDataNode::RangeAdd(nsIDOMRange* aRange)
|
||||
{
|
||||
// lazy allocation of range list
|
||||
if (nsnull == mRangeList) {
|
||||
@ -760,7 +760,7 @@ nsGenericDOMDataNode::RangeAdd(nsIDOMRange& aRange)
|
||||
|
||||
// Make sure we don't add a range that is already
|
||||
// in the list!
|
||||
PRInt32 i = mRangeList->IndexOf(&aRange);
|
||||
PRInt32 i = mRangeList->IndexOf(aRange);
|
||||
if (i >= 0) {
|
||||
// Range is already in the list, so there
|
||||
// is nothing to do!
|
||||
@ -768,18 +768,18 @@ nsGenericDOMDataNode::RangeAdd(nsIDOMRange& aRange)
|
||||
}
|
||||
|
||||
// dont need to addref - this call is made by the range object itself
|
||||
PRBool rv = mRangeList->AppendElement(&aRange);
|
||||
PRBool rv = mRangeList->AppendElement(aRange);
|
||||
if (rv) return NS_OK;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsGenericDOMDataNode::RangeRemove(nsIDOMRange& aRange)
|
||||
nsGenericDOMDataNode::RangeRemove(nsIDOMRange* aRange)
|
||||
{
|
||||
if (mRangeList) {
|
||||
// dont need to release - this call is made by the range object itself
|
||||
PRBool rv = mRangeList->RemoveElement(&aRange);
|
||||
PRBool rv = mRangeList->RemoveElement(aRange);
|
||||
if (rv) {
|
||||
if (mRangeList->Count() == 0) {
|
||||
delete mRangeList;
|
||||
|
@ -216,8 +216,8 @@ struct nsGenericDOMDataNode {
|
||||
nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
nsEventStatus* aEventStatus);
|
||||
nsresult RangeAdd(nsIDOMRange& aRange);
|
||||
nsresult RangeRemove(nsIDOMRange& aRange);
|
||||
nsresult RangeAdd(nsIDOMRange* aRange);
|
||||
nsresult RangeRemove(nsIDOMRange* aRange);
|
||||
nsresult GetRangeList(nsVoidArray*& aResult) const;
|
||||
nsresult SetFocus(nsIPresContext *aPresContext);
|
||||
nsresult RemoveFocus(nsIPresContext *aPresContext);
|
||||
@ -552,10 +552,10 @@ struct nsGenericDOMDataNode {
|
||||
nsEventStatus* aEventStatus); \
|
||||
NS_IMETHOD GetContentID(PRUint32* aID); \
|
||||
NS_IMETHOD SetContentID(PRUint32 aID); \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange){ \
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange* aRange){ \
|
||||
return _g.RangeAdd(aRange); \
|
||||
} \
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange){ \
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange* aRange){ \
|
||||
return _g.RangeRemove(aRange); \
|
||||
} \
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const { \
|
||||
|
@ -2072,7 +2072,7 @@ nsGenericElement::GetBaseTarget(nsAWritableString& aBaseTarget) const
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericElement::RangeAdd(nsIDOMRange& aRange)
|
||||
nsGenericElement::RangeAdd(nsIDOMRange* aRange)
|
||||
{
|
||||
if (!mDOMSlots)
|
||||
GetDOMSlots();
|
||||
@ -2087,7 +2087,7 @@ nsGenericElement::RangeAdd(nsIDOMRange& aRange)
|
||||
|
||||
// Make sure we don't add a range that is already
|
||||
// in the list!
|
||||
PRInt32 i = mDOMSlots->mRangeList->IndexOf(&aRange);
|
||||
PRInt32 i = mDOMSlots->mRangeList->IndexOf(aRange);
|
||||
if (i >= 0) {
|
||||
// Range is already in the list, so there
|
||||
// is nothing to do!
|
||||
@ -2095,7 +2095,7 @@ nsGenericElement::RangeAdd(nsIDOMRange& aRange)
|
||||
}
|
||||
|
||||
// dont need to addref - this call is made by the range object itself
|
||||
PRBool rv = mDOMSlots->mRangeList->AppendElement(&aRange);
|
||||
PRBool rv = mDOMSlots->mRangeList->AppendElement(aRange);
|
||||
if (rv)
|
||||
return NS_OK;
|
||||
|
||||
@ -2104,11 +2104,11 @@ nsGenericElement::RangeAdd(nsIDOMRange& aRange)
|
||||
|
||||
|
||||
nsresult
|
||||
nsGenericElement::RangeRemove(nsIDOMRange& aRange)
|
||||
nsGenericElement::RangeRemove(nsIDOMRange* aRange)
|
||||
{
|
||||
if (mDOMSlots && mDOMSlots->mRangeList) {
|
||||
// dont need to release - this call is made by the range object itself
|
||||
PRBool rv = mDOMSlots->mRangeList->RemoveElement(&aRange);
|
||||
PRBool rv = mDOMSlots->mRangeList->RemoveElement(aRange);
|
||||
if (rv) {
|
||||
if (mDOMSlots->mRangeList->Count() == 0) {
|
||||
delete mDOMSlots->mRangeList;
|
||||
|
@ -274,8 +274,8 @@ public:
|
||||
// NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
|
||||
// NS_IMETHOD DumpContent(FILE* out, PRInt32 aIndent,PRBool aDumpAll) const;
|
||||
#endif
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange);
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange);
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange* aRange);
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange* aRange);
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const;
|
||||
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
nsEvent* aEvent,
|
||||
|
@ -643,7 +643,7 @@ nsresult nsRange::AddToListOf(nsIDOMNode* aNode)
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
|
||||
res = cN->RangeAdd(*NS_STATIC_CAST(nsIDOMRange*,this));
|
||||
res = cN->RangeAdd(NS_STATIC_CAST(nsIDOMRange*,this));
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -659,7 +659,7 @@ nsresult nsRange::RemoveFromListOf(nsIDOMNode* aNode)
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
|
||||
res = cN->RangeRemove(*NS_STATIC_CAST(nsIDOMRange*,this));
|
||||
res = cN->RangeRemove(NS_STATIC_CAST(nsIDOMRange*,this));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -177,8 +177,8 @@ public:
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange);
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange);
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange* aRange);
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange* aRange);
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const;
|
||||
|
||||
// Implementation for nsIContent
|
||||
@ -358,14 +358,14 @@ nsAttributeContent::HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
|
||||
|
||||
nsresult
|
||||
nsAttributeContent::RangeAdd(nsIDOMRange& aRange)
|
||||
nsAttributeContent::RangeAdd(nsIDOMRange* aRange)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsAttributeContent::RangeRemove(nsIDOMRange& aRange)
|
||||
nsAttributeContent::RangeRemove(nsIDOMRange* aRange)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -257,10 +257,10 @@ public:
|
||||
nsEventStatus* aEventStatus);
|
||||
NS_IMETHOD GetContentID(PRUint32* aID);
|
||||
NS_IMETHOD SetContentID(PRUint32 aID);
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange){
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange* aRange){
|
||||
return mInner.RangeAdd(aRange);
|
||||
}
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange){
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange* aRange){
|
||||
return mInner.RangeRemove(aRange);
|
||||
}
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const {
|
||||
|
@ -3499,7 +3499,7 @@ nsXULElement::SetContentID(PRUint32 aID)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULElement::RangeAdd(nsIDOMRange& aRange)
|
||||
nsXULElement::RangeAdd(nsIDOMRange* aRange)
|
||||
{
|
||||
// rdf content does not yet support DOM ranges
|
||||
return NS_OK;
|
||||
@ -3507,7 +3507,7 @@ nsXULElement::RangeAdd(nsIDOMRange& aRange)
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULElement::RangeRemove(nsIDOMRange& aRange)
|
||||
nsXULElement::RangeRemove(nsIDOMRange* aRange)
|
||||
{
|
||||
// rdf content does not yet support DOM ranges
|
||||
return NS_OK;
|
||||
|
@ -429,8 +429,8 @@ public:
|
||||
NS_IMETHOD GetContentID(PRUint32* aID);
|
||||
NS_IMETHOD SetContentID(PRUint32 aID);
|
||||
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange& aRange);
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange& aRange);
|
||||
NS_IMETHOD RangeAdd(nsIDOMRange* aRange);
|
||||
NS_IMETHOD RangeRemove(nsIDOMRange* aRange);
|
||||
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const;
|
||||
NS_IMETHOD SetFocus(nsIPresContext* aPresContext);
|
||||
NS_IMETHOD RemoveFocus(nsIPresContext* aPresContext);
|
||||
|
Loading…
Reference in New Issue
Block a user