From 3e099ba376072d548be6a306c0eede8e61702ca8 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Mon, 28 Jun 2021 12:08:50 +0000 Subject: [PATCH] Bug 1717178 - part 5: Get rid of `nsIHTMLEditor.pasteNoFormatting()` because of unused r=m_kato Depends on D118800 Differential Revision: https://phabricator.services.mozilla.com/D118801 --- editor/libeditor/HTMLEditor.h | 2 +- editor/libeditor/HTMLEditorDataTransfer.cpp | 10 ---------- editor/nsIHTMLEditor.idl | 8 -------- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/editor/libeditor/HTMLEditor.h b/editor/libeditor/HTMLEditor.h index 4e17f27e54ea..b43b5a2631de 100644 --- a/editor/libeditor/HTMLEditor.h +++ b/editor/libeditor/HTMLEditor.h @@ -229,7 +229,7 @@ class HTMLEditor final : public EditorBase, nsIPrincipal* aPrincipal = nullptr) final; /** - * PasteNoFormatting() pastes content in clipboard without any style + * PasteNoFormattingAsAction() pastes content in clipboard without any style * information. * * @param aSelectionType nsIClipboard::kGlobalClipboard or diff --git a/editor/libeditor/HTMLEditorDataTransfer.cpp b/editor/libeditor/HTMLEditorDataTransfer.cpp index 68005c7aa50a..1848a05e650c 100644 --- a/editor/libeditor/HTMLEditorDataTransfer.cpp +++ b/editor/libeditor/HTMLEditorDataTransfer.cpp @@ -2209,16 +2209,6 @@ nsresult HTMLEditor::PasteTransferableAsAction(nsITransferable* aTransferable, return EditorBase::ToGenericNSResult(rv); } -/** - * HTML PasteNoFormatting. Ignore any HTML styles and formating in paste source. - */ -NS_IMETHODIMP HTMLEditor::PasteNoFormatting(int32_t aSelectionType) { - nsresult rv = PasteNoFormattingAsAction(aSelectionType); - NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), - "HTMLEditor::PasteNoFormattingAsAction() failed"); - return rv; -} - nsresult HTMLEditor::PasteNoFormattingAsAction(int32_t aSelectionType, nsIPrincipal* aPrincipal) { AutoEditActionDataSetter editActionData(*this, EditAction::ePaste, diff --git a/editor/nsIHTMLEditor.idl b/editor/nsIHTMLEditor.idl index ad5e0acdffe4..1d30ac437e61 100644 --- a/editor/nsIHTMLEditor.idl +++ b/editor/nsIHTMLEditor.idl @@ -108,14 +108,6 @@ interface nsIHTMLEditor : nsISupports [can_run_script] void insertHTML(in AString aInputString); - - /** - * Paste the text in the OS clipboard at the cursor position, replacing - * the selected text (if any), but strip out any HTML styles and formatting - */ - [can_run_script] - void pasteNoFormatting(in long aSelectionType); - /** * Rebuild the entire document from source HTML * Needed to be able to edit HEAD and other outside-of-BODY content