зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1476897 - part 2: Make TextEditor::GetEmbeddedObjects() just return NS_ERROR_NOT_IMPLEMENTED since it's never used r=m_kato
TextEditor::GetEmbeddedObjects() is never called unless nsIEditorMailSupport::GetEmbeddedObjects() is used with TextEditor instance. However, nobody uses nsIEditorMailSupport interface with TextEditor instance. MozReview-Commit-ID: 4HTnL7KsNGf --HG-- extra : rebase_source : ceb4f895192b9518c02364c8a317d6c941ac9cc2
This commit is contained in:
Родитель
ddfc315822
Коммит
edd6613c92
|
@ -3076,19 +3076,29 @@ HTMLEditor::GetURLForStyleSheet(StyleSheet* aStyleSheet,
|
|||
NS_IMETHODIMP
|
||||
HTMLEditor::GetEmbeddedObjects(nsIArray** aNodeList)
|
||||
{
|
||||
NS_ENSURE_TRUE(aNodeList, NS_ERROR_NULL_POINTER);
|
||||
if (NS_WARN_IF(!aNodeList)) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIMutableArray> nodes = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContentIterator> iter =
|
||||
do_CreateInstance("@mozilla.org/content/post-content-iterator;1", &rv);
|
||||
NS_ENSURE_TRUE(iter, NS_ERROR_NULL_POINTER);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
do_CreateInstance("@mozilla.org/content/post-content-iterator;1", &rv);
|
||||
if (NS_WARN_IF(!iter)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocument> doc = GetDocument();
|
||||
NS_ENSURE_TRUE(doc, NS_ERROR_UNEXPECTED);
|
||||
if (NS_WARN_IF(!doc)) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
iter->Init(doc->GetRootElement());
|
||||
|
||||
|
@ -3111,7 +3121,7 @@ HTMLEditor::GetEmbeddedObjects(nsIArray** aNodeList)
|
|||
}
|
||||
|
||||
nodes.forget(aNodeList);
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -1973,12 +1973,7 @@ TextEditor::Rewrap(bool aRespectNewlines)
|
|||
NS_IMETHODIMP
|
||||
TextEditor::GetEmbeddedObjects(nsIArray** aNodeList)
|
||||
{
|
||||
if (NS_WARN_IF(!aNodeList)) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
*aNodeList = nullptr;
|
||||
return NS_OK;
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче