mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1434318 part 12. Remove nsIDOMDocument's contentType attribute. r=mystor
MozReview-Commit-ID: DAXrxIxiac4
This commit is contained in:
parent
d8503e650d
commit
0935ca9973
@ -3339,12 +3339,10 @@ nsDocument::SetApplicationCache(nsIApplicationCache *aApplicationCache)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::GetContentType(nsAString& aContentType)
|
||||
void
|
||||
nsIDocument::GetContentType(nsAString& aContentType)
|
||||
{
|
||||
CopyUTF8toUTF16(GetContentTypeInternal(), aContentType);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -377,12 +377,6 @@ public:
|
||||
*/
|
||||
virtual void SetPrincipal(nsIPrincipal *aPrincipal) override;
|
||||
|
||||
/**
|
||||
* Get the Content-Type of this document.
|
||||
*/
|
||||
// NS_IMETHOD GetContentType(nsAString& aContentType);
|
||||
// Already declared in nsIDOMDocument
|
||||
|
||||
/**
|
||||
* Set the Content-Type of this document.
|
||||
*/
|
||||
|
@ -564,10 +564,8 @@ public:
|
||||
|
||||
/**
|
||||
* Get the Content-Type of this document.
|
||||
* (This will always return NS_OK, but has this signature to be compatible
|
||||
* with nsIDOMDocument::GetContentType())
|
||||
*/
|
||||
NS_IMETHOD GetContentType(nsAString& aContentType) = 0;
|
||||
void GetContentType(nsAString& aContentType);
|
||||
|
||||
/**
|
||||
* Set the Content-Type of this document.
|
||||
|
@ -122,12 +122,6 @@ interface nsIDOMDocument : nsIDOMNode
|
||||
nsIDOMElement elementFromPoint(in float x, in float y);
|
||||
|
||||
|
||||
// Mozilla extensions
|
||||
/**
|
||||
* @see <https://developer.mozilla.org/en/DOM/document.contentType>
|
||||
*/
|
||||
readonly attribute DOMString contentType;
|
||||
|
||||
/**
|
||||
* True if this document is synthetic : stand alone image, video, audio file,
|
||||
* etc.
|
||||
|
@ -117,11 +117,8 @@ NS_IMETHODIMP
|
||||
WebBrowserPersistLocalDocument::GetContentType(nsACString& aContentType)
|
||||
{
|
||||
nsAutoString utf16Type;
|
||||
nsresult rv;
|
||||
|
||||
rv = mDocument->GetContentType(utf16Type);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aContentType = NS_ConvertUTF16toUTF8(utf16Type);
|
||||
mDocument->GetContentType(utf16Type);
|
||||
CopyUTF16toUTF8(utf16Type, aContentType);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -319,8 +319,8 @@ nsEditingSession::SetupEditorOnWindow(mozIDOMWindowProxy* aWindow)
|
||||
//then lets check the mime type
|
||||
if (nsCOMPtr<nsIDocument> doc = window->GetDoc()) {
|
||||
nsAutoString mimeType;
|
||||
if (NS_SUCCEEDED(doc->GetContentType(mimeType)))
|
||||
AppendUTF16toUTF8(mimeType, mimeCType);
|
||||
doc->GetContentType(mimeType);
|
||||
AppendUTF16toUTF8(mimeType, mimeCType);
|
||||
|
||||
if (IsSupportedTextType(mimeCType.get())) {
|
||||
mEditorType.AssignLiteral("text");
|
||||
|
Loading…
Reference in New Issue
Block a user