зеркало из https://github.com/mozilla/pjs.git
Bug 555851 - nsHTMLFragmentContentSink::AddTextToContent is dead code; r=jst
This commit is contained in:
Родитель
25f2bb8489
Коммит
2d87a4ce17
|
@ -134,7 +134,6 @@ public:
|
|||
nsIContent* aContent);
|
||||
|
||||
nsresult AddText(const nsAString& aString);
|
||||
nsresult AddTextToContent(nsIContent* aContent, const nsAString& aText);
|
||||
nsresult FlushText();
|
||||
|
||||
void ProcessBaseTag(nsIContent* aContent);
|
||||
|
@ -763,26 +762,6 @@ nsHTMLFragmentContentSink::AddText(const nsAString& aString)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsHTMLFragmentContentSink::AddTextToContent(nsIContent* aContent, const nsAString& aText) {
|
||||
NS_ASSERTION(aContent !=nsnull, "can't add text w/o a content");
|
||||
|
||||
nsresult result=NS_OK;
|
||||
|
||||
if(aContent) {
|
||||
if (!aText.IsEmpty()) {
|
||||
nsCOMPtr<nsIContent> text;
|
||||
result = NS_NewTextNode(getter_AddRefs(text), mNodeInfoManager);
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
text->SetText(aText, PR_TRUE);
|
||||
|
||||
result = aContent->AppendChildTo(text, PR_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsHTMLFragmentContentSink::FlushText()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче