Bug 1014246 - Don't drop the newline handling preference for the editor on the floor when it gets reinitialized; r=roc

This commit is contained in:
Ehsan Akhgari 2014-05-22 18:06:44 -04:00
Родитель 7d16e0f268
Коммит 1059d7a2eb
1 изменённых файлов: 4 добавлений и 5 удалений

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

@ -80,7 +80,10 @@ nsPlaintextEditor::nsPlaintextEditor()
, mCaretStyle(0)
#endif
{
}
// check the "single line editor newline handling"
// and "caret behaviour in selection" prefs
GetDefaultEditorPrefs(mNewlineHandling, mCaretStyle);
}
nsPlaintextEditor::~nsPlaintextEditor()
{
@ -135,10 +138,6 @@ NS_IMETHODIMP nsPlaintextEditor::Init(nsIDOMDocument *aDoc,
res = nsEditor::Init(aDoc, aRoot, aSelCon, aFlags, aInitialValue);
}
// check the "single line editor newline handling"
// and "caret behaviour in selection" prefs
GetDefaultEditorPrefs(mNewlineHandling, mCaretStyle);
NS_ENSURE_SUCCESS(rulesRes, rulesRes);
// mRules may not have been initialized yet, when this is called via