diff options
author | Moonchild <moonchild@palemoon.org> | 2021-06-18 10:35:19 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-06-18 17:44:33 +0000 |
commit | 22a75217e1ab6203c9952597182c154e44b2637a (patch) | |
tree | 4cc50fd080678d8add229829ab13ce95dd1f215e /dom/base/nsContentUtils.h | |
parent | a970411caf9b1951708efb4987733c6a4581454b (diff) | |
download | uxp-22a75217e1ab6203c9952597182c154e44b2637a.tar.gz |
Issue #1783 - Part 1: Move GetNodeDepth to ResizeObserver.cpp
GetNodeDepth() is a specialized version for ResizeObserver to get the depth of
a node across Shadow DOM. It's better to have this in ResizeObserver.cpp
instead of the generic ContentUtils.
Also updated the function to bypass the shadow root itself and not count it
because ResizeObserver doesn't observe the shadow root and only needs the
relative depths among all observed targets. IOW we use the flattened tree here.
Diffstat (limited to 'dom/base/nsContentUtils.h')
-rw-r--r-- | dom/base/nsContentUtils.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 83ee417403..b3bc22f286 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -2756,14 +2756,6 @@ 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(); |