Remove erroneous NOT_IMPLEMENTED return

This commit is contained in:
akkana%netscape.com 1999-01-07 21:06:43 +00:00
Родитель 365817c89e
Коммит 21dc9ae92a
2 изменённых файлов: 50 добавлений и 4 удалений

Просмотреть файл

@ -281,6 +281,31 @@ nsresult nsRange::DoSetRange(nsIDOMNode* aStartN, PRInt32 aStartOffset,
if (mStartParent) mIsPositioned = PR_TRUE;
else mIsPositioned = PR_FALSE;
#ifdef DEBUG_akkana
if (mIsPositioned)
{
nsString name, value;
char *nameS, *valueS;
mStartParent->GetNodeName(name);
mStartParent->GetNodeValue(value);
nameS = name.ToNewCString();
valueS = value.ToNewCString();
printf("DoSetRange: StartParent = '%s'%s', StartOffset = %d\n",
nameS, valueS, mStartOffset);
delete nameS;
delete valueS;
mEndParent->GetNodeName(name);
mEndParent->GetNodeValue(value);
nameS = name.ToNewCString();
valueS = value.ToNewCString();
printf("DoSetRange: EndParent = '%s'%s', StartOffset = %d\n",
nameS, valueS, mStartOffset);
delete nameS;
delete valueS;
}
#endif /* DEBUG_akkana */
// FIX ME need to handle error cases
// (range lists return error, or setting only one endpoint to null)
@ -1204,8 +1229,6 @@ nsresult nsRange::CloneContents(nsIDOMDocumentFragment** aReturn)
// XXX but who owns this doc frag -- when will it be released?
if (NS_SUCCEEDED(res))
{
return NS_ERROR_NOT_IMPLEMENTED;
// Loop over the nodes contained in this Range,
// from the start and end points, and add them
// to the parent doc frag:

Просмотреть файл

@ -281,6 +281,31 @@ nsresult nsRange::DoSetRange(nsIDOMNode* aStartN, PRInt32 aStartOffset,
if (mStartParent) mIsPositioned = PR_TRUE;
else mIsPositioned = PR_FALSE;
#ifdef DEBUG_akkana
if (mIsPositioned)
{
nsString name, value;
char *nameS, *valueS;
mStartParent->GetNodeName(name);
mStartParent->GetNodeValue(value);
nameS = name.ToNewCString();
valueS = value.ToNewCString();
printf("DoSetRange: StartParent = '%s'%s', StartOffset = %d\n",
nameS, valueS, mStartOffset);
delete nameS;
delete valueS;
mEndParent->GetNodeName(name);
mEndParent->GetNodeValue(value);
nameS = name.ToNewCString();
valueS = value.ToNewCString();
printf("DoSetRange: EndParent = '%s'%s', StartOffset = %d\n",
nameS, valueS, mStartOffset);
delete nameS;
delete valueS;
}
#endif /* DEBUG_akkana */
// FIX ME need to handle error cases
// (range lists return error, or setting only one endpoint to null)
@ -1204,8 +1229,6 @@ nsresult nsRange::CloneContents(nsIDOMDocumentFragment** aReturn)
// XXX but who owns this doc frag -- when will it be released?
if (NS_SUCCEEDED(res))
{
return NS_ERROR_NOT_IMPLEMENTED;
// Loop over the nodes contained in this Range,
// from the start and end points, and add them
// to the parent doc frag: