Closed
Bug 66308
Opened 24 years ago
Closed 24 years ago
[embed] XPIDL'ize transaction manager
Categories
(Core :: DOM: Editor, defect, P1)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: rubydoo123, Assigned: kinmoz)
References
Details
(Keywords: embed)
Attachments
(3 files)
1.29 KB,
text/plain
|
Details | |
144.11 KB,
patch
|
Details | Diff | Splinter Review | |
12.38 KB,
patch
|
Details | Diff | Splinter Review |
task: XPIDL'ize transaction manager
Reporter | ||
Updated•24 years ago
|
Accepting bug.
Status: NEW → ASSIGNED
Summary: [embed] XPIL'ize transaction manager → [embed] XPIDL'ize transaction manager
I just attatched the diffs for the 70+ files I touched while XPIDL'izing the TransactionManager. Below, you'll find the details of what I've done, as well as a list of all the files I've touched. Can I get an r/sr from jfrancis and sfraser for the editor, and perhaps an r/sr from bienvenu, mscott, or sspitzer for the mailnews portion? ======================================================================== What I did: ======================================================================== * nsITransaction, nsITransactionListenter, nsITransactionManager have been XPIDL'ized and moved into mozilla/editor/txmgr/idl. * Renamed Do(), Undo(), and Redo() to DoTransaction(), UndoTransaction(), and RedoTransaction() to avoid reserved word problems in languages like JS. * PeekUndoStack() and PeekRedoStack() now return an AddRef'd pointer. * Removed GetUndoString(), GetRedoString() and Write() from the nsITransaction interface. Neither editor or mailnews really made use of these methods. * Removed Write() from the nsITransactionManager.cpp interface. * Added support for nsITransactionList to nsITransactionManager to allow access to transactions on the Undo and Redo stacks, as well as auto-aggregated transactions. * Removed all references to nsITransactionDescription from txmgr and editor. * Added nsPIEditorTransaction and made all Editor internal transactions inherit from it so we can distinguish between our transactions and ones from 3rd parties. ======================================================================== New files already checked in but not part of the build: ======================================================================== editor/txmgr/idl/nsITransaction.idl editor/txmgr/idl/nsITransactionList.idl editor/txmgr/idl/nsITransactionListener.idl editor/txmgr/idl/nsITransactionManager.idl editor/txmgr/src/nsITransactionList.cpp editor/txmgr/src/nsITransactionList.h ======================================================================== Need to CVS add these files: ======================================================================== editor/idl/nsPIEditorTransaction.idl ======================================================================== Need to CVS remove these files: ======================================================================== editor/txmgr/public/nsITransaction.h editor/txmgr/public/nsITransactionListener.h editor/txmgr/public/nsITransactionManager.h editor/txmgr/idl/nsITransactionDescription.h ======================================================================== Need to checkin modifications for these files: ======================================================================== editor/Makefile.in editor/makefile.win editor/base/ChangeAttributeTxn.cpp editor/base/ChangeAttributeTxn.h editor/base/CreateElementTxn.cpp editor/base/CreateElementTxn.h editor/base/DeleteElementTxn.cpp editor/base/DeleteElementTxn.h editor/base/DeleteRangeTxn.cpp editor/base/DeleteRangeTxn.h editor/base/DeleteTextTxn.cpp editor/base/DeleteTextTxn.h editor/base/EditAggregateTxn.cpp editor/base/EditAggregateTxn.h editor/base/EditTxn.cpp editor/base/EditTxn.h editor/base/IMECommitTxn.cpp editor/base/IMECommitTxn.h editor/base/IMETextTxn.cpp editor/base/IMETextTxn.h editor/base/InsertElementTxn.cpp editor/base/InsertElementTxn.h editor/base/InsertTextTxn.cpp editor/base/InsertTextTxn.h editor/base/JoinElementTxn.cpp editor/base/JoinElementTxn.h editor/base/nsEditor.cpp editor/base/nsEditorShell.cpp editor/base/nsEditorShell.h editor/base/nsEditorTxnLog.cpp editor/base/nsStyleSheetTxns.cpp editor/base/nsStyleSheetTxns.h editor/base/PlaceholderTxn.cpp editor/base/PlaceholderTxn.h editor/base/SetDocTitleTxn.cpp editor/base/SetDocTitleTxn.h editor/base/SplitElementTxn.cpp editor/base/SplitElementTxn.h editor/idl/Makefile.in editor/idl/makefile.win editor/idl/MANIFEST editor/idl/nsIEditorShell.idl editor/macbuild/EditorIDL.mcp editor/txmgr/idl/Makefile.in editor/txmgr/idl/makefile.win editor/txmgr/idl/MANIFEST editor/txmgr/idl/nsITransactionManager.idl editor/txmgr/macbuild/txmgr.mcp editor/txmgr/macbuild/txmgrIDL.mcp editor/txmgr/public/Makefile.in editor/txmgr/public/makefile.win editor/txmgr/public/MANIFEST editor/txmgr/src/Makefile.in editor/txmgr/src/makefile.win editor/txmgr/src/nsTransactionItem.cpp editor/txmgr/src/nsTransactionItem.h editor/txmgr/src/nsTransactionList.cpp editor/txmgr/src/nsTransactionList.h editor/txmgr/src/nsTransactionManager.cpp editor/txmgr/src/nsTransactionManager.h editor/txmgr/src/nsTransactionManagerFactory.cpp editor/txmgr/src/nsTransactionStack.cpp editor/txmgr/src/nsTransactionStack.h editor/txmgr/src.SAVE/Makefile.in editor/txmgr/src.SAVE/makefile.win editor/txmgr/src.SAVE/nsTransactionItem.cpp editor/txmgr/src.SAVE/nsTransactionItem.h editor/txmgr/src.SAVE/nsTransactionManager.cpp editor/txmgr/src.SAVE/nsTransactionManager.h editor/txmgr/src.SAVE/nsTransactionManagerFactory.cpp editor/txmgr/src.SAVE/nsTransactionStack.cpp editor/txmgr/src.SAVE/nsTransactionStack.h editor/txmgr/tests/TestTXMgr.cpp editor/ui/composer/content/EditorCommandsDebug.js editor/ui/composer/content/editorOverlay.xul editor/ui/composer/locale/en-US/editorOverlay.dtd mailnews/base/src/nsMessenger.cpp mailnews/base/util/nsMsgTxn.cpp mailnews/base/util/nsMsgTxn.h mailnews/imap/src/nsImapMailFolder.cpp mailnews/imap/src/nsImapUndoTxn.cpp mailnews/imap/src/nsImapUndoTxn.h mailnews/local/src/nsLocalMailFolder.cpp mailnews/local/src/nsLocalUndoTxn.cpp mailnews/local/src/nsLocalUndoTxn.h
Adding "FIX IN HAND" to status whiteboard.
Whiteboard: FIX IN HAND, waiting for reviews
Comment 8•24 years ago
|
||
Comments: + if (PR_FALSE==mRemoveAttribute) If you like this style, fine. If you're using it as a holdover from the days when most layout folks were ex-Java, then please don't use it ;) NS_IMETHODIMP EditTxn::QueryInterface(REFNSIID aIID, void** aInstancePtr) can we use the macro for QI? if (gNoisy) { printf("%p Undo Insert Element of %p into parent %p at offset %d\n", this, mNode.get(), mParent.get(), mOffset); } have we *ever* used gNoisy logging? Should we just remove this? It's not #ifdef DEBUG, note. nsresult +nsTransactionStack::GetItem(PRInt32 aIndex, nsTransactionItem **aTransaction) +{ + if (!aTransaction) + return NS_ERROR_NULL_POINTER; + + if (aIndex < 0 || aIndex >= mQue.GetSize()) + return NS_ERROR_FAILURE; + + *aTransaction = (nsTransactionItem *)(mQue.ObjectAt(aIndex)); + + return NS_OK; +} Comment that mQue.ObjectAt(aIndex) AddRefs here. Does it? Where is nsITransaction.idl ? Index: mailnews/base/util/nsMsgTxn.h: Can't you use the macro from the .h file to declare the methods? sr=sfraser if you fix the stuff that isn't stylistic or not code that you changed.
Comment 9•24 years ago
|
||
sr=mscott for the mailnews diffs.
Comment 10•24 years ago
|
||
r=jfrancis for editor/base stuff
Assignee | ||
Comment 11•24 years ago
|
||
Fix checked into TRUNK. New files checked in: editor/txmgr/idl/nsITransaction.idl editor/txmgr/idl/nsITransactionList.idl editor/txmgr/idl/nsITransactionListener.idl editor/txmgr/idl/nsITransactionManager.idl editor/txmgr/src/nsITransactionList.cpp editor/txmgr/src/nsITransactionList.h editor/idl/nsPIEditorTransaction.idl Files that were CVS removed: editor/txmgr/public/nsITransaction.h editor/txmgr/public/nsITransactionListener.h editor/txmgr/public/nsITransactionManager.h editor/txmgr/idl/nsITransactionDescription.h editor/base/IMECommitTxn.cpp editor/base/IMECommitTxn.h Files modified: editor/Makefile.in editor/makefile.win editor/base/ChangeAttributeTxn.cpp editor/base/ChangeAttributeTxn.h editor/base/CreateElementTxn.cpp editor/base/CreateElementTxn.h editor/base/DeleteElementTxn.cpp editor/base/DeleteElementTxn.h editor/base/DeleteRangeTxn.cpp editor/base/DeleteRangeTxn.h editor/base/DeleteTextTxn.cpp editor/base/DeleteTextTxn.h editor/base/EditAggregateTxn.cpp editor/base/EditAggregateTxn.h editor/base/EditTxn.cpp editor/base/EditTxn.h editor/base/IMECommitTxn.cpp editor/base/IMECommitTxn.h editor/base/IMETextTxn.cpp editor/base/IMETextTxn.h editor/base/InsertElementTxn.cpp editor/base/InsertElementTxn.h editor/base/InsertTextTxn.cpp editor/base/InsertTextTxn.h editor/base/JoinElementTxn.cpp editor/base/JoinElementTxn.h editor/base/nsEditor.cpp editor/base/nsEditorShell.cpp editor/base/nsEditorShell.h editor/base/nsEditorTxnLog.cpp editor/base/nsStyleSheetTxns.cpp editor/base/nsStyleSheetTxns.h editor/base/PlaceholderTxn.cpp editor/base/PlaceholderTxn.h editor/base/SetDocTitleTxn.cpp editor/base/SetDocTitleTxn.h editor/base/SplitElementTxn.cpp editor/base/SplitElementTxn.h editor/idl/Makefile.in editor/idl/makefile.win editor/idl/MANIFEST editor/idl/nsIEditorShell.idl editor/macbuild/editor.mcp editor/macbuild/EditorIDL.mcp editor/txmgr/idl/Makefile.in editor/txmgr/idl/makefile.win editor/txmgr/idl/MANIFEST editor/txmgr/idl/nsITransactionManager.idl editor/txmgr/macbuild/txmgr.mcp editor/txmgr/macbuild/txmgrIDL.mcp editor/txmgr/public/Makefile.in editor/txmgr/public/makefile.win editor/txmgr/public/MANIFEST editor/txmgr/src/Makefile.in editor/txmgr/src/makefile.win editor/txmgr/src/nsTransactionItem.cpp editor/txmgr/src/nsTransactionItem.h editor/txmgr/src/nsTransactionList.cpp editor/txmgr/src/nsTransactionList.h editor/txmgr/src/nsTransactionManager.cpp editor/txmgr/src/nsTransactionManager.h editor/txmgr/src/nsTransactionManagerFactory.cpp editor/txmgr/src/nsTransactionStack.cpp editor/txmgr/src/nsTransactionStack.h editor/txmgr/tests/TestTXMgr.cpp editor/ui/composer/content/EditorCommandsDebug.js editor/ui/composer/content/editorOverlay.xul editor/ui/composer/locale/en-US/editorOverlay.dtd mailnews/base/src/nsMessenger.cpp mailnews/base/util/nsMsgTxn.cpp mailnews/base/util/nsMsgTxn.h mailnews/imap/src/nsImapMailFolder.cpp mailnews/imap/src/nsImapUndoTxn.cpp mailnews/imap/src/nsImapUndoTxn.h mailnews/local/src/nsLocalMailFolder.cpp mailnews/local/src/nsLocalUndoTxn.cpp mailnews/local/src/nsLocalUndoTxn.h
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: FIX IN HAND, waiting for reviews
Assignee | ||
Comment 12•24 years ago
|
||
Sujay, you can verify that these changes are in by running: mozilla.exe -console and doing some edits in a composer. There are 2 options under the Debug menu that allow you to Dump the transactions that are on the Undo/Redo stacks.
Comment 13•23 years ago
|
||
Kin, can you verify this one and mark verified-fixed ? thanks..
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•