gecko-dev/editor
Masayuki Nakano 11ae238f0f Bug 1569902 - part 4: Make TextEditor inserts padding <br> element for empty last line after setting flags to NS_PADDING_FOR_EMPTY_LAST_LINE r=m_kato
Stopping using attribute for "moz-br", `IMEContentObserver` cannot know when
new `<br>` element is changed to padding element for empty last line.
Therefore, editor needs to insert padding `<br>` element after setting the
flag properly.  Then, `IMEContentObserver` does not need to recompute the
length of `<br>` element (if it's for padding, it computes the length as 0).

Unfortunately, `TextEditor::InsertBrElementWithTransaction()` is used in too
many places and it already has optional argument.  Therefore, it's difficult
to change it.  However, we should share the preparation before creating `<br>`
element in it with new method.  Therefore, this patch creates
`EditorBase::PrepareToInsertBRElement()` to share the preparation point (almost
just moved from the method).  Then, new method is created as
`EditorBase::InsertPaddingBRElementForEmptyLastLineWithTransaction()` because
it's used both in `TextEditor` and `HTMLEditor`.  Finally, `TextEditor` won't
insert `<br>` element with `InsertBrElementWithTransaction()`.  Therefore, it's
moved to `HTMLEditor` with renaming to `InsertBRElementWithTransaction()`.

Differential Revision: https://phabricator.services.mozilla.com/D39860

--HG--
extra : moz-landing-system : lando
2019-08-02 05:46:41 +00:00
..
composer
libeditor Bug 1569902 - part 4: Make TextEditor inserts padding <br> element for empty last line after setting flags to NS_PADDING_FOR_EMPTY_LAST_LINE r=m_kato 2019-08-02 05:46:41 +00:00
reftests Bug 1548389 - part 5: Make nsTextFrame and related code treat masking password characters as text-transform r=jfkthame 2019-07-22 03:54:50 +00:00
spellchecker Bug 1559414 - Rename unaudited pre-fission methods with SameProcess for future audit burndown. r=nika 2019-07-26 16:48:31 +00:00
txmgr
AsyncSpellCheckTestHelper.jsm Bug 1561435 - Format editor/, a=automatic-formatting 2019-07-05 10:45:46 +02:00
moz.build
nsIDocumentStateListener.idl
nsIEditActionListener.idl
nsIEditor.idl Bug 1568777 - Make first argument of nsIEditor.unmask() optional r=m_kato 2019-07-29 12:21:02 +00:00
nsIEditorMailSupport.idl
nsIEditorObserver.idl
nsIEditorSpellCheck.idl
nsIEditorStyleSheets.idl
nsIHTMLAbsPosEditor.idl
nsIHTMLEditor.idl
nsIHTMLInlineTableEditor.idl
nsIHTMLObjectResizer.idl
nsIPlaintextEditor.idl
nsITableEditor.idl
nsIURIRefObject.idl