mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
cc6346ffd2
commit
f434f2c01f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user