Skip to content

Commit

Permalink
Bug 1717178 - part 6: Get rid of `nsIHTMLEditor.setCaretAfterElement(…
Browse files Browse the repository at this point in the history
…)` because of unused r=m_kato

Depends on D118801

Differential Revision: https://phabricator.services.mozilla.com/D118802
  • Loading branch information
masayuki-nakano committed Jun 28, 2021
1 parent 3e099ba commit 5017e99
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 181 deletions.
17 changes: 0 additions & 17 deletions editor/libeditor/HTMLEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1933,23 +1933,6 @@ nsresult HTMLEditor::SelectContentInternal(nsIContent& aContentToSelect) {
return error.StealNSResult();
}

MOZ_CAN_RUN_SCRIPT_BOUNDARY NS_IMETHODIMP
HTMLEditor::SetCaretAfterElement(Element* aElement) {
if (NS_WARN_IF(!aElement)) {
return NS_ERROR_INVALID_ARG;
}

AutoEditActionDataSetter editActionData(*this, EditAction::eNotEditing);
if (NS_WARN_IF(!editActionData.CanHandle())) {
return NS_ERROR_NOT_INITIALIZED;
}

nsresult rv = CollapseSelectionAfter(*aElement);
NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
"HTMLEditor::CollapseSelectionAfter() failed");
return rv;
}

nsresult HTMLEditor::CollapseSelectionAfter(Element& aElement) {
MOZ_ASSERT(IsEditActionDataAvailable());

Expand Down
1 change: 0 additions & 1 deletion editor/libeditor/tests/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ skip-if = headless
[test_nsIHTMLEditor_removeInlineProperty.html]
[test_nsIHTMLEditor_selectElement.html]
[test_nsIHTMLEditor_setBackgroundColor.html]
[test_nsIHTMLEditor_setCaretAfterElement.html]
[test_nsIHTMLObjectResizer_hideResizers.html]
[test_nsITableEditor_deleteTableCell.html]
[test_nsITableEditor_deleteTableCellContents.html]
Expand Down
149 changes: 0 additions & 149 deletions editor/libeditor/tests/test_nsIHTMLEditor_setCaretAfterElement.html

This file was deleted.

14 changes: 0 additions & 14 deletions editor/nsIHTMLEditor.idl
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,6 @@ interface nsIHTMLEditor : nsISupports
[can_run_script]
void selectElement(in Element aElement);

/**
* Create a collapsed selection just after aElement
*
* XXX could we parameterize SelectElement(before/select/after>?
*
* The selection is set to parent-of-aElement with an
* offset 1 greater than aElement's offset
* but it enforces the HTML 4.0 DTD "CanContain" rules, so it should
* be useful for other elements.
*
* @param aElement An element in the document
*/
void setCaretAfterElement(in Element aElement);

/**
* getParagraphState returns what block tag paragraph format is in
* the selection.
Expand Down

0 comments on commit 5017e99

Please sign in to comment.