summaryrefslogtreecommitdiffstats
path: root/dom/html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html')
-rw-r--r--dom/html/nsHTMLDocument.cpp20
-rw-r--r--dom/html/nsHTMLDocument.h2
2 files changed, 1 insertions, 21 deletions
diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp
index 0f2d90673..23c73298d 100644
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -1013,26 +1013,6 @@ nsHTMLDocument::SetDomain(const nsAString& aDomain, ErrorResult& rv)
rv = NodePrincipal()->SetDomain(newURI);
}
-nsGenericHTMLElement*
-nsHTMLDocument::GetBody()
-{
- Element* html = GetHtmlElement();
- if (!html) {
- return nullptr;
- }
-
- for (nsIContent* child = html->GetFirstChild();
- child;
- child = child->GetNextSibling()) {
- if (child->IsHTMLElement(nsGkAtoms::body) ||
- child->IsHTMLElement(nsGkAtoms::frameset)) {
- return static_cast<nsGenericHTMLElement*>(child);
- }
- }
-
- return nullptr;
-}
-
NS_IMETHODIMP
nsHTMLDocument::GetBody(nsIDOMHTMLElement** aBody)
{
diff --git a/dom/html/nsHTMLDocument.h b/dom/html/nsHTMLDocument.h
index 1fa81f6cd..02fc22d42 100644
--- a/dom/html/nsHTMLDocument.h
+++ b/dom/html/nsHTMLDocument.h
@@ -175,7 +175,7 @@ public:
JS::MutableHandle<JSObject*> aRetval,
mozilla::ErrorResult& rv);
void GetSupportedNames(nsTArray<nsString>& aNames);
- nsGenericHTMLElement *GetBody();
+ using nsIDocument::GetBody;
void SetBody(nsGenericHTMLElement* aBody, mozilla::ErrorResult& rv);
mozilla::dom::HTMLSharedElement *GetHead() {
return static_cast<mozilla::dom::HTMLSharedElement*>(GetHeadElement());