Handle returning nulls from CheckLineOrder correctly. bug=345616 r=smotagu sr=roc
This commit is contained in:
@@ -4491,14 +4491,18 @@ nsFrame::GetFrameFromDirection(nsPresContext* aPresContext, nsPeekOffsetStruct *
|
||||
PRBool isReordered;
|
||||
result = it->CheckLineOrder(thisLine, &isReordered, &firstFrame, &lastFrame);
|
||||
nsIFrame** framePtr = aPos->mDirection == eDirPrevious ? &firstFrame : &lastFrame;
|
||||
nsBidiLevel embeddingLevel = nsBidiPresUtils::GetFrameEmbeddingLevel(*framePtr);
|
||||
if (((embeddingLevel & 1) && lineIsRTL || !(embeddingLevel & 1) && !lineIsRTL) ==
|
||||
(aPos->mDirection == eDirPrevious)) {
|
||||
GetFirstLeaf(aPresContext, framePtr);
|
||||
if (*framePtr) {
|
||||
nsBidiLevel embeddingLevel = nsBidiPresUtils::GetFrameEmbeddingLevel(*framePtr);
|
||||
if (((embeddingLevel & 1) && lineIsRTL || !(embeddingLevel & 1) && !lineIsRTL) ==
|
||||
(aPos->mDirection == eDirPrevious)) {
|
||||
GetFirstLeaf(aPresContext, framePtr);
|
||||
} else {
|
||||
GetLastLeaf(aPresContext, framePtr);
|
||||
}
|
||||
atLineEdge = *framePtr == traversedFrame;
|
||||
} else {
|
||||
GetLastLeaf(aPresContext, framePtr);
|
||||
atLineEdge = PR_TRUE;
|
||||
}
|
||||
atLineEdge = *framePtr == traversedFrame;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
||||
@@ -741,6 +741,8 @@ nsLineIterator::CheckLineOrder(PRInt32 aLine,
|
||||
|
||||
if (!line->mFirstChild) { // empty line
|
||||
*aIsReordered = PR_FALSE;
|
||||
*aFirstVisual = nsnull;
|
||||
*aLastVisual = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1946,6 +1946,8 @@ nsTableRowGroupFrame::CheckLineOrder(PRInt32 aLine,
|
||||
nsIFrame **aLastVisual)
|
||||
{
|
||||
*aIsReordered = PR_FALSE;
|
||||
*aFirstVisual = nsnull;
|
||||
*aLastVisual = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
#endif // IBMBIDI
|
||||
|
||||
Reference in New Issue
Block a user