`SetEditMode` should not use `editor.transactionManager.maxTransactionCount` to disable undo temporarily and clear undo stack
Categories
(SeaMonkey :: Composer, defect)
Tracking
(seamonkey2.53 unaffected)
Tracking | Status | |
---|---|---|
seamonkey2.53 | --- | unaffected |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(1 file)
(deleted),
patch
|
frg
:
review+
|
Details | Diff | Splinter Review |
// Reduce the undo count so we don't use too much memory
// during multiple uses of source window
// (reinserting entire doc caches all nodes)
try {
editor.transactionManager.maxTransactionCount = 1;
} catch (e) {}
// Restore unlimited undo count
try {
editor.transactionManager.maxTransactionCount = -1;
} catch (e) {}
These blocks are performed before and after updating the WYSIWYG editor for newer source code. However, I don't understand it wants to keep undoable only the updating.
I'll remove nsIEditor.transactionManager
in bug 1768315, therefore, SeaMonkey needs to replace them with a call of editor.enableUndo(false)
and editor.enableUndo(true)
. Then, the calls of the XHTML path between them are not necessary.
Assignee | ||
Comment 1•2 years ago
|
||
Bug 1792764 - Make comm-central stop using nsIEditor.transactionManager
since it'll be removed
nsIEditor.transactionManager
will be removed soon and its user is now only
SeaMonkey which want it to clear undo/redo transactions of editors. For doing
that, we can use nsIEditor.clearUndoRedo()
now.
Note that the purpose of ExecuteJSTransactionViaTxmgr()
will be invalid
after nsIEditor.transactionManager
is removed. Therefore, this patch removes
it and the UI to run it too.
Comment 2•2 years ago
|
||
Comment on attachment 9299713 [details] [diff] [review]
Patch
LGTM. Thanks. There are a few minor formatting issues I have with some if the comments and I would like to keep the locale variable for the release branch but I will fix this up for check-in.
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Thank you. I'll remove transactionManager
of nsIEditor
soon in m-c.
Assignee | ||
Comment 4•2 years ago
|
||
Hi, I'll land https://phabricator.services.mozilla.com/D160008 in a couple of days. Land the patch as soon as possible.
Comment 5•2 years ago
|
||
Thaks for the heads up. I will put it in our build patches queue for wip stuff till I land it. No need to delay the removal.
Assignee | ||
Comment 6•2 years ago
|
||
Thank you. I'll land it.
Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/c693be030e90
Make suite stop using nsIEditor.transactionManager. r=frg
Description
•