зеркало из https://github.com/mozilla/gecko-dev.git
Bug 579830 - Change nsCOMPtr<Element> to nsRefPtr<Element>. Change one location that was QIing to Element. r=bz a2.0=benjamin
--HG-- extra : rebase_source : db2a1a863ed6c646ef8eb850eaf93b64b4552be7
This commit is contained in:
Родитель
7d7660f740
Коммит
8662f7a74d
|
@ -176,8 +176,8 @@ private:
|
|||
Notification::Clear(); mFrom = nsnull; mTo = nsnull;
|
||||
}
|
||||
protected:
|
||||
nsCOMPtr<Element> mFrom;
|
||||
nsCOMPtr<Element> mTo;
|
||||
nsRefPtr<Element> mFrom;
|
||||
nsRefPtr<Element> mTo;
|
||||
};
|
||||
friend class ChangeNotification;
|
||||
|
||||
|
@ -206,7 +206,7 @@ private:
|
|||
|
||||
nsCOMPtr<nsIAtom> mWatchID;
|
||||
nsCOMPtr<nsIDocument> mWatchDocument;
|
||||
nsCOMPtr<Element> mElement;
|
||||
nsRefPtr<Element> mElement;
|
||||
nsRefPtr<Notification> mPendingNotification;
|
||||
};
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ class nsGenericHTMLElementTearoff : public nsIDOMNSHTMLElement,
|
|||
nsIDOMNSHTMLElement)
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsGenericHTMLElement> mElement;
|
||||
nsRefPtr<nsGenericHTMLElement> mElement;
|
||||
};
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_1(nsGenericHTMLElementTearoff, mElement)
|
||||
|
|
|
@ -796,8 +796,8 @@ nsHTMLSelectElement::GetOptionIndex(nsIDOMHTMLOptionElement* aOption,
|
|||
PRInt32 aStartIndex, PRBool aForward,
|
||||
PRInt32* aIndex)
|
||||
{
|
||||
nsCOMPtr<Element> option = do_QueryInterface(aOption);
|
||||
return mOptions->GetOptionIndex(option, aStartIndex, aForward, aIndex);
|
||||
nsCOMPtr<nsINode> option = do_QueryInterface(aOption);
|
||||
return mOptions->GetOptionIndex(option->AsElement(), aStartIndex, aForward, aIndex);
|
||||
}
|
||||
|
||||
PRBool
|
||||
|
|
|
@ -2439,7 +2439,7 @@ nsXULDocument::PrepareToWalk()
|
|||
|
||||
// Do one-time initialization if we're preparing to walk the
|
||||
// master document's prototype.
|
||||
nsCOMPtr<Element> root;
|
||||
nsRefPtr<Element> root;
|
||||
|
||||
if (mState == eState_Master) {
|
||||
// Add the root element
|
||||
|
@ -2930,7 +2930,7 @@ nsXULDocument::ResumeWalk()
|
|||
nsXULPrototypeElement* protoele =
|
||||
static_cast<nsXULPrototypeElement*>(childproto);
|
||||
|
||||
nsCOMPtr<Element> child;
|
||||
nsRefPtr<Element> child;
|
||||
|
||||
if (!processingOverlayHookupNodes) {
|
||||
rv = CreateElementFromPrototype(protoele,
|
||||
|
@ -3680,7 +3680,7 @@ nsXULDocument::CreateElementFromPrototype(nsXULPrototypeElement* aPrototype,
|
|||
}
|
||||
#endif
|
||||
|
||||
nsCOMPtr<Element> result;
|
||||
nsRefPtr<Element> result;
|
||||
|
||||
if (aPrototype->mNodeInfo->NamespaceEquals(kNameSpaceID_XUL)) {
|
||||
// If it's a XUL element, it'll be lightweight until somebody
|
||||
|
@ -3728,7 +3728,7 @@ nsXULDocument::CreateOverlayElement(nsXULPrototypeElement* aPrototype,
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<Element> element;
|
||||
nsRefPtr<Element> element;
|
||||
rv = CreateElementFromPrototype(aPrototype, getter_AddRefs(element));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
|
|
@ -492,7 +492,7 @@ protected:
|
|||
{
|
||||
protected:
|
||||
nsXULDocument* mDocument; // [WEAK]
|
||||
nsCOMPtr<mozilla::dom::Element> mObservesElement; // [OWNER]
|
||||
nsRefPtr<mozilla::dom::Element> mObservesElement; // [OWNER]
|
||||
PRBool mResolved;
|
||||
|
||||
public:
|
||||
|
|
|
@ -130,7 +130,7 @@ public:
|
|||
inline nsIDocument* Document() const;
|
||||
|
||||
struct RestyleEnumerateData : public RestyleData {
|
||||
nsCOMPtr<Element> mElement;
|
||||
nsRefPtr<Element> mElement;
|
||||
};
|
||||
|
||||
private:
|
||||
|
|
Загрузка…
Ссылка в новой задаче