mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
043e93a8ba
According to existing comments, TextEditor::TypedText() and HTMLEditor::TypedText() are intentional bottleneck to debug. However, only for that purpose, it and its internal methods are made virtual. This really doesn't make sense. So, this patch creates TextEditor::OnInputText() for callers of TypedText() with non-empty string, TextEditor::OnInputParagraphSeparator() for callers of TypedText() with eTypeBreak (Enter key or insertParagraphSeparator), HTMLEditor::OnInputLineBreak() for callers of TypedText() with eTypeBR (Shift + Enter or insertLineBreak). Additionally, this creates internal non-virtual methods for XPCOM methods which are used as internal methods of TypedText(). One is InsertTextAsAction() for nsIPlatintextEditor.insertText(). the other is InsertParagraphSeparator() for nsIPlaintextEditor.insertLineBreak(). Although those new methods are not have "WithTransaction" postfix, they must be clearer they'll use transactions since user input and actions should be undo-able. MozReview-Commit-ID: AmOkMqovIKA --HG-- extra : rebase_source : 9c0f4b25fa2a36ad2f3394f72eb290824c31d82a |
||
---|---|---|
.. | ||
hunspell | ||
idl | ||
locales | ||
src | ||
tests | ||
moz.build |