mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-07 11:56:51 +00:00
a9d57dd8a8
TextEditRules::HandleNewLines() is expensive since it may scan all of given string twice and more. On the other hand, in most cases, given string does not contain \n, \r nor \r\n. First, for avoid using nsTString::FindCharInSet(), HandleNewLine() should receive string which never contains \r nor \r\n. Then, it always can use nsTSubstring::FindChar() instead. Next, HandleNewLines() should do nothing if given string does not contain \n. Finally, because of unused, this removes unnecessary HandleNewLines() argument which can specify the way to handle new lines. MozReview-Commit-ID: 8WSfxfkuFgN --HG-- extra : rebase_source : 1c05721162a30288929d030c0a15fe83a50fe9d2 |
||
---|---|---|
.. | ||
composer | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.jsm | ||
moz.build | ||
nsEditorCID.h | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorObserver.idl | ||
nsIEditorSpellCheck.idl | ||
nsIEditorStyleSheets.idl | ||
nsIEditorUtils.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsIPlaintextEditor.idl | ||
nsITableEditor.idl | ||
nsIURIRefObject.idl |