Bug 1434318 part 3. Remove nsIDOMDocument's doctype attribute. r=mystor

MozReview-Commit-ID: GsTN3kZATz7
This commit is contained in:
Boris Zbarsky 2018-01-31 15:18:09 -05:00
parent c62e23596a
commit 22839b2f74
2 changed files with 3 additions and 14 deletions

View File

@ -5816,15 +5816,6 @@ nsIDocument::GetDoctype() const
return nullptr;
}
NS_IMETHODIMP
nsDocument::GetDoctype(nsIDOMDocumentType** aDoctype)
{
MOZ_ASSERT(aDoctype);
nsCOMPtr<nsIDOMDocumentType> doctype = nsIDocument::GetDoctype();
doctype.forget(aDoctype);
return NS_OK;
}
NS_IMETHODIMP
nsDocument::GetImplementation(nsIDOMDOMImplementation** aImplementation)
{
@ -7856,11 +7847,10 @@ nsDocument::GetViewportInfo(const ScreenIntSize& aDisplaySize)
if (viewport.IsEmpty()) {
// If the docType specifies that we are on a site optimized for mobile,
// then we want to return specially crafted defaults for the viewport info.
nsCOMPtr<nsIDOMDocumentType> docType;
nsresult rv = GetDoctype(getter_AddRefs(docType));
if (NS_SUCCEEDED(rv) && docType) {
RefPtr<DocumentType> docType = GetDoctype();
if (docType) {
nsAutoString docId;
rv = docType->GetPublicId(docId);
nsresult rv = docType->GetPublicId(docId);
if (NS_SUCCEEDED(rv)) {
if ((docId.Find("WAP") != -1) ||
(docId.Find("Mobile") != -1) ||

View File

@ -35,7 +35,6 @@ interface nsIDOMTreeWalker;
[uuid(b15fa0f4-97c1-4388-af62-2ceff7a89bdf)]
interface nsIDOMDocument : nsIDOMNode
{
readonly attribute nsIDOMDocumentType doctype;
readonly attribute nsIDOMDOMImplementation implementation;
readonly attribute nsIDOMElement documentElement;
nsIDOMElement createElement([Null(Stringify)] in DOMString tagName)