Bug #343933 --> images aren't getting loaded in the compose window after a save operation happens because nsMsgWindow::SetDOMWindow changes the app type to MAIL. Make callers explicitly set the app type instead of doing it in SetDOMWindow.

sr=bienvenu
This commit is contained in:
scott%scott-macgregor.org 2007-01-30 05:45:25 +00:00
Родитель 63d6f3b200
Коммит 3516f0d813
10 изменённых файлов: 15 добавлений и 12 удалений

Просмотреть файл

@ -110,6 +110,7 @@ function onLoad()
{
gFilterListMsgWindow = Components.classes["@mozilla.org/messenger/msgwindow;1"].createInstance(Components.interfaces.nsIMsgWindow);
gFilterListMsgWindow.domWindow = window;
gFilterListMsgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
gFilterListMsgWindow.statusFeedback = gStatusFeedback;
gFilterBundle = document.getElementById("bundle_filter");

Просмотреть файл

@ -189,6 +189,7 @@ function InitMsgWindow()
mailSession.AddMsgWindow(msgWindow);
getBrowser().docShell.allowAuth = false;
msgWindow.rootDocShell.allowAuth = true;
msgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
}
function AddDataSources()

Просмотреть файл

@ -186,6 +186,7 @@ function SubscribeOnLoad()
msgWindow.domWindow = window;
msgWindow.statusFeedback = gStatusFeedback;
msgWindow.rootDocShell.allowAuth = true;
msgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
// look in arguments[0] for parameters
if (window.arguments && window.arguments[0]) {

Просмотреть файл

@ -215,6 +215,7 @@ function InitMsgWindow()
var messagepane = document.getElementById("messagepane");
messagepane.docShell.allowAuth = false;
msgWindow.rootDocShell.allowAuth = true;
msgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
}
function messagePaneOnClick(event)

Просмотреть файл

@ -126,6 +126,7 @@ function selectOnLoad()
{
gMsgWindow = Components.classes[msgWindowContractID].createInstance(Components.interfaces.nsIMsgWindow);
gMsgWindow.domWindow = window;
gMsgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
gAccountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);
gSynchronizeTree = document.getElementById('synchronizeTree');

Просмотреть файл

@ -188,6 +188,7 @@ function SubscribeOnLoad()
msgWindow.domWindow = window;
msgWindow.statusFeedback = gStatusFeedback;
msgWindow.rootDocShell.allowAuth = true;
msgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
// look in arguments[0] for parameters
if (window.arguments && window.arguments[0]) {

Просмотреть файл

@ -409,6 +409,7 @@ function GetFilterEditorMsgWindow()
var nsIMsgWindow = Components.interfaces.nsIMsgWindow;
gFilterEditorMsgWindow = Components.classes[msgWindowContractID].createInstance(nsIMsgWindow);
gFilterEditorMsgWindow.domWindow = window;
gFilterEditorMsgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
}
return gFilterEditorMsgWindow;
}

Просмотреть файл

@ -95,6 +95,7 @@ function onLoad()
{
gFilterListMsgWindow = Components.classes["@mozilla.org/messenger/msgwindow;1"].createInstance(Components.interfaces.nsIMsgWindow);
gFilterListMsgWindow.domWindow = window;
gFilterListMsgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
gFilterListMsgWindow.statusFeedback = gStatusFeedback;
gFilterBundle = document.getElementById("bundle_filter");

Просмотреть файл

@ -318,6 +318,7 @@ function initializeSearchWindowWidgets()
msgWindow = Components.classes[msgWindowContractID].createInstance(nsIMsgWindow);
msgWindow.domWindow = window;
msgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
msgWindow.statusFeedback = gStatusFeedback;
// functionality to enable/disable buttons using nsSearchResultsController

Просмотреть файл

@ -179,8 +179,6 @@ NS_IMETHODIMP nsMsgWindow::SetStatusFeedback(nsIMsgStatusFeedback * aStatusFeedb
nsCOMPtr<nsIDocShell> messageWindowDocShell;
GetMessageWindowDocShell(getter_AddRefs(messageWindowDocShell));
NS_ASSERTION(messageWindowDocShell, "No messagepane docshell found! setStatusFeedback called before setDOMWindow");
// register our status feedback object as a web progress listener
nsCOMPtr<nsIWebProgress> webProgress(do_GetInterface(messageWindowDocShell));
if (webProgress && mStatusFeedback && messageWindowDocShell)
@ -266,13 +264,9 @@ NS_IMETHODIMP nsMsgWindow::SetRootDocShell(nsIDocShell * aDocShell)
{
mRootDocShellWeak = do_GetWeakReference(aDocShell);
nsCOMPtr<nsIURIContentListener> listener(do_GetInterface(aDocShell));
if (listener) {
if (listener)
listener->SetParentContentListener(this);
}
// be sure to set the application flag on the root docshell
// so it knows we are a mail application.
aDocShell->SetAppType(nsIDocShell::APP_TYPE_MAIL);
}
return NS_OK;
}