зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 167131. Not not display remote image in message compose when setting is on. R=morse, SR=sspitzer
This commit is contained in:
Родитель
d33d3708fe
Коммит
5587af2ed5
|
@ -51,18 +51,6 @@
|
|||
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
||||
static PRBool ShouldBlockImageByScheme(nsIURI * aURI)
|
||||
{
|
||||
nsCAutoString scheme;
|
||||
|
||||
if (NS_FAILED(aURI->GetScheme(scheme)))
|
||||
return PR_FALSE;
|
||||
|
||||
return scheme.Equals(NS_LITERAL_CSTRING("http")) || scheme.Equals(NS_LITERAL_CSTRING("https")) ||
|
||||
scheme.Equals(NS_LITERAL_CSTRING("imap")) || scheme.Equals(NS_LITERAL_CSTRING("mailbox")) ||
|
||||
scheme.Equals(NS_LITERAL_CSTRING("news")) || scheme.Equals(NS_LITERAL_CSTRING("snews"));
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -136,9 +124,6 @@ NS_IMETHODIMP nsImgManager::ShouldLoad(PRInt32 aContentType,
|
|||
rv = doc->GetBaseURL(*getter_AddRefs(baseURI));
|
||||
if (NS_FAILED(rv) || !baseURI) return rv;
|
||||
|
||||
if (!ShouldBlockImageByScheme(baseURI)) //JFD: Why do we care about the base url anyway?
|
||||
return NS_OK;
|
||||
|
||||
// Let check if we are running a mail window, doesn't matter if mail images are allowed
|
||||
if (IMAGE_BlockedInMail()) {
|
||||
nsCOMPtr<nsIDocShell> docshell;
|
||||
|
|
|
@ -739,6 +739,7 @@ nsMsgCompose::Initialize(nsIDOMWindowInternal *aWindow, nsIMsgComposeParams *par
|
|||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
m_baseWindow = do_QueryInterface(treeOwner);
|
||||
docshell->SetAppType(nsIDocShell::APP_TYPE_MAIL);
|
||||
}
|
||||
|
||||
MSG_ComposeFormat format;
|
||||
|
|
Загрузка…
Ссылка в новой задаче