Don't use ranges when getting the value of a textfield since we get the value in the middle of tearing down a document. b=359674 r/sr=jst

git-svn-id: svn://10.0.0.236/trunk@215023 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cvshook%sicking.cc
2006-11-09 08:43:26 +00:00
parent 82733c5e23
commit ff69f339f4

View File

@@ -1230,13 +1230,7 @@ nsPlaintextEditor::GetAndInitDocEncoder(const nsAString& aFormatType,
NS_ENSURE_TRUE(rootElement, NS_ERROR_FAILURE);
if (!nsTextEditUtils::IsBody(rootElement))
{
nsCOMPtr<nsIDOMRange> range (do_CreateInstance("@mozilla.org/content/range;1", &rv));
NS_ENSURE_SUCCESS(rv, rv);
rv = range->SelectNodeContents(rootElement);
NS_ENSURE_SUCCESS(rv, rv);
rv = docEncoder->SetRange(range);
rv = docEncoder->SetContainerNode(rootElement);
NS_ENSURE_SUCCESS(rv, rv);
}
}