mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
37ef2fd403
When copying paragraphs in Gecko, some private type data is copied into the clipboard and our editor refers the private data at pasting such data. In this case, `text/_moz_htmlinfo` has 2 integers to specify the range at the copy. If selection range ends at end of text followed by an invisible `<br>` and a block boundary, this is set to the depth of the text node. Then, `HTMLWithContextInserter::CollectTopMostChildContentsCompletelyInRange` collects top most children of the last paragraph in `HTMLWithContextInserter::Run` [1]. Therefore, the last `<div>` in the clipboard is unwrapped at pasting in the test case. This patch makes `FragmentFromPasteCreator::MoveStartAndEndAccordingToHTMLInfo` re-climb up the tree under the common ancestor of found start/last nodes. 1. https://searchfox.org/mozilla-central/rev/6b1e306175c2284958fb185bab388021e2890ed0/editor/libeditor/HTMLEditorDataTransfer.cpp#646-651 Differential Revision: https://phabricator.services.mozilla.com/D203574 |
||
---|---|---|
.. | ||
composer | ||
docs | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.sys.mjs | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorSpellCheck.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsITableEditor.idl |