mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
da0f19a5f3
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 |
||
---|---|---|
.. | ||
composer | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.jsm | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorObserver.idl | ||
nsIEditorSpellCheck.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsITableEditor.idl |