This patch corresponds to: * https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/HTMLEditSubActionHandler.cpp#3525-3543 * https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/HTMLEditSubActionHandler.cpp#2710-2719 * https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/HTMLEditSubActionHandler.cpp#4140-4165 * https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/HTMLEditSubActionHandler.cpp#5650-5716 * https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/WSRunObject.cpp#97-213 * https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/WSRunObject.cpp#218-386 * https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/WSRunObject.cpp#391-480 In `WSRunObject.cpp`, joining 2 blocks code is split to 3 methods, they are for: 1. left block element is an ancestor of right block element 2. right block element is an ancestor of left block element 3. left block element and right block element are siblings The reason why they are split to is, they need to move descendants of child block element or right block element with different logic. However, this difference is not a big problem when we compute target ranges because only the difference is where we need to check whether there are invisible white- spaces. Therefore, this patch creates only a utility method in `WSRunScanner` and makes `AutoInclusiveAncestorBlockElementsJoiner::ComputeRangesToDelete()` much simpler than `AutoInclusiveAncestorBlockElementsJoiner::Run()`. Differential Revision: https://phabricator.services.mozilla.com/D89278