mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 19:20:13 +00:00
parent
861c2cc6cb
commit
408d1057ca
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user