Return the frame count for the given line 'aLineNumber', not the line where we find the first frame. b=308052 r=bernd sr=bzbarsky

This commit is contained in:
mats.palmgren%bredband.net 2005-10-17 00:03:05 +00:00
parent c969bab765
commit 9125d9fa0e
2 changed files with 6 additions and 2 deletions

View File

@ -3196,7 +3196,7 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsPresContext* aPresContext,
//result = lastFrame->GetNextSibling(&lastFrame, searchingLine);
result = it->GetNextSiblingOnLine(lastFrame, searchingLine);
if (NS_FAILED(result) || !lastFrame){
NS_ASSERTION(0,"should not be reached nsFrame\n");
NS_ERROR("GetLine promised more frames than could be found");
return NS_ERROR_FAILURE;
}
}

View File

@ -1879,6 +1879,7 @@ nsTableRowGroupFrame::GetLine(PRInt32 aLineNumber,
if (!firstCellData)
return NS_ERROR_FAILURE;
*aNumFramesOnLine = cellMap->GetNumCellsOriginatingInRow(aLineNumber);
*aFirstFrameOnLine = (nsIFrame*)firstCellData->GetCellFrame();
if (!(*aFirstFrameOnLine))
{
@ -1889,7 +1890,10 @@ nsTableRowGroupFrame::GetLine(PRInt32 aLineNumber,
*aFirstFrameOnLine = (nsIFrame*)firstCellData->GetCellFrame();
}
}
*aNumFramesOnLine = cellMap->GetNumCellsOriginatingInRow(aLineNumber);
if (!(*aFirstFrameOnLine)) {
NS_ERROR("Failed to find cell frame for cell data");
*aNumFramesOnLine = 0;
}
return NS_OK;
}