mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 12:55:46 +00:00
Implementation of SetDocumentCharset.
This commit is contained in:
parent
22623a9d12
commit
d2aab31c4d
@ -174,7 +174,20 @@ nsBrowserAppCore::Init(const nsString& aId)
|
||||
NS_IMETHODIMP
|
||||
nsBrowserAppCore::SetDocumentCharset(const nsString& aCharset)
|
||||
{
|
||||
return NS_OK;
|
||||
nsresult res = NS_OK;
|
||||
if (nsnull != mContentWindow) {
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
if (NS_SUCCEEDED(res = mContentWindow->GetDocument(getter_AddRefs(domDoc)))) {
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc, &res));
|
||||
if (NS_SUCCEEDED(res)) {
|
||||
nsString *aNewCharset = new nsString(aCharset);
|
||||
if (nsnull != aNewCharset) {
|
||||
doc->SetDocumentCharacterSet(aNewCharset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
Reference in New Issue
Block a user