Bug 1540037 - part 18: Move ReplaceTextAsAction() and ReplaceSelectionAsSubAction() to EditorBase r=m_kato
They are used by setting text value of `TextEditor` or replacing a misspelled word with a new word in both `TextEditor` and `HTMLEditor`. Therefore, they should be in the `EditorBase` rather than `TextEditor`. Note that the path of the former case may be in a hot path. Therefore, we need to keep redirecting to `TextEditor` for keeping the performance only in the case. Depends on D115785 Differential Revision: https://phabricator.services.mozilla.com/D115786
This commit is contained in:
@@ -2762,7 +2762,7 @@ bool TextControlState::SetValueWithTextEditor(
|
||||
: TextEditor::AllowBeforeInputEventCancelable::No,
|
||||
nullptr);
|
||||
NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
|
||||
"TextEditor::ReplaceTextAsAction() failed");
|
||||
"EditorBase::ReplaceTextAsAction() failed");
|
||||
return rv != NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user