зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1491191 - Remove unused methods in nsIEditorMailSupport. r=masayuki
Since I have landed bug 1489939, comm-central only uses rewrap method in nsIEditorMailSupport. And insertAsCitedQuotation is used by the test of editor/libeditor/tests/test_bug616590.xul. Other methods are unused now, so let's remove these from nsIEditorMailSupprt, and move it to HTMLEditor. Also, pasteAsQuotation is unused now even if BlueGriffon. Differential Revision: https://phabricator.services.mozilla.com/D5835 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
7dc58d65e7
Коммит
f3b8a60bde
|
@ -452,6 +452,28 @@ public:
|
|||
*/
|
||||
Element* GetActiveEditingHost() const;
|
||||
|
||||
/** Insert a string as quoted text
|
||||
* (whose representation is dependant on the editor type),
|
||||
* replacing the selected text (if any).
|
||||
*
|
||||
* @param aQuotedText The actual text to be quoted
|
||||
* @parem aNodeInserted Return the node which was inserted.
|
||||
*/
|
||||
nsresult InsertAsQuotation(const nsAString& aQuotedText,
|
||||
nsINode** aNodeInserted);
|
||||
|
||||
/**
|
||||
* Inserts a plaintext string at the current location,
|
||||
* with special processing for lines beginning with ">",
|
||||
* which will be treated as mail quotes and inserted
|
||||
* as plaintext quoted blocks.
|
||||
* If the selection is not collapsed, the selection is deleted
|
||||
* and the insertion takes place at the resulting collapsed selection.
|
||||
*
|
||||
* @param aString the string to be inserted
|
||||
*/
|
||||
nsresult InsertTextWithQuotations(const nsAString& aStringToInsert);
|
||||
|
||||
protected: // May be called by friends.
|
||||
/****************************************************************************
|
||||
* Some classes like TextEditRules, HTMLEditRules, WSRunObject which are
|
||||
|
|
|
@ -1669,16 +1669,6 @@ HTMLEditor::CanPasteTransferable(nsITransferable* aTransferable)
|
|||
return false;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLEditor::PasteAsQuotation(int32_t aClipboardType)
|
||||
{
|
||||
if (NS_WARN_IF(aClipboardType != nsIClipboard::kGlobalClipboard &&
|
||||
aClipboardType != nsIClipboard::kSelectionClipboard)) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
return HTMLEditor::PasteAsQuotationAsAction(aClipboardType);
|
||||
}
|
||||
|
||||
nsresult
|
||||
HTMLEditor::PasteAsQuotationAsAction(int32_t aClipboardType)
|
||||
{
|
||||
|
@ -1790,7 +1780,7 @@ HTMLEditor::PasteAsPlaintextQuotation(int32_t aSelectionType)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
HTMLEditor::InsertTextWithQuotations(const nsAString& aStringToInsert)
|
||||
{
|
||||
// The whole operation should be undoable in one transaction:
|
||||
|
@ -1895,7 +1885,7 @@ HTMLEditor::InsertTextWithQuotationsInternal(const nsAString& aStringToInsert)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
HTMLEditor::InsertAsQuotation(const nsAString& aQuotedText,
|
||||
nsINode** aNodeInserted)
|
||||
{
|
||||
|
|
|
@ -13,33 +13,6 @@ webidl Node;
|
|||
|
||||
interface nsIEditorMailSupport : nsISupports
|
||||
{
|
||||
/** Paste the text in the OS clipboard at the cursor position,
|
||||
* as a quotation (whose representation is dependant on the editor type),
|
||||
* replacing the selected text (if any).
|
||||
* @param aSelectionType Text or html?
|
||||
*/
|
||||
void pasteAsQuotation(in long aSelectionType);
|
||||
|
||||
/** Insert a string as quoted text
|
||||
* (whose representation is dependant on the editor type),
|
||||
* replacing the selected text (if any).
|
||||
* @param aQuotedText The actual text to be quoted
|
||||
* @return The node which was inserted
|
||||
*/
|
||||
Node insertAsQuotation(in AString aQuotedText);
|
||||
|
||||
/**
|
||||
* Inserts a plaintext string at the current location,
|
||||
* with special processing for lines beginning with ">",
|
||||
* which will be treated as mail quotes and inserted
|
||||
* as plaintext quoted blocks.
|
||||
* If the selection is not collapsed, the selection is deleted
|
||||
* and the insertion takes place at the resulting collapsed selection.
|
||||
*
|
||||
* @param aString the string to be inserted
|
||||
*/
|
||||
void insertTextWithQuotations(in DOMString aStringToInsert);
|
||||
|
||||
/** Insert a string as quoted text
|
||||
* (whose representation is dependant on the editor type),
|
||||
* replacing the selected text (if any),
|
||||
|
|
Загрузка…
Ссылка в новой задаче