From 0e0feed5daa8751b04bda7b4caac3854995cb0c8 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 10 Jun 2020 01:19:37 +0000 Subject: Issue #1585 - Replace node.rootNode with node.getRootNode() This removes the (default disabled) node.rootNode readonly attribute and replaces it with a node.getRootNode() function per WhatWG spec discussion. Based on work by John Dai --- dom/base/nsINode.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'dom/base/nsINode.h') diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h index d82f5f899..43d44db60 100644 --- a/dom/base/nsINode.h +++ b/dom/base/nsINode.h @@ -83,6 +83,7 @@ template class Sequence; class Text; class TextOrElementOrDocument; struct DOMPointInit; +struct GetRootNodeOptions; } // namespace dom } // namespace mozilla @@ -942,10 +943,11 @@ public: */ nsINode* SubtreeRoot() const; - nsINode* RootNode() const - { - return SubtreeRoot(); - } + /* + * Get context object's shadow-including root if options's composed is true, + * and context object's root otherwise. + */ + nsINode* GetRootNode(const mozilla::dom::GetRootNodeOptions& aOptions); /** * See nsIDOMEventTarget -- cgit v1.2.3