Skip to content

Commit ced4ccc

Browse files
committed
Bug 1313986 - Part 5. Remove createAnonymousElement from nsIHTMLEditor. r=masayuki
c-c nor add-ons seem noet to use it. We should remove this. MozReview-Commit-ID: 3jN8kUp6D4Z --HG-- extra : rebase_source : cc31001bb87da2888a9c1da6d92a305cdebebb7a
1 parent ef514b5 commit ced4ccc

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

editor/libeditor/HTMLAnonymousNodeEditor.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -161,32 +161,6 @@ ElementDeletionObserver::NodeWillBeDestroyed(const nsINode* aNode)
161161
NS_RELEASE_THIS();
162162
}
163163

164-
// Returns in *aReturn an anonymous nsDOMElement of type aTag,
165-
// child of aParentNode. If aIsCreatedHidden is true, the class
166-
// "hidden" is added to the created element. If aAnonClass is not
167-
// the empty string, it becomes the value of the attribute "_moz_anonclass"
168-
NS_IMETHODIMP
169-
HTMLEditor::CreateAnonymousElement(const nsAString& aTag,
170-
nsIDOMNode* aParentNode,
171-
const nsAString& aAnonClass,
172-
bool aIsCreatedHidden,
173-
nsIDOMElement** aReturn)
174-
{
175-
NS_ENSURE_ARG_POINTER(aReturn);
176-
*aReturn = nullptr;
177-
178-
nsCOMPtr<nsIAtom> atom = NS_Atomize(aTag);
179-
RefPtr<Element> element =
180-
CreateAnonymousElement(atom, aParentNode, aAnonClass, aIsCreatedHidden);
181-
if (NS_WARN_IF(!element)) {
182-
return NS_ERROR_FAILURE;
183-
}
184-
nsCOMPtr<nsIDOMElement> newElement =
185-
static_cast<nsIDOMElement*>(GetAsDOMNode(element));
186-
newElement.forget(aReturn);
187-
return NS_OK;
188-
}
189-
190164
already_AddRefed<Element>
191165
HTMLEditor::CreateAnonymousElement(nsIAtom* aTag,
192166
nsIDOMNode* aParentNode,

editor/nsIHTMLEditor.idl

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -509,24 +509,6 @@ interface nsIHTMLEditor : nsISupports
509509
*/
510510
void removeInsertionListener(in nsIContentFilter inFilter);
511511

512-
/**
513-
* Returns an anonymous nsDOMElement of type aTag,
514-
* child of aParentNode. If aIsCreatedHidden is true, the class
515-
* "hidden" is added to the created element. If aAnonClass is not
516-
* the empty string, it becomes the value of the attribute "_moz_anonclass"
517-
* @return a DOM Element
518-
* @param aTag [IN] a string representing the desired type of
519-
* the element to create
520-
* @param aParentNode [IN] the parent node of the created anonymous
521-
* element
522-
* @param aAnonClass [IN] contents of the _moz_anonclass attribute
523-
* @param aIsCreatedHidden [IN] a boolean specifying if the class "hidden"
524-
* is to be added to the created anonymous
525-
* element
526-
*/
527-
nsIDOMElement createAnonymousElement(in AString aTag, in nsIDOMNode aParentNode,
528-
in AString aAnonClass, in boolean aIsCreatedHidden);
529-
530512
/**
531513
* returns the deepest container of the selection
532514
* @return a DOM Element

0 commit comments

Comments
 (0)