summaryrefslogtreecommitdiff
path: root/editor/nsIEditorUtils.idl
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-05-22 11:02:24 -0400
committerGaming4JC <g4jc@hyperbola.info>2020-06-14 15:24:41 -0400
commitd8a29fcafbac78f1ab13ddd2f538177451289055 (patch)
tree9279b192f175930f757a1536052c59510dff0065 /editor/nsIEditorUtils.idl
parent68c72c12341b1462ce6c0e215a77a9ac0e64d789 (diff)
downloaduxp-d8a29fcafbac78f1ab13ddd2f538177451289055.tar.gz
Bug 1316302 - Part 1: Helper methods for HTMLEditRules::WillDeleteSelection() should have an out argument to indicates if it actually handles the action
When HTMLEditRules::WillDeleteSelection() tries to remove something from the end/start of a block to its last/first text node but it's contained by block elements, it tries to join the container and the block. However, JoinBlocks() always fails to join them since it's impossible operation. In this case, HTMLEditRules::WillDeleteSelection() should retry to remove something in the leaf, however, it's impossible for now because JoinBlocks() and its helper methods don't return if it handles the action actually. This patch renames |JoinBlocks()| to |TryToJoinBlocks()| for representing what it is. And this patch adds |bool* aHandled| to the helper methods. Then, *aHandled and *aCancel are now always returns the result of each method. Therefore, for merging the result of multiple helper methods, callers need to receive the result with temporary variables and merge them by themselves. Note that when they modify DOM node actually or the action should do nothing (for example, selection is across tables), aHandled is set to true. Tag #1563
Diffstat (limited to 'editor/nsIEditorUtils.idl')
0 files changed, 0 insertions, 0 deletions