gecko-dev/editor/libeditor
Masayuki Nakano 620c728792 Bug 1658702 - part 10: Implement a path to compute target ranges when joining 2 blocks from current block boundary r=m_kato
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
2020-09-11 06:24:08 +00:00
..
crashtests Bug 1663370 - part 8: Make AutoInclusiveAncestorBlockElementsJoiner::Prepare() scan preceding invisible <br> element r=m_kato 2020-09-14 13:35:42 +00:00
tests Bug 1663797 - Make delete handler of HTMLEditor not try to join <html>, <head> and <body> r=m_kato 2020-09-15 07:33:58 +00:00
ChangeAttributeTransaction.cpp
ChangeAttributeTransaction.h Bug 1632021 - part 1: Add GetAs*Transaction() methods to every subclasses of EditTransactionBase r=m_kato 2020-04-23 05:46:43 +00:00
ChangeStyleTransaction.cpp Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
ChangeStyleTransaction.h Bug 1632021 - part 1: Add GetAs*Transaction() methods to every subclasses of EditTransactionBase r=m_kato 2020-04-23 05:46:43 +00:00
CompositionTransaction.cpp Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki 2020-09-03 03:45:26 +00:00
CompositionTransaction.h Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp 2020-07-23 14:51:46 +00:00
CreateElementTransaction.cpp Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki 2020-09-03 03:45:26 +00:00
CreateElementTransaction.h Bug 1632021 - part 1: Add GetAs*Transaction() methods to every subclasses of EditTransactionBase r=m_kato 2020-04-23 05:46:43 +00:00
CSSEditUtils.cpp Bug 1660378 - part 7: Make CSSEditUtils::SetCSSEquivalentToHTMLStyle() take nsStyledElement& instead of Element* r=m_kato 2020-08-26 04:48:32 +00:00
CSSEditUtils.h Bug 1660378 - part 7: Make CSSEditUtils::SetCSSEquivalentToHTMLStyle() take nsStyledElement& instead of Element* r=m_kato 2020-08-26 04:48:32 +00:00
DeleteNodeTransaction.cpp Bug 1644903 - Make nsINode::InsertBefore() callers call ErrorResult::WouldReportJSException() when inserting node may be in another document r=m_kato 2020-07-01 13:13:13 +00:00
DeleteNodeTransaction.h Bug 1632724 - part 5: Remove out params of EditorBase::CreateTransactionForDelete*() r=m_kato 2020-04-27 01:36:02 +00:00
DeleteRangeTransaction.cpp Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki 2020-09-03 03:45:26 +00:00
DeleteRangeTransaction.h Bug 1634663: part 2) Declare callers of GetRangeAt around EditorBase const. r=masayuki 2020-05-02 23:44:46 +00:00
DeleteTextTransaction.cpp Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki 2020-09-03 03:45:26 +00:00
DeleteTextTransaction.h Bug 1632724 - part 5: Remove out params of EditorBase::CreateTransactionForDelete*() r=m_kato 2020-04-27 01:36:02 +00:00
EditAction.h Bug 1449522 - Remove nsIEditorStyleSheets. r=masayuki,m_kato 2020-04-17 22:54:48 +00:00
EditActionListener.h
EditAggregateTransaction.cpp Bug 1626570 - Improve handling of copying arrays in editor/. r=m_kato 2020-05-06 11:15:49 +00:00
EditAggregateTransaction.h Bug 1632724 - part 5: Remove out params of EditorBase::CreateTransactionForDelete*() r=m_kato 2020-04-27 01:36:02 +00:00
EditorBase.cpp Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki 2020-09-03 03:45:26 +00:00
EditorBase.h Bug 1658702 - part 4: Make AutoDeleteRangesHandler::ComputeRangesToDelete() extend collapsed ranges for deleting adjacent character or word or the line r=m_kato 2020-09-01 02:04:02 +00:00
EditorCommands.cpp Bug 1633014 - Fix non-unified build errors in editor/. r=m_kato 2020-04-27 03:36:57 +00:00
EditorCommands.h Bug 1633014 - Fix non-unified build errors in editor/. r=m_kato 2020-04-27 03:36:57 +00:00
EditorController.cpp
EditorController.h
EditorDOMPoint.h Bug 1660378 - part 9: Avoid QI for getting nsStyledElement pointer r=smaug 2020-08-26 05:29:06 +00:00
EditorEventListener.cpp Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj 2020-07-01 08:34:12 +00:00
EditorEventListener.h Bug 1633014 - Fix non-unified build errors in editor/. r=m_kato 2020-04-27 03:36:57 +00:00
EditorUtils.cpp Bug 1658702 - part 8: Add AutoDeleteRangesHandler::ComputeRangesToDeleteAtomicContent() to compute atomic content deleting target range r=m_kato 2020-09-07 04:59:22 +00:00
EditorUtils.h Bug 1658702 - part 8: Add AutoDeleteRangesHandler::ComputeRangesToDeleteAtomicContent() to compute atomic content deleting target range r=m_kato 2020-09-07 04:59:22 +00:00
EditTransactionBase.cpp Bug 1639161 - part 1: Create ReplaceTextTransaction class r=m_kato 2020-05-21 02:30:09 +00:00
EditTransactionBase.h Bug 1639161 - part 1: Create ReplaceTextTransaction class r=m_kato 2020-05-21 02:30:09 +00:00
HTMLAbsPositionEditor.cpp Bug 1660378 - part 9: Avoid QI for getting nsStyledElement pointer r=smaug 2020-08-26 05:29:06 +00:00
HTMLAnonymousNodeEditor.cpp Bug 1660378 - part 6: Make CSSEditUtils::SetCSSProperty() and its callers take nsStyledElement& instead of Element& r=m_kato 2020-08-26 04:48:28 +00:00
HTMLEditor.cpp Bug 1664699 - Remove unused HTMLEditor::GetHTMLDocument method r=masayuki 2020-09-14 01:54:33 +00:00
HTMLEditor.h Bug 1663370 - part 6: Create a method to check whether HTMLEditor::MoveOneHardLineContents() returns "handled" or "canceled" r=m_kato 2020-09-14 10:54:42 +00:00
HTMLEditorCommands.cpp Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
HTMLEditorController.cpp
HTMLEditorController.h
HTMLEditorDataTransfer.cpp Bug 1664411 - Factor out a condition to unconditionally enable clipboard events in some documents. r=masayuki 2020-09-11 11:08:35 +00:00
HTMLEditorDocumentCommands.cpp Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
HTMLEditorEventListener.cpp Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki 2020-09-03 03:45:26 +00:00
HTMLEditorEventListener.h Bug 1632425 - Part 3: Triple click to select anchors r=masayuki 2020-06-03 23:47:55 +00:00
HTMLEditorObjectResizer.cpp Bug 1660378 - part 9: Avoid QI for getting nsStyledElement pointer r=smaug 2020-08-26 05:29:06 +00:00
HTMLEditSubActionHandler.cpp Bug 1658702 - part 10: Implement a path to compute target ranges when joining 2 blocks from current block boundary r=m_kato 2020-09-11 06:24:08 +00:00
HTMLEditUtils.cpp Bug 1658702 - part 2: Make AutoDeleteRangesHandler::ComputeRangesToDelete() handle the case deleting empty ancestor(s) r=m_kato 2020-09-01 02:02:50 +00:00
HTMLEditUtils.h Bug 1658702 - part 2: Make AutoDeleteRangesHandler::ComputeRangesToDelete() handle the case deleting empty ancestor(s) r=m_kato 2020-09-01 02:02:50 +00:00
HTMLInlineTableEditor.cpp Bug 1660378 - part 9: Avoid QI for getting nsStyledElement pointer r=smaug 2020-08-26 05:29:06 +00:00
HTMLStyleEditor.cpp Bug 1660378 - part 9: Avoid QI for getting nsStyledElement pointer r=smaug 2020-08-26 05:29:06 +00:00
HTMLTableEditor.cpp Bug 1659276 - Make AutoPlaceholderBatch choose whether do or do not ScrollSelectionIntoView r=m_kato 2020-08-24 06:39:50 +00:00
InsertNodeTransaction.cpp Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki 2020-09-03 03:45:26 +00:00
InsertNodeTransaction.h Bug 1632021 - part 1: Add GetAs*Transaction() methods to every subclasses of EditTransactionBase r=m_kato 2020-04-23 05:46:43 +00:00
InsertTextTransaction.cpp Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki 2020-09-03 03:45:26 +00:00
InsertTextTransaction.h Bug 1632021 - part 4: Get rid of IID of InsertTextTransaction and CompositionTransaction r=m_kato 2020-04-23 12:28:39 +00:00
InternetCiter.cpp Bug 1642594 - part 4: Stop using "whitespace" in under libeditor r=m_kato 2020-06-10 13:44:10 +00:00
InternetCiter.h
JoinNodeTransaction.cpp Bug 1644903 - Make nsINode::InsertBefore() callers call ErrorResult::WouldReportJSException() when inserting node may be in another document r=m_kato 2020-07-01 13:13:13 +00:00
JoinNodeTransaction.h Bug 1540037 - part 10: Move EditorBase::DoJoinNodes() to HTMLEditor r=m_kato 2020-04-30 15:26:09 +00:00
ManualNAC.h Bug 1640601 - Also reframe the closest non-anonymous root when switching anonymous content from display: none to something else. r=mats 2020-05-25 23:54:10 +00:00
moz.build Bug 1639161 - part 1: Create ReplaceTextTransaction class r=m_kato 2020-05-21 02:30:09 +00:00
PlaceholderTransaction.cpp Bug 1632021 - part 3: Get rid of nsIAbsorbingTransaction r=m_kato 2020-04-23 10:46:55 +00:00
PlaceholderTransaction.h Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp 2020-07-23 14:51:46 +00:00
ReplaceTextTransaction.cpp Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki 2020-09-03 03:45:26 +00:00
ReplaceTextTransaction.h Bug 1639161 - part 1: Create ReplaceTextTransaction class r=m_kato 2020-05-21 02:30:09 +00:00
SelectionState.cpp Bug 1639161 - part 1: Create ReplaceTextTransaction class r=m_kato 2020-05-21 02:30:09 +00:00
SelectionState.h Bug 1656799 - part 2: Create range tracker r=m_kato 2020-08-08 02:57:16 +00:00
SplitNodeTransaction.cpp Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki 2020-09-03 03:45:26 +00:00
SplitNodeTransaction.h Bug 1540037 - part 9: Move EditorBase::DoSplitNode() to HTMLEditor r=m_kato 2020-04-30 13:33:40 +00:00
TextEditor.cpp Bug 1664411 - Factor out a condition to unconditionally enable clipboard events in some documents. r=masayuki 2020-09-11 11:08:35 +00:00
TextEditor.h Bug 1664411 - Factor out a condition to unconditionally enable clipboard events in some documents. r=masayuki 2020-09-11 11:08:35 +00:00
TextEditorDataTransfer.cpp Bug 1664411 - Factor out a condition to unconditionally enable clipboard events in some documents. r=masayuki 2020-09-11 11:08:35 +00:00
TextEditSubActionHandler.cpp Bug 1623413 - Part 2: Rename Collapse() to CollapseInLimiter() r=masayuki 2020-09-03 03:45:26 +00:00
TypeInState.cpp Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj 2020-06-10 10:46:14 +00:00
TypeInState.h
WSRunObject.cpp Bug 1658702 - part 10: Implement a path to compute target ranges when joining 2 blocks from current block boundary r=m_kato 2020-09-11 06:24:08 +00:00
WSRunObject.h Bug 1658702 - part 10: Implement a path to compute target ranges when joining 2 blocks from current block boundary r=m_kato 2020-09-11 06:24:08 +00:00