summaryrefslogtreecommitdiffstats
path: root/dom/events/test/test_bug822898.html
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-05-22 11:02:24 -0400
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-06-27 02:20:04 +0200
commit016313d559f71ba0d269e54b6c6e60dbe1e63280 (patch)
treea9ab72f757bbd8e3872019214434071a132fbc54 /dom/events/test/test_bug822898.html
parent1fa428a7898b213149cc4737a71e79aeb18d60cc (diff)
downloadUXP-016313d559f71ba0d269e54b6c6e60dbe1e63280.tar
UXP-016313d559f71ba0d269e54b6c6e60dbe1e63280.tar.gz
UXP-016313d559f71ba0d269e54b6c6e60dbe1e63280.tar.lz
UXP-016313d559f71ba0d269e54b6c6e60dbe1e63280.tar.xz
UXP-016313d559f71ba0d269e54b6c6e60dbe1e63280.zip
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 'dom/events/test/test_bug822898.html')
0 files changed, 0 insertions, 0 deletions