Bug 1717156 - part 6: Get rid of nsIEditor::eEditorDontEchoPassword r=m_kato

It's used only by password field, i.e., only by `TextEditor`, and used
temporarily.  Additionally, there is some space in `TextEditor`.  So, we
can get rid of it, and make `TextEditor` store it directly.

Note that this allows to skip expensive `nsIEditor::SetFlags()` calls by
`AutoRestoreEditorState`.  This may improve setting `<input>.value` performance.

Differential Revision: https://phabricator.services.mozilla.com/D118266
This commit is contained in:
Masayuki Nakano
2021-06-22 00:18:08 +00:00
parent 0da607a288
commit 569104c02d
7 changed files with 26 additions and 19 deletions

View File

@@ -75,8 +75,9 @@ TextEditor::TextEditor()
: mMaxTextLength(-1),
mUnmaskedStart(UINT32_MAX),
mUnmaskedLength(0),
mIsMaskingPassword(true) {
// printf("Size of TextEditor: %zu\n", sizeof(TextEditor));
mIsMaskingPassword(true),
mEchoingPasswordPrevented(false) {
printf("Size of TextEditor: %zu\n", sizeof(TextEditor));
static_assert(
sizeof(TextEditor) <= 512,
"TextEditor instance should be allocatable in the quantum class bins");