gecko-dev/editor/libeditor
Masayuki Nakano da0f19a5f3 Bug 1663370 - part 6: Create a method to check whether HTMLEditor::MoveOneHardLineContents() returns "handled" or "canceled" r=m_kato
Unfortunately, `HTMLEditor::MoveOneHardLineContents()`,
`HTMLEditor::MoveChildrenWithTransaction()` and
`HTMLEditor::MoveNodeOrChildrenWithTransaction()` return strict result whether
at least one node is moved or not.  Therefore, we need to scan the DOM tree
whether there is at least one content node which can be moved by them for
computing target ranges.

We cannot do same thing for ``HTMLEditor::MoveOneHardLineContents()` because
it split parent elements first and use `ContentSubtreeIterator` which lists
up topmost nodes which are completely in the range, but we need to compute
target ranges without splitting nodes at the range boundaries.  Therefore,
this patch checks whether the line containing specified point has content
except invisible `<br>` element.

The others are simple.  We can use same logic with them.

Finally, this adds `NS_ASSERTION()`s to check whether the computation is done
correctly at running any automated tests on debug build, and I don't see any
failure with them.

Depends on D89575

Differential Revision: https://phabricator.services.mozilla.com/D89576
2020-09-14 10:54:42 +00:00
..
crashtests Bug 1659717 - Make AutoSetTemporaryAncestorLimiter update cached ranges if selection limiter is updated r=m_kato 2020-08-24 08:54:56 +00:00
tests Bug 1664446. Properly wait to make sure any potential scroll events get fired in several tests. r=kats 2020-09-13 20:21:11 +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 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
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 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
WSRunObject.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