diff options
Diffstat (limited to 'editor/libeditor/HTMLEditRules.h')
-rw-r--r-- | editor/libeditor/HTMLEditRules.h | 54 |
1 files changed, 24 insertions, 30 deletions
diff --git a/editor/libeditor/HTMLEditRules.h b/editor/libeditor/HTMLEditRules.h index 6cdfa57cf..5525fdf24 100644 --- a/editor/libeditor/HTMLEditRules.h +++ b/editor/libeditor/HTMLEditRules.h @@ -28,6 +28,7 @@ class nsRange; namespace mozilla { +class EditActionResult; class HTMLEditor; class RulesInfo; class TextEditor; @@ -173,20 +174,16 @@ protected: * placing its children into leftblock. DTD containment rules are followed * throughout. * - * @param aCanceled returns true if the operation should do nothing anymore - * even if this doesn't join the blocks. - * NOTE: When this returns an error, nobody should refer - * the result of this. - * @param aHandled returns true if this actually handles the request. - * Note that this may return true even if this does not - * join the block. E.g., if the blocks shouldn't be - * joined or it's impossible to join them but it's not + * @return Sets canceled to true if the operation should do + * nothing anymore even if this doesn't join the blocks. + * Sets handled to true if this actually handles the + * request. Note that this may set it to true even if this + * does not join the block. E.g., if the blocks shouldn't + * be joined or it's impossible to join them but it's not * unexpected case, this returns true with this. - * NOTE: When this returns an error, nobody should refer - * the result of this. */ - nsresult TryToJoinBlocks(nsIContent& aLeftNode, nsIContent& aRightNode, - bool* aCanceled, bool* aHandled); + EditActionResult TryToJoinBlocks(nsIContent& aLeftNode, + nsIContent& aRightNode); /** * MoveBlock() moves the content from aRightBlock starting from aRightOffset @@ -194,39 +191,36 @@ protected: * between <br>s, or between blocks, etc. DTD containment rules are followed * throughout. * - * @param aHandled returns true if this actually joins the nodes. - * NOTE: When this returns an error, nobody should refer - * the result of this. + * @return Sets handled to true if this actually joins the nodes. + * canceled is always false. */ - nsresult MoveBlock(Element& aLeftBlock, Element& aRightBlock, - int32_t aLeftOffset, int32_t aRightOffset, - bool* aHandled); + EditActionResult MoveBlock(Element& aLeftBlock, Element& aRightBlock, + int32_t aLeftOffset, int32_t aRightOffset); /** * MoveNodeSmart() moves aNode to (aDestElement, aInOutDestOffset). * DTD containment rules are followed throughout. * * @param aOffset returns the point after inserted content. - * @param aHandled returns true if this actually moves the - * nodes. - * NOTE: When this returns an error, nobody - * should refer the result of this. + * @return Sets true to handled if this actually moves + * the nodes. + * canceled is always false. */ - nsresult MoveNodeSmart(nsIContent& aNode, Element& aDestElement, - int32_t* aInOutDestOffset, bool* aHandled); + EditActionResult MoveNodeSmart(nsIContent& aNode, Element& aDestElement, + int32_t* aInOutDestOffset); /** * MoveContents() moves the contents of aElement to (aDestElement, * aInOutDestOffset). DTD containment rules are followed throughout. * * @param aInOutDestOffset updated to point after inserted content. - * @param aHandled returns true if this actually moves the - * nodes. - * NOTE: When this returns an error, nobody - * should refer the result of this. + * @return Sets true to handled if this actually moves + * the nodes. + * canceled is always false. */ - nsresult MoveContents(Element& aElement, Element& aDestElement, - int32_t* aInOutDestOffset, bool* aHandled); + EditActionResult MoveContents(Element& aElement, Element& aDestElement, + int32_t* aInOutDestOffset); + nsresult DeleteNonTableElements(nsINode* aNode); nsresult WillMakeList(Selection* aSelection, const nsAString* aListType, |