зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1276438 part 7. Get rid of nsIDOMHTMLDocument::GetBody. r=mystor
MozReview-Commit-ID: 5XyZc8hQndQ
This commit is contained in:
Родитель
8c61d57bca
Коммит
2e85a4c2dc
|
@ -1076,27 +1076,6 @@ nsHTMLDocument::SetDomain(const nsAString& aDomain, ErrorResult& rv)
|
|||
rv = NodePrincipal()->SetDomain(newURI);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetBody(nsIDOMHTMLElement** aBody)
|
||||
{
|
||||
*aBody = nullptr;
|
||||
|
||||
nsIContent *body = GetBody();
|
||||
|
||||
return body ? CallQueryInterface(body, aBody) : NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::SetBody(nsIDOMHTMLElement* aBody)
|
||||
{
|
||||
nsCOMPtr<nsIContent> newBody = do_QueryInterface(aBody);
|
||||
MOZ_ASSERT(!newBody || newBody->IsHTMLElement(),
|
||||
"How could we be an nsIContent but not actually HTML here?");
|
||||
ErrorResult rv;
|
||||
SetBody(static_cast<nsGenericHTMLElement*>(newBody.get()), rv);
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetHead(nsISupports** aHead)
|
||||
{
|
||||
|
|
|
@ -172,8 +172,6 @@ public:
|
|||
JS::MutableHandle<JSObject*> aRetval,
|
||||
mozilla::ErrorResult& rv);
|
||||
void GetSupportedNames(nsTArray<nsString>& aNames);
|
||||
using nsIDocument::GetBody;
|
||||
using nsIDocument::SetBody;
|
||||
mozilla::dom::HTMLSharedElement *GetHead() {
|
||||
return static_cast<mozilla::dom::HTMLSharedElement*>(GetHeadElement());
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ interface nsIDOMHTMLDocument : nsIDOMDocument
|
|||
attribute DOMString cookie;
|
||||
|
||||
readonly attribute nsISupports head;
|
||||
attribute nsIDOMHTMLElement body;
|
||||
|
||||
// If aContentType is not something supported by nsHTMLDocument and
|
||||
// the HTML content sink, trying to write to the document will
|
||||
|
|
Загрузка…
Ссылка в новой задаче