Bug 705434 - Remove dead code: nsXULDocument::ContextStack::IsInsideXULTemplate; r=jst
authorMs2ger <ms2ger@gmail.com>
Sat, 03 Dec 2011 22:50:17 +0100
changeset 81963 0676170f5c7ff54e46db99dffd57ab7add8a6cbd
parent 81962 f636c8c44ddabfd232c210c71e3f34bc16644ab4
child 81964 8e66579d7d43dd34fbfc82b6e6fe7e2af4e10b63
push idunknown
push userunknown
push dateunknown
reviewersjst
bugs705434
milestone11.0a1
Bug 705434 - Remove dead code: nsXULDocument::ContextStack::IsInsideXULTemplate; r=jst
content/xul/document/src/nsXULDocument.cpp
content/xul/document/src/nsXULDocument.h
--- a/content/xul/document/src/nsXULDocument.cpp
+++ b/content/xul/document/src/nsXULDocument.cpp
@@ -2359,33 +2359,16 @@ nsXULDocument::ContextStack::SetTopIndex
     if (mDepth == 0)
         return NS_ERROR_UNEXPECTED;
 
     mTop->mIndex = aIndex;
     return NS_OK;
 }
 
 
-bool
-nsXULDocument::ContextStack::IsInsideXULTemplate()
-{
-    if (mDepth) {
-        for (nsIContent* element = mTop->mElement; element;
-             element = element->GetParent()) {
-
-            if (element->NodeInfo()->Equals(nsGkAtoms::_template,
-                                            kNameSpaceID_XUL)) {
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-
 //----------------------------------------------------------------------
 //
 // Content model walking routines
 //
 
 nsresult
 nsXULDocument::PrepareToWalk()
 {
--- a/content/xul/document/src/nsXULDocument.h
+++ b/content/xul/document/src/nsXULDocument.h
@@ -352,18 +352,16 @@ protected:
 
         PRInt32 Depth() { return mDepth; }
 
         nsresult Push(nsXULPrototypeElement* aPrototype, nsIContent* aElement);
         nsresult Pop();
         nsresult Peek(nsXULPrototypeElement** aPrototype, nsIContent** aElement, PRInt32* aIndex);
 
         nsresult SetTopIndex(PRInt32 aIndex);
-
-        bool IsInsideXULTemplate();
     };
 
     friend class ContextStack;
     ContextStack mContextStack;
 
     enum State { eState_Master, eState_Overlay };
     State mState;