fix 81957. return error code when error happen when we do not get a good frame result to stop a selection crash

in a page which have bidi/table/image
proposed by yokoyama r=ftang/mjudge/attinasi sr=kin a=blizzard


git-svn-id: svn://10.0.0.236/trunk@95849 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ftang%netscape.com 2001-05-24 01:10:19 +00:00
parent 74b8f582d0
commit 3b651f68c9
2 changed files with 14 additions and 4 deletions

View File

@ -3340,8 +3340,13 @@ nsFrame::PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos)
return ((result) ? result : NS_ERROR_FAILURE);
}
result = iter->FindLineContaining(thisBlock, &thisLine);
if (NS_FAILED(result) || thisLine <0)
return result;
if (NS_FAILED(result))
return result;
if (thisLine < 0)
return NS_ERROR_FAILURE;
int edgeCase = 0;//no edge case. this should look at thisLine
PRBool doneLooping = PR_FALSE;//tells us when no more block frames hit.
//this part will find a frame or a block frame. if its a block frame

View File

@ -3340,8 +3340,13 @@ nsFrame::PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos)
return ((result) ? result : NS_ERROR_FAILURE);
}
result = iter->FindLineContaining(thisBlock, &thisLine);
if (NS_FAILED(result) || thisLine <0)
return result;
if (NS_FAILED(result))
return result;
if (thisLine < 0)
return NS_ERROR_FAILURE;
int edgeCase = 0;//no edge case. this should look at thisLine
PRBool doneLooping = PR_FALSE;//tells us when no more block frames hit.
//this part will find a frame or a block frame. if its a block frame