fune/editor/libeditor
Masayuki Nakano b6c7be1c68 Bug 1789344 - Make SelectionState::DidMoveNode track DOM points having pointed the moved content correctly r=m_kato
When selection is `abc<b>[def</b>]ghi`, `insertParagraph` command will delete
the `<b>` element first, then, `Selection` becomes `abc{}ghi`.  Then,
`HTMLEditor::InsertParagraphSeparatorAsSubAction` wraps all of the line in
the default paragraph, `<div>`, with
`HTMLEditor::FormatBlockContainerWithTransaction` (although this is incompatible
behavior with the other browsers).  At this time, new `<div>` is inserted before
the first text node and then, move the text nodes into the new `<div>`.

However, `RangeUpdater::DidMoveNode` just slides the offsets if containers of
registered DOM points are the ex-parent of the moving nodes.  Therefore, the
tracked selection range in `HTMLEditor::FormatBlockContainerWithTransaction`
become `<div></div>abc{}def`, then, `<div>abcdef</div>{}`, but the expected
behavior is of course, `<div>abc{}def</div>`, then, split the new `<div>`.

So the problem is, `DidMoveNode` assumes that DOM points won't point the moving
content node.  If the node is pointed, it should keep pointing in the new
parent.

Note that the expectations of new tests are based on Chrome, therefore, the
new known failures are incompatible with Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D156798
2022-09-12 23:53:37 +00:00
..
crashtests Bug 1774704 - part 6: Make HTMLEditor::HandleHTMLIndentAtSelectionInternal stop touching Selection directly and stop setting mNewBlockElement r=m_kato 2022-08-04 04:07:46 +00:00
tests Bug 1789345 - Make editor/libeditor/test_bug1318312.html easier to read r=m_kato 2022-09-07 01:06:47 +00:00
AutoRangeArray.cpp Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato 2022-08-09 01:43:24 +00:00
AutoRangeArray.h Bug 1775381 - Move AutoRangeArray from EditorUtils.h to its own header and cpp file r=m_kato 2022-08-04 05:39:16 +00:00
ChangeAttributeTransaction.cpp
ChangeAttributeTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
ChangeStyleTransaction.cpp
ChangeStyleTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
CompositionTransaction.cpp Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato 2022-08-09 01:43:24 +00:00
CompositionTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
CSSEditUtils.cpp Bug 1787680 - Part 2. Don't create CSSEditUtils instance. r=masayuki 2022-09-01 04:33:36 +00:00
CSSEditUtils.h Bug 1787680 - Part 2. Don't create CSSEditUtils instance. r=masayuki 2022-09-01 04:33:36 +00:00
DeleteNodeTransaction.cpp
DeleteNodeTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
DeleteRangeTransaction.cpp Bug 1764684 - part 2: Make editor use methods of EditorBase to collapse Selection r=m_kato 2022-04-20 14:36:52 +00:00
DeleteRangeTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
DeleteTextTransaction.cpp Bug 1764684 - part 2: Make editor use methods of EditorBase to collapse Selection r=m_kato 2022-04-20 14:36:52 +00:00
DeleteTextTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
EditAction.h Bug 1770877 - part 21: Get rid of HTMLEditor::SplitInlinesAndCollectEditTargetNodes r=m_kato 2022-06-21 01:07:10 +00:00
EditAggregateTransaction.cpp
EditAggregateTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
EditorBase.cpp Bug 1784192 - part 9: Rename TypeInState to PendingStyles r=m_kato 2022-08-26 03:31:26 +00:00
EditorBase.h Bug 1784192 - part 9: Rename TypeInState to PendingStyles r=m_kato 2022-08-26 03:31:26 +00:00
EditorCommands.cpp
EditorCommands.h Bug 1784192 - part 1: Change PropItem::tag to nsStaticAtom* r=m_kato 2022-08-26 03:10:30 +00:00
EditorController.cpp
EditorController.h
EditorDOMPoint.h Bug 1781994 - part 2: Make HTMLEditor::SplitAncestorStyledInlineElementsAtRangeEdges stop touching Selection directly r=m_kato 2022-08-16 00:08:07 +00:00
EditorEventListener.cpp Bug 1771448 - part 4: Rename HTMLEditor::GetActiveEditingHost to ComputeEditingHost r=m_kato 2022-05-31 03:41:01 +00:00
EditorEventListener.h Bug 1770874 - part 6: Move most part of EditorEventListener::Blur into EditorBase r=m_kato 2022-05-27 04:02:30 +00:00
EditorForwards.h Bug 1784192 - part 9: Rename TypeInState to PendingStyles r=m_kato 2022-08-26 03:31:26 +00:00
EditorUtils.cpp Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato 2022-08-09 01:43:24 +00:00
EditorUtils.h Bug 1775381 - Move AutoRangeArray from EditorUtils.h to its own header and cpp file r=m_kato 2022-08-04 05:39:16 +00:00
EditTransactionBase.cpp Bug 1766355 - part 1: Add MoveNodeTransaction to handle delete node and insert node in a transaction class instance r=m_kato 2022-05-20 08:28:08 +00:00
EditTransactionBase.h Bug 1766355 - part 1: Add MoveNodeTransaction to handle delete node and insert node in a transaction class instance r=m_kato 2022-05-20 08:28:08 +00:00
HTMLAbsPositionEditor.cpp Bug 1787680 - Part 2. Don't create CSSEditUtils instance. r=masayuki 2022-09-01 04:33:36 +00:00
HTMLAnonymousNodeEditor.cpp Bug 1787680 - Part 2. Don't create CSSEditUtils instance. r=masayuki 2022-09-01 04:33:36 +00:00
HTMLEditHelpers.cpp Bug 1770877 - part 2: Make HTMLEditor::SplitRangeOffFromBlock stop touching Selection directly r=m_kato 2022-06-15 23:38:54 +00:00
HTMLEditHelpers.h Bug 1784192 - part 1: Change PropItem::tag to nsStaticAtom* r=m_kato 2022-08-26 03:10:30 +00:00
HTMLEditor.cpp Bug 1787680 - Part 2. Don't create CSSEditUtils instance. r=masayuki 2022-09-01 04:33:36 +00:00
HTMLEditor.h Bug 1787680 - Part 2. Don't create CSSEditUtils instance. r=masayuki 2022-09-01 04:33:36 +00:00
HTMLEditorCommands.cpp Bug 1784192 - part 1: Change PropItem::tag to nsStaticAtom* r=m_kato 2022-08-26 03:10:30 +00:00
HTMLEditorController.cpp
HTMLEditorController.h
HTMLEditorDataTransfer.cpp Bug 1784192 - part 9: Rename TypeInState to PendingStyles r=m_kato 2022-08-26 03:31:26 +00:00
HTMLEditorDeleteHandler.cpp Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato 2022-08-09 01:43:24 +00:00
HTMLEditorDocumentCommands.cpp
HTMLEditorEventListener.cpp
HTMLEditorEventListener.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
HTMLEditorObjectResizer.cpp Bug 1787680 - Part 2. Don't create CSSEditUtils instance. r=masayuki 2022-09-01 04:33:36 +00:00
HTMLEditorState.cpp Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato 2022-08-09 01:43:24 +00:00
HTMLEditSubActionHandler.cpp Bug 1787680 - Part 2. Don't create CSSEditUtils instance. r=masayuki 2022-09-01 04:33:36 +00:00
HTMLEditUtils.cpp Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato 2022-08-09 01:43:24 +00:00
HTMLEditUtils.h Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato 2022-08-09 01:43:24 +00:00
HTMLInlineTableEditor.cpp Bug 1771448 - part 4: Rename HTMLEditor::GetActiveEditingHost to ComputeEditingHost r=m_kato 2022-05-31 03:41:01 +00:00
HTMLStyleEditor.cpp Bug 1787680 - Part 2. Don't create CSSEditUtils instance. r=masayuki 2022-09-01 04:33:36 +00:00
HTMLTableEditor.cpp Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato 2022-08-09 01:43:24 +00:00
InsertNodeTransaction.cpp Bug 1762115 - part 2: Make InsertNodeTransaction::DoTransaction() stop touching Selection directly r=m_kato 2022-05-02 23:17:18 +00:00
InsertNodeTransaction.h Bug 1762115 - part 2: Make InsertNodeTransaction::DoTransaction() stop touching Selection directly r=m_kato 2022-05-02 23:17:18 +00:00
InsertTextTransaction.cpp Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato 2022-08-09 01:43:24 +00:00
InsertTextTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
InternetCiter.cpp
InternetCiter.h
JoinNodesTransaction.cpp Bug 1774114 - Make HTMLEditor and its helper classes get split/join node direction dynamically r=m_kato 2022-07-01 02:02:03 +00:00
JoinNodesTransaction.h Bug 1774114 - Make HTMLEditor and its helper classes get split/join node direction dynamically r=m_kato 2022-07-01 02:02:03 +00:00
ManualNAC.h
MoveNodeTransaction.cpp Bug 1789344 - Make SelectionState::DidMoveNode track DOM points having pointed the moved content correctly r=m_kato 2022-09-12 23:53:37 +00:00
MoveNodeTransaction.h Bug 1766355 - part 4: Make HTMLEditor::MoveNodeWithTransaction and HTMLEditor::MoveNodeToEndWithTransaction return MoveNodeResult r=m_kato 2022-05-20 08:28:09 +00:00
moz.build Bug 1784192 - part 9: Rename TypeInState to PendingStyles r=m_kato 2022-08-26 03:31:26 +00:00
PendingStyles.cpp Bug 1784192 - part 10: Make PendingStyles::GetTypeInState() return an enum class instead of taking 2 bool out parameters r=m_kato 2022-08-26 03:31:26 +00:00
PendingStyles.h Bug 1784192 - part 10: Make PendingStyles::GetTypeInState() return an enum class instead of taking 2 bool out parameters r=m_kato 2022-08-26 03:31:26 +00:00
PlaceholderTransaction.cpp Bug 1766956 - part 2: Make PlaceholderTransaction::Merge return false if the caret points of merging transactions are in different root nodes r=m_kato 2022-05-09 04:55:42 +00:00
PlaceholderTransaction.h Bug 1766956 - part 1: Make PlaceholderTransaction::StartSelectionEquals call SelectionState::Equals only when both selection caches store caret positions r=m_kato 2022-05-09 04:55:42 +00:00
ReplaceTextTransaction.cpp Bug 1764684 - part 2: Make editor use methods of EditorBase to collapse Selection r=m_kato 2022-04-20 14:36:52 +00:00
ReplaceTextTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
SelectionState.cpp Bug 1789344 - Make SelectionState::DidMoveNode track DOM points having pointed the moved content correctly r=m_kato 2022-09-12 23:53:37 +00:00
SelectionState.h Bug 1785801 - Make RangeUpdater::SelAdjJoinNodes take the ex-offset of right node r=m_kato 2022-08-26 01:50:07 +00:00
SplitNodeTransaction.cpp Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato 2022-08-09 01:43:24 +00:00
SplitNodeTransaction.h Bug 1774114 - Make HTMLEditor and its helper classes get split/join node direction dynamically r=m_kato 2022-07-01 02:02:03 +00:00
TextEditor.cpp Bug 1771780 - Make TextEditor::ReinitializeSelection skip things which are necessary to be handled only at getting focus event r=m_kato 2022-06-01 00:01:50 +00:00
TextEditor.h Bug 1770874 - part 8: Make EditorBase::OnBlur temporarily a virtual method r=m_kato 2022-05-27 04:09:19 +00:00
TextEditorDataTransfer.cpp Bug 1753508 - Add logger of selection batch r=smaug 2022-03-11 02:24:24 +00:00
TextEditSubActionHandler.cpp Bug 1775381 - Move AutoRangeArray from EditorUtils.h to its own header and cpp file r=m_kato 2022-08-04 05:39:16 +00:00
WSRunObject.cpp Bug 1781994 - part 1: Make HTMLEditor::SplitAncestorStyledInlineElementsAt and HTMLEditor::ClearStyleAt stop touching Selection directly r=m_kato 2022-08-16 00:02:25 +00:00
WSRunObject.h Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato 2022-08-09 01:43:24 +00:00