forked from mirrors/gecko-dev
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
|
||
|---|---|---|
| .. | ||
| composer | ||
| docs | ||
| libeditor | ||
| reftests | ||
| spellchecker | ||
| txmgr | ||
| AsyncSpellCheckTestHelper.jsm | ||
| moz.build | ||
| nsIDocumentStateListener.idl | ||
| nsIEditActionListener.idl | ||
| nsIEditor.idl | ||
| nsIEditorMailSupport.idl | ||
| nsIEditorSpellCheck.idl | ||
| nsIHTMLAbsPosEditor.idl | ||
| nsIHTMLEditor.idl | ||
| nsIHTMLInlineTableEditor.idl | ||
| nsIHTMLObjectResizer.idl | ||
| nsITableEditor.idl | ||