Bug 372345 - Part 2: Port the fix from bug 289384 to make sure that the editor gets reconstructed correctly when navigating back to an editable page; r=bzbarsky a=blocking-final+

--HG--
extra : rebase_source : 6f92f02d129ca03b6171377eaf6b37a4a9a3325b
This commit is contained in:
Ehsan Akhgari 2010-10-31 16:10:22 -04:00
Родитель 43504a4257
Коммит dbfb7c58c2
1 изменённых файлов: 6 добавлений и 4 удалений

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

@ -3311,10 +3311,6 @@ nsHTMLDocument::EditingStateChanged()
rv = agentSheets.AppendObject(sheet);
NS_ENSURE_SUCCESS(rv, rv);
// We need to flush styles here because we're setting an XBL binding in
// designmode.css.
FlushPendingNotifications(Flush_Style);
// Disable scripting and plugins.
rv = editSession->DisableJSAndPlugins(window);
NS_ENSURE_SUCCESS(rv, rv);
@ -3340,6 +3336,12 @@ nsHTMLDocument::EditingStateChanged()
NS_ENSURE_SUCCESS(rv, rv);
presShell->ReconstructStyleData();
if (designMode) {
// We need to flush styles here because we're setting an XBL binding in
// designmode.css.
FlushPendingNotifications(Flush_Style);
}
}
mEditingState = newState;