Bug 1632724 - part 4: Rename HTMLEditor::DeleteSelectionWithTransaction() r=m_kato
`HTMLEditor::DeleteSelectionWithTransaction()` calls `EditorBase`'s overridden method and handles `nsIEditor::eStrip` case. Therefore, we can rename it with stop calling the `EditorBase::DeleteSelectionWithTransaction()`, and make it called by `EditorBase::DeleteSelectionWithTransaction()` only when it's necessary. Additionally, we can make all internal method callers of editor classes always set `nsIEditor::eNoStrip` if the instance is `TextEditor`. This must make the code easier to understand. Depends on D72292 Differential Revision: https://phabricator.services.mozilla.com/D72293
This commit is contained in:
@@ -2818,7 +2818,7 @@ bool TextControlState::SetValueWithTextEditor(
|
||||
// event so that passing nullptr as nsIPrincipal is safe for
|
||||
// now.
|
||||
nsresult rv = textEditor->DeleteSelectionAsAction(
|
||||
nsIEditor::eNone, nsIEditor::eStrip, nullptr);
|
||||
nsIEditor::eNone, nsIEditor::eNoStrip, nullptr);
|
||||
NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
|
||||
"TextEditor::DeleteSelectionAsAction() failed");
|
||||
return rv != NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
Reference in New Issue
Block a user