From 06d4249d443d89fe1081b6adede63cd293b685c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 18 Nov 2019 19:06:51 +0000 Subject: [PATCH] Bug 1596800 - Remove document.getBindingParent. r=smaug Differential Revision: https://phabricator.services.mozilla.com/D53342 --HG-- extra : moz-landing-system : lando --- dom/base/Document.cpp | 9 --- dom/base/Document.h | 1 - dom/base/test/mochitest.ini | 1 - dom/base/test/test_bug330925.html | 58 ------------------- dom/webidl/Document.webidl | 5 +- .../tests/mochitest/test_bug912322.html | 2 +- widget/tests/test_imestate.html | 8 +-- 7 files changed, 5 insertions(+), 79 deletions(-) delete mode 100644 dom/base/test/test_bug330925.html diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp index 4ba47970f1ee..9dd2fd83b7c8 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp @@ -7801,15 +7801,6 @@ already_AddRefed Document::ImportNode(nsINode& aNode, bool aDeep, return nullptr; } -// FIXME(bug 1596800): This should be removed, only has a couple of callers. -Element* Document::GetBindingParent(nsINode& aNode) { - if (aNode.IsInNativeAnonymousSubtree()) { - return Element::FromNodeOrNull( - aNode.GetClosestNativeAnonymousSubtreeRootParent()); - } - return Element::FromNodeOrNull(aNode.GetContainingShadowHost()); -} - nsINodeList* Document::GetAnonymousNodes(Element& aElement) { return nullptr; } already_AddRefed Document::CreateRange(ErrorResult& rv) { diff --git a/dom/base/Document.h b/dom/base/Document.h index ec1a6d9134f0..8355e7f50c71 100644 --- a/dom/base/Document.h +++ b/dom/base/Document.h @@ -3705,7 +3705,6 @@ class Document : public nsINode, // QuerySelector and QuerySelectorAll already defined on nsINode nsINodeList* GetAnonymousNodes(Element& aElement); - Element* GetBindingParent(nsINode& aNode); XPathExpression* CreateExpression(const nsAString& aExpression, XPathNSResolver* aResolver, diff --git a/dom/base/test/mochitest.ini b/dom/base/test/mochitest.ini index f6ed3d38da5c..e9f3822f00f3 100644 --- a/dom/base/test/mochitest.ini +++ b/dom/base/test/mochitest.ini @@ -311,7 +311,6 @@ skip-if = headless # headless != clipboard [test_bug320799.html] [test_bug322317.html] [test_bug326337.html] -[test_bug330925.html] [test_bug331959.html] [test_bug333064.html] skip-if = headless # Headless: Bug 1405868 diff --git a/dom/base/test/test_bug330925.html b/dom/base/test/test_bug330925.html deleted file mode 100644 index 992f07bd3ec6..000000000000 --- a/dom/base/test/test_bug330925.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - Test for Bug 330925 - - - - - -Mozilla Bug 330925 - -

- -

- -
-
-
- - diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl index 00b1533294ea..740a0162af57 100644 --- a/dom/webidl/Document.webidl +++ b/dom/webidl/Document.webidl @@ -377,12 +377,9 @@ partial interface Document { // Mozilla extensions of various sorts partial interface Document { - // XBL support. Wish we could make these [ChromeOnly], but - // that would likely break bindings running with the page principal. + // XBL support. [Func="IsChromeOrXBL"] NodeList? getAnonymousNodes(Element elt); - [Func="IsChromeOrXBL"] - Element? getBindingParent(Node node); // Creates a new XUL element regardless of the document's default type. [CEReactions, NewObject, Throws, Func="IsChromeOrXBL"] Element createXULElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {}); diff --git a/js/xpconnect/tests/mochitest/test_bug912322.html b/js/xpconnect/tests/mochitest/test_bug912322.html index f553c730b7e0..dfb19ed2c671 100644 --- a/js/xpconnect/tests/mochitest/test_bug912322.html +++ b/js/xpconnect/tests/mochitest/test_bug912322.html @@ -11,7 +11,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=912322