From ca3c31219b0756fc9053925330e01b0f6f633563 Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Thu, 28 May 2015 16:59:00 -0400 Subject: [PATCH] Bug 1163105 - Make nsReferencedElement work with referencing elements that are not in their document's DOM tree. r=roc --- dom/base/nsReferencedElement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/base/nsReferencedElement.cpp b/dom/base/nsReferencedElement.cpp index 3cb9fc0150d..f19abb76de2 100644 --- a/dom/base/nsReferencedElement.cpp +++ b/dom/base/nsReferencedElement.cpp @@ -47,7 +47,7 @@ nsReferencedElement::Reset(nsIContent* aFromContent, nsIURI* aURI, return; // Get the current document - nsIDocument *doc = aFromContent->GetComposedDoc(); + nsIDocument *doc = aFromContent->OwnerDoc(); if (!doc) return; @@ -124,7 +124,7 @@ void nsReferencedElement::ResetWithID(nsIContent* aFromContent, const nsString& aID, bool aWatch) { - nsIDocument *doc = aFromContent->GetComposedDoc(); + nsIDocument *doc = aFromContent->OwnerDoc(); if (!doc) return;