summaryrefslogtreecommitdiff
path: root/dom/base/nsContentUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsContentUtils.h')
-rw-r--r--dom/base/nsContentUtils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h
index 8cf105bb3e..db9558d06c 100644
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -2763,6 +2763,14 @@ public:
static bool
IsCustomElementsEnabled() { return sIsCustomElementsEnabled; }
+ /**
+ * Returns the length of the parent-traversal path (in terms of the number of
+ * nodes) to an unparented/root node from aNode. An unparented/root node is
+ * considered to have a depth of 1, its children have a depth of 2, etc.
+ * aNode is expected to be non-null.
+ */
+ static uint32_t GetNodeDepth(nsINode* aNode);
+
private:
static bool InitializeEventTable();