зеркало из https://github.com/mozilla/gecko-dev.git
11ae238f0f
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 |
||
---|---|---|
.. | ||
composer | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.jsm | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorObserver.idl | ||
nsIEditorSpellCheck.idl | ||
nsIEditorStyleSheets.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsIPlaintextEditor.idl | ||
nsITableEditor.idl | ||
nsIURIRefObject.idl |