Bug 372345 - Part 3: Some cleanup code, followup to the first part; r=bzbarsky a=blocking-final+

--HG--
extra : rebase_source : c2dd67652939e1e9a26a3f0d2671b2b49c32d4d9
This commit is contained in:
Ehsan Akhgari 2010-11-04 15:00:35 -04:00
parent cc6346ffd2
commit f434f2c01f

View File

@ -226,7 +226,7 @@ RemoveFromAgentSheets(nsCOMArray<nsIStyleSheet> &aAgentSheets, const nsAString&
nsresult rv = NS_NewURI(getter_AddRefs(uri), url);
NS_ENSURE_SUCCESS(rv, rv);
for (PRInt32 i = 0; i < aAgentSheets.Count(); ++i) {
for (PRInt32 i = aAgentSheets.Count() - 1; i >= 0; --i) {
nsIStyleSheet* sheet = aAgentSheets[i];
nsIURI* sheetURI = sheet->GetSheetURI();
@ -3136,10 +3136,6 @@ nsHTMLDocument::TearingDownEditor(nsIEditor *aEditor)
EditingState oldState = mEditingState;
mEditingState = eTearingDown;
nsCOMPtr<nsPIDOMWindow> window = GetWindow();
if (!window)
return;
nsCOMPtr<nsIPresShell> presShell = GetShell();
if (!presShell)
return;
@ -3305,7 +3301,7 @@ nsHTMLDocument::EditingStateChanged()
rv = NS_NewURI(getter_AddRefs(uri), NS_LITERAL_STRING("resource://gre/res/designmode.css"));
NS_ENSURE_SUCCESS(rv, rv);
rv = CSSLoader()->LoadSheetSync(uri, PR_TRUE, PR_TRUE, getter_AddRefs(sheet));
rv = LoadChromeSheetSync(uri, PR_TRUE, getter_AddRefs(sheet));
NS_ENSURE_TRUE(sheet, rv);
rv = agentSheets.AppendObject(sheet);