bug fix for mjudges bug #45387

r=anthonyd
This commit is contained in:
anthonyd%netscape.com 2000-09-13 00:05:29 +00:00
parent 861c2cc6cb
commit 408d1057ca
5 changed files with 29 additions and 18 deletions

View File

@ -3694,12 +3694,13 @@ nsDOMSelection::selectFrames(nsIPresContext* aPresContext,
while (NS_ENUMERATOR_FALSE == aInnerIter->IsDone())
{
result = aInnerIter->CurrentNode(getter_AddRefs(innercontent));
if (NS_FAILED(result) || !innercontent)
continue;
result = mFrameSelection->GetTracker()->GetPrimaryFrameFor(innercontent, &frame);
if (NS_SUCCEEDED(result) && frame)
//NOTE: aRange and eSpreadDown are now IGNORED. Selected state is set only for given frame
frame->SetSelected(aPresContext, aRange,aFlags,eSpreadDown);//spread from here to hit all frames in flow
if (NS_SUCCEEDED(result) && innercontent)
{
result = mFrameSelection->GetTracker()->GetPrimaryFrameFor(innercontent, &frame);
if (NS_SUCCEEDED(result) && frame)
//NOTE: aRange and eSpreadDown are now IGNORED. Selected state is set only for given frame
frame->SetSelected(aPresContext, aRange,aFlags,eSpreadDown);//spread from here to hit all frames in flow
}
result = aInnerIter->Next();
if (NS_FAILED(result))
return result;

View File

@ -1187,6 +1187,10 @@ NS_NewGeneratedContentIterator(nsIPresContext* aPresContext,
if (!aIterator) {
return NS_ERROR_NULL_POINTER;
}
NS_ENSURE_ARG_POINTER(aFrame);
if (!aFrame) {
return NS_ERROR_NULL_POINTER;
}
// Make sure the frame corresponds to generated content
#ifdef DEBUG

View File

@ -3694,12 +3694,13 @@ nsDOMSelection::selectFrames(nsIPresContext* aPresContext,
while (NS_ENUMERATOR_FALSE == aInnerIter->IsDone())
{
result = aInnerIter->CurrentNode(getter_AddRefs(innercontent));
if (NS_FAILED(result) || !innercontent)
continue;
result = mFrameSelection->GetTracker()->GetPrimaryFrameFor(innercontent, &frame);
if (NS_SUCCEEDED(result) && frame)
//NOTE: aRange and eSpreadDown are now IGNORED. Selected state is set only for given frame
frame->SetSelected(aPresContext, aRange,aFlags,eSpreadDown);//spread from here to hit all frames in flow
if (NS_SUCCEEDED(result) && innercontent)
{
result = mFrameSelection->GetTracker()->GetPrimaryFrameFor(innercontent, &frame);
if (NS_SUCCEEDED(result) && frame)
//NOTE: aRange and eSpreadDown are now IGNORED. Selected state is set only for given frame
frame->SetSelected(aPresContext, aRange,aFlags,eSpreadDown);//spread from here to hit all frames in flow
}
result = aInnerIter->Next();
if (NS_FAILED(result))
return result;

View File

@ -3694,12 +3694,13 @@ nsDOMSelection::selectFrames(nsIPresContext* aPresContext,
while (NS_ENUMERATOR_FALSE == aInnerIter->IsDone())
{
result = aInnerIter->CurrentNode(getter_AddRefs(innercontent));
if (NS_FAILED(result) || !innercontent)
continue;
result = mFrameSelection->GetTracker()->GetPrimaryFrameFor(innercontent, &frame);
if (NS_SUCCEEDED(result) && frame)
//NOTE: aRange and eSpreadDown are now IGNORED. Selected state is set only for given frame
frame->SetSelected(aPresContext, aRange,aFlags,eSpreadDown);//spread from here to hit all frames in flow
if (NS_SUCCEEDED(result) && innercontent)
{
result = mFrameSelection->GetTracker()->GetPrimaryFrameFor(innercontent, &frame);
if (NS_SUCCEEDED(result) && frame)
//NOTE: aRange and eSpreadDown are now IGNORED. Selected state is set only for given frame
frame->SetSelected(aPresContext, aRange,aFlags,eSpreadDown);//spread from here to hit all frames in flow
}
result = aInnerIter->Next();
if (NS_FAILED(result))
return result;

View File

@ -1187,6 +1187,10 @@ NS_NewGeneratedContentIterator(nsIPresContext* aPresContext,
if (!aIterator) {
return NS_ERROR_NULL_POINTER;
}
NS_ENSURE_ARG_POINTER(aFrame);
if (!aFrame) {
return NS_ERROR_NULL_POINTER;
}
// Make sure the frame corresponds to generated content
#ifdef DEBUG