diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index bc6748031181..70d638d1c1c2 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -12958,10 +12958,12 @@ bool nsDocShell::ShouldOpenInBlankTarget(const nsAString& aOriginalTarget,
: !linkHost.Equals("www."_ns + docHost);
}
-static bool IsElementAnchorOrArea(nsIContent* aContent) {
- // Make sure we are dealing with either an or element in the HTML
- // or XHTML namespace.
- return aContent->IsAnyOfHTMLElements(nsGkAtoms::a, nsGkAtoms::area);
+static bool ElementCanHaveNoopener(nsIContent* aContent) {
+ // Make sure we are dealing with either an , , or