summaryrefslogtreecommitdiffstats
path: root/dom/html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html')
-rw-r--r--dom/html/nsHTMLDocument.cpp25
-rw-r--r--dom/html/nsHTMLDocument.h2
2 files changed, 1 insertions, 26 deletions
diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp
index 23c73298d..1eeef737a 100644
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -1034,31 +1034,6 @@ nsHTMLDocument::SetBody(nsIDOMHTMLElement* aBody)
return rv.StealNSResult();
}
-void
-nsHTMLDocument::SetBody(nsGenericHTMLElement* newBody, ErrorResult& rv)
-{
- nsCOMPtr<Element> root = GetRootElement();
-
- // The body element must be either a body tag or a frameset tag. And we must
- // have a html root tag, otherwise GetBody will not return the newly set
- // body.
- if (!newBody ||
- !newBody->IsAnyOfHTMLElements(nsGkAtoms::body, nsGkAtoms::frameset) ||
- !root || !root->IsHTMLElement() ||
- !root->IsHTMLElement(nsGkAtoms::html)) {
- rv.Throw(NS_ERROR_DOM_HIERARCHY_REQUEST_ERR);
- return;
- }
-
- // Use DOM methods so that we pass through the appropriate security checks.
- nsCOMPtr<Element> currentBody = GetBodyElement();
- if (currentBody) {
- root->ReplaceChild(*newBody, *currentBody, rv);
- } else {
- root->AppendChild(*newBody, rv);
- }
-}
-
NS_IMETHODIMP
nsHTMLDocument::GetHead(nsIDOMHTMLHeadElement** aHead)
{
diff --git a/dom/html/nsHTMLDocument.h b/dom/html/nsHTMLDocument.h
index 02fc22d42..c9e46b3fa 100644
--- a/dom/html/nsHTMLDocument.h
+++ b/dom/html/nsHTMLDocument.h
@@ -176,7 +176,7 @@ public:
mozilla::ErrorResult& rv);
void GetSupportedNames(nsTArray<nsString>& aNames);
using nsIDocument::GetBody;
- void SetBody(nsGenericHTMLElement* aBody, mozilla::ErrorResult& rv);
+ using nsIDocument::SetBody;
mozilla::dom::HTMLSharedElement *GetHead() {
return static_cast<mozilla::dom::HTMLSharedElement*>(GetHeadElement());
}