mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
removed assertions in new incremental layout methods
This commit is contained in:
parent
a900e17559
commit
f6ebcc42ce
@ -484,7 +484,9 @@ void nsCellMap::SetColCollapsedAt(PRInt32 aCol, PRBool aValue)
|
|||||||
|
|
||||||
PRBool nsCellMap::RowIsSpannedInto(PRInt32 aRowIndex) const
|
PRBool nsCellMap::RowIsSpannedInto(PRInt32 aRowIndex) const
|
||||||
{
|
{
|
||||||
NS_PRECONDITION ((0 <= aRowIndex) && (aRowIndex < mRowCount), "bad row index arg");
|
if ((0 > aRowIndex) || (aRowIndex >= mRowCount)) {
|
||||||
|
return PR_FALSE;
|
||||||
|
}
|
||||||
PRInt32 colCount = mNumCellsInCol.Count();
|
PRInt32 colCount = mNumCellsInCol.Count();
|
||||||
for (PRInt32 colIndex = 0; colIndex < colCount; colIndex++) {
|
for (PRInt32 colIndex = 0; colIndex < colCount; colIndex++) {
|
||||||
CellData* cd = GetCellAt(aRowIndex, colIndex);
|
CellData* cd = GetCellAt(aRowIndex, colIndex);
|
||||||
@ -500,7 +502,9 @@ PRBool nsCellMap::RowIsSpannedInto(PRInt32 aRowIndex) const
|
|||||||
|
|
||||||
PRBool nsCellMap::RowHasSpanningCells(PRInt32 aRowIndex) const
|
PRBool nsCellMap::RowHasSpanningCells(PRInt32 aRowIndex) const
|
||||||
{
|
{
|
||||||
NS_PRECONDITION ((0 <= aRowIndex) && (aRowIndex < mRowCount), "bad row index arg");
|
if ((0 > aRowIndex) || (aRowIndex >= mRowCount)) {
|
||||||
|
return PR_FALSE;
|
||||||
|
}
|
||||||
PRInt32 colCount = mNumCellsInCol.Count();
|
PRInt32 colCount = mNumCellsInCol.Count();
|
||||||
if (aRowIndex != mRowCount - 1) {
|
if (aRowIndex != mRowCount - 1) {
|
||||||
// aRowIndex is not the last row, so we check the next row after aRowIndex for spanners
|
// aRowIndex is not the last row, so we check the next row after aRowIndex for spanners
|
||||||
@ -520,7 +524,9 @@ PRBool nsCellMap::RowHasSpanningCells(PRInt32 aRowIndex) const
|
|||||||
|
|
||||||
PRBool nsCellMap::ColIsSpannedInto(PRInt32 aColIndex) const
|
PRBool nsCellMap::ColIsSpannedInto(PRInt32 aColIndex) const
|
||||||
{
|
{
|
||||||
NS_PRECONDITION ((0 <= aColIndex) && (aColIndex < mNumCellsInCol.Count()), "bad col index arg");
|
if ((0 > aColIndex) || (aColIndex >= mNumCellsInCol.Count())) {
|
||||||
|
return PR_FALSE;
|
||||||
|
}
|
||||||
for (PRInt32 rowIndex = 0; rowIndex < mRowCount; rowIndex++) {
|
for (PRInt32 rowIndex = 0; rowIndex < mRowCount; rowIndex++) {
|
||||||
CellData* cd = GetCellAt(rowIndex, aColIndex);
|
CellData* cd = GetCellAt(rowIndex, aColIndex);
|
||||||
if (cd) { // there's really a cell at (aRowIndex, colIndex)
|
if (cd) { // there's really a cell at (aRowIndex, colIndex)
|
||||||
@ -537,8 +543,9 @@ PRBool nsCellMap::ColHasSpanningCells(PRInt32 aColIndex) const
|
|||||||
{
|
{
|
||||||
NS_PRECONDITION (aColIndex < mNumCellsInCol.Count(), "bad col index arg");
|
NS_PRECONDITION (aColIndex < mNumCellsInCol.Count(), "bad col index arg");
|
||||||
PRInt32 colCount = mNumCellsInCol.Count();
|
PRInt32 colCount = mNumCellsInCol.Count();
|
||||||
if (aColIndex >= colCount - 1)
|
if ((0 > aColIndex) || (aColIndex >= colCount - 1))
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
|
||||||
for (PRInt32 rowIndex = 0; rowIndex < mRowCount; rowIndex++) {
|
for (PRInt32 rowIndex = 0; rowIndex < mRowCount; rowIndex++) {
|
||||||
CellData* cd = GetCellAt(rowIndex, aColIndex);
|
CellData* cd = GetCellAt(rowIndex, aColIndex);
|
||||||
if (cd && (cd->mOrigCell)) { // cell originates
|
if (cd && (cd->mOrigCell)) { // cell originates
|
||||||
|
@ -484,7 +484,9 @@ void nsCellMap::SetColCollapsedAt(PRInt32 aCol, PRBool aValue)
|
|||||||
|
|
||||||
PRBool nsCellMap::RowIsSpannedInto(PRInt32 aRowIndex) const
|
PRBool nsCellMap::RowIsSpannedInto(PRInt32 aRowIndex) const
|
||||||
{
|
{
|
||||||
NS_PRECONDITION ((0 <= aRowIndex) && (aRowIndex < mRowCount), "bad row index arg");
|
if ((0 > aRowIndex) || (aRowIndex >= mRowCount)) {
|
||||||
|
return PR_FALSE;
|
||||||
|
}
|
||||||
PRInt32 colCount = mNumCellsInCol.Count();
|
PRInt32 colCount = mNumCellsInCol.Count();
|
||||||
for (PRInt32 colIndex = 0; colIndex < colCount; colIndex++) {
|
for (PRInt32 colIndex = 0; colIndex < colCount; colIndex++) {
|
||||||
CellData* cd = GetCellAt(aRowIndex, colIndex);
|
CellData* cd = GetCellAt(aRowIndex, colIndex);
|
||||||
@ -500,7 +502,9 @@ PRBool nsCellMap::RowIsSpannedInto(PRInt32 aRowIndex) const
|
|||||||
|
|
||||||
PRBool nsCellMap::RowHasSpanningCells(PRInt32 aRowIndex) const
|
PRBool nsCellMap::RowHasSpanningCells(PRInt32 aRowIndex) const
|
||||||
{
|
{
|
||||||
NS_PRECONDITION ((0 <= aRowIndex) && (aRowIndex < mRowCount), "bad row index arg");
|
if ((0 > aRowIndex) || (aRowIndex >= mRowCount)) {
|
||||||
|
return PR_FALSE;
|
||||||
|
}
|
||||||
PRInt32 colCount = mNumCellsInCol.Count();
|
PRInt32 colCount = mNumCellsInCol.Count();
|
||||||
if (aRowIndex != mRowCount - 1) {
|
if (aRowIndex != mRowCount - 1) {
|
||||||
// aRowIndex is not the last row, so we check the next row after aRowIndex for spanners
|
// aRowIndex is not the last row, so we check the next row after aRowIndex for spanners
|
||||||
@ -520,7 +524,9 @@ PRBool nsCellMap::RowHasSpanningCells(PRInt32 aRowIndex) const
|
|||||||
|
|
||||||
PRBool nsCellMap::ColIsSpannedInto(PRInt32 aColIndex) const
|
PRBool nsCellMap::ColIsSpannedInto(PRInt32 aColIndex) const
|
||||||
{
|
{
|
||||||
NS_PRECONDITION ((0 <= aColIndex) && (aColIndex < mNumCellsInCol.Count()), "bad col index arg");
|
if ((0 > aColIndex) || (aColIndex >= mNumCellsInCol.Count())) {
|
||||||
|
return PR_FALSE;
|
||||||
|
}
|
||||||
for (PRInt32 rowIndex = 0; rowIndex < mRowCount; rowIndex++) {
|
for (PRInt32 rowIndex = 0; rowIndex < mRowCount; rowIndex++) {
|
||||||
CellData* cd = GetCellAt(rowIndex, aColIndex);
|
CellData* cd = GetCellAt(rowIndex, aColIndex);
|
||||||
if (cd) { // there's really a cell at (aRowIndex, colIndex)
|
if (cd) { // there's really a cell at (aRowIndex, colIndex)
|
||||||
@ -537,8 +543,9 @@ PRBool nsCellMap::ColHasSpanningCells(PRInt32 aColIndex) const
|
|||||||
{
|
{
|
||||||
NS_PRECONDITION (aColIndex < mNumCellsInCol.Count(), "bad col index arg");
|
NS_PRECONDITION (aColIndex < mNumCellsInCol.Count(), "bad col index arg");
|
||||||
PRInt32 colCount = mNumCellsInCol.Count();
|
PRInt32 colCount = mNumCellsInCol.Count();
|
||||||
if (aColIndex >= colCount - 1)
|
if ((0 > aColIndex) || (aColIndex >= colCount - 1))
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
|
||||||
for (PRInt32 rowIndex = 0; rowIndex < mRowCount; rowIndex++) {
|
for (PRInt32 rowIndex = 0; rowIndex < mRowCount; rowIndex++) {
|
||||||
CellData* cd = GetCellAt(rowIndex, aColIndex);
|
CellData* cd = GetCellAt(rowIndex, aColIndex);
|
||||||
if (cd && (cd->mOrigCell)) { // cell originates
|
if (cd && (cd->mOrigCell)) { // cell originates
|
||||||
|
Loading…
Reference in New Issue
Block a user