Back to index

lightning-sunbird  0.9+nobinonly
nsContentTestNode.cpp File Reference
#include "nsConflictSet.h"
#include "nsContentTestNode.h"
#include "nsISupportsArray.h"
#include "nsIXULDocument.h"
#include "nsIRDFResource.h"
#include "nsIAtom.h"
#include "nsXULContentUtils.h"
#include "nsPrintfCString.h"
#include "prlog.h"

Go to the source code of this file.


PRBool IsElementInBuilder (nsIContent *aContent, nsIXULTemplateBuilder *aBuilder)

Function Documentation

PRBool IsElementInBuilder ( nsIContent aContent,
nsIXULTemplateBuilder aBuilder 

Definition at line 84 of file nsXULContentBuilder.cpp.

    // Make sure that the element is contained within the heirarchy
    // that we're supposed to be processing.
    nsCOMPtr<nsIXULDocument> xuldoc = do_QueryInterface(aContent->GetDocument());
    if (! xuldoc)
        return PR_FALSE;

    nsCOMPtr<nsIContent> content = aContent;
    do {
        nsCOMPtr<nsIXULTemplateBuilder> builder;
        xuldoc->GetTemplateBuilderFor(content, getter_AddRefs(builder));
        if (builder) {
            if (builder == aBuilder)
                return PR_TRUE; // aBuilder is the builder for this element.

            // We found a builder, but it's not aBuilder.

        content = content->GetParent();
    } while (content);

    return PR_FALSE;

Here is the call graph for this function:

Here is the caller graph for this function: