shuffled around the responsibilities of core editing objects.
The key listener is now mostly a mapper of key events to editor actions. Soon, this should be 100% true. The editor builds transactions that are themselves intelligent. The editor makes very few DOM calls itself. It relies on the transactions to do most of the actual editing. git-svn-id: svn://10.0.0.236/trunk@17518 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
#include "SplitElementTxn.h"
|
||||
#include "editor.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
// note that aEditor is not refcounted
|
||||
@@ -55,7 +54,7 @@ nsresult SplitElementTxn::Do(void)
|
||||
// insert the new node
|
||||
if ((NS_SUCCEEDED(result)) && (nsnull!=mParent))
|
||||
{
|
||||
result = EditTxn::SplitNode(mNode, mOffset, mNewNode, mParent);
|
||||
result = mEditor->SplitNode(mNode, mOffset, mNewNode, mParent);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@@ -64,13 +63,13 @@ nsresult SplitElementTxn::Do(void)
|
||||
nsresult SplitElementTxn::Undo(void)
|
||||
{
|
||||
// this assumes Do inserted the new node in front of the prior existing node
|
||||
nsresult result = EditTxn::JoinNodes(mNode, mNewNode, mParent, PR_FALSE);
|
||||
nsresult result = mEditor->JoinNodes(mNode, mNewNode, mParent, PR_FALSE);
|
||||
return result;
|
||||
}
|
||||
|
||||
nsresult SplitElementTxn::Redo(void)
|
||||
{
|
||||
nsresult result = EditTxn::SplitNode(mNode, mOffset, mNewNode, mParent);
|
||||
nsresult result = mEditor->SplitNode(mNode, mOffset, mNewNode, mParent);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user