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
This commit is contained in:
@@ -161,32 +161,6 @@ ElementDeletionObserver::NodeWillBeDestroyed(const nsINode* aNode)
|
||||
NS_RELEASE_THIS();
|
||||
}
|
||||
|
||||
// Returns in *aReturn an anonymous nsDOMElement of type aTag,
|
||||
// child of aParentNode. If aIsCreatedHidden is true, the class
|
||||
// "hidden" is added to the created element. If aAnonClass is not
|
||||
// the empty string, it becomes the value of the attribute "_moz_anonclass"
|
||||
NS_IMETHODIMP
|
||||
HTMLEditor::CreateAnonymousElement(const nsAString& aTag,
|
||||
nsIDOMNode* aParentNode,
|
||||
const nsAString& aAnonClass,
|
||||
bool aIsCreatedHidden,
|
||||
nsIDOMElement** aReturn)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aReturn);
|
||||
*aReturn = nullptr;
|
||||
|
||||
nsCOMPtr<nsIAtom> atom = NS_Atomize(aTag);
|
||||
RefPtr<Element> element =
|
||||
CreateAnonymousElement(atom, aParentNode, aAnonClass, aIsCreatedHidden);
|
||||
if (NS_WARN_IF(!element)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsIDOMElement> newElement =
|
||||
static_cast<nsIDOMElement*>(GetAsDOMNode(element));
|
||||
newElement.forget(aReturn);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<Element>
|
||||
HTMLEditor::CreateAnonymousElement(nsIAtom* aTag,
|
||||
nsIDOMNode* aParentNode,
|
||||
|
||||
Reference in New Issue
Block a user