mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Changed NS_ASSERTION to NS_WARN_IF_FALSE to avoid crashing people when condition is met. r=hyatt.
This commit is contained in:
parent
e04693d65a
commit
c2a26335bd
@ -261,7 +261,7 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
|
||||
if (totalCounts[PCT] > 0) {
|
||||
if (totalAllocated + totalAvailWidths[PCT] - minWidths[PCT] <= maxWidth) {
|
||||
AllocateFully(totalAllocated, allocTypes, PCT);
|
||||
NS_ASSERTION(totalAllocated <= maxWidth, "over allocated");
|
||||
NS_WARN_IF_FALSE(totalAllocated <= maxWidth, "over allocated");
|
||||
}
|
||||
else {
|
||||
AllocateConstrained(maxWidth - totalAllocated, PCT, PR_FALSE, allocTypes);
|
||||
@ -272,7 +272,7 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
|
||||
if (totalAllocated < maxWidth && totalCounts[FIX] > 0) {
|
||||
if (totalAllocated + totalAvailWidths[FIX] - minWidths[FIX] <= maxWidth) {
|
||||
AllocateFully(totalAllocated, allocTypes, FIX);
|
||||
NS_ASSERTION(totalAllocated <= maxWidth, "over allocated");
|
||||
NS_WARN_IF_FALSE(totalAllocated <= maxWidth, "over allocated");
|
||||
}
|
||||
else {
|
||||
AllocateConstrained(maxWidth - totalAllocated, FIX, PR_TRUE, allocTypes);
|
||||
@ -283,7 +283,7 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
|
||||
if (totalAllocated < maxWidth && totalCounts[FIX_ADJ] > 0) {
|
||||
if (totalAllocated + totalAvailWidths[FIX_ADJ] - minWidths[FIX_ADJ] <= maxWidth) {
|
||||
AllocateFully(totalAllocated, allocTypes, FIX_ADJ);
|
||||
NS_ASSERTION(totalAllocated <= maxWidth, "over allocated");
|
||||
NS_WARN_IF_FALSE(totalAllocated <= maxWidth, "over allocated");
|
||||
}
|
||||
else {
|
||||
AllocateConstrained(maxWidth - totalAllocated, FIX_ADJ, PR_TRUE, allocTypes);
|
||||
@ -294,7 +294,7 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
|
||||
if (totalAllocated < maxWidth && totalCounts[MIN_PRO] > 0) {
|
||||
if (totalAllocated + totalAvailWidths[MIN_PRO] - minWidths[MIN_PRO] <= maxWidth) {
|
||||
AllocateFully(totalAllocated, allocTypes, MIN_PRO, PR_FALSE);
|
||||
NS_ASSERTION(totalAllocated <= maxWidth, "over allocated");
|
||||
NS_WARN_IF_FALSE(totalAllocated <= maxWidth, "over allocated");
|
||||
}
|
||||
else {
|
||||
AllocateConstrained(maxWidth - totalAllocated, MIN_PRO, PR_FALSE, allocTypes);
|
||||
@ -306,7 +306,7 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
|
||||
if (totalAllocated < maxWidth && totalCounts[DES_CON] > 0) {
|
||||
if (totalAllocated + totalAvailWidths[DES_CON] - minWidths[DES_CON]<= maxWidth) {
|
||||
AllocateFully(totalAllocated, allocTypes, DES_CON);
|
||||
NS_ASSERTION(totalAllocated <= maxWidth, "over allocated");
|
||||
NS_WARN_IF_FALSE(totalAllocated <= maxWidth, "over allocated");
|
||||
}
|
||||
else {
|
||||
AllocateConstrained(maxWidth - totalAllocated, DES_CON, PR_FALSE, allocTypes);
|
||||
|
@ -261,7 +261,7 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
|
||||
if (totalCounts[PCT] > 0) {
|
||||
if (totalAllocated + totalAvailWidths[PCT] - minWidths[PCT] <= maxWidth) {
|
||||
AllocateFully(totalAllocated, allocTypes, PCT);
|
||||
NS_ASSERTION(totalAllocated <= maxWidth, "over allocated");
|
||||
NS_WARN_IF_FALSE(totalAllocated <= maxWidth, "over allocated");
|
||||
}
|
||||
else {
|
||||
AllocateConstrained(maxWidth - totalAllocated, PCT, PR_FALSE, allocTypes);
|
||||
@ -272,7 +272,7 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
|
||||
if (totalAllocated < maxWidth && totalCounts[FIX] > 0) {
|
||||
if (totalAllocated + totalAvailWidths[FIX] - minWidths[FIX] <= maxWidth) {
|
||||
AllocateFully(totalAllocated, allocTypes, FIX);
|
||||
NS_ASSERTION(totalAllocated <= maxWidth, "over allocated");
|
||||
NS_WARN_IF_FALSE(totalAllocated <= maxWidth, "over allocated");
|
||||
}
|
||||
else {
|
||||
AllocateConstrained(maxWidth - totalAllocated, FIX, PR_TRUE, allocTypes);
|
||||
@ -283,7 +283,7 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
|
||||
if (totalAllocated < maxWidth && totalCounts[FIX_ADJ] > 0) {
|
||||
if (totalAllocated + totalAvailWidths[FIX_ADJ] - minWidths[FIX_ADJ] <= maxWidth) {
|
||||
AllocateFully(totalAllocated, allocTypes, FIX_ADJ);
|
||||
NS_ASSERTION(totalAllocated <= maxWidth, "over allocated");
|
||||
NS_WARN_IF_FALSE(totalAllocated <= maxWidth, "over allocated");
|
||||
}
|
||||
else {
|
||||
AllocateConstrained(maxWidth - totalAllocated, FIX_ADJ, PR_TRUE, allocTypes);
|
||||
@ -294,7 +294,7 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
|
||||
if (totalAllocated < maxWidth && totalCounts[MIN_PRO] > 0) {
|
||||
if (totalAllocated + totalAvailWidths[MIN_PRO] - minWidths[MIN_PRO] <= maxWidth) {
|
||||
AllocateFully(totalAllocated, allocTypes, MIN_PRO, PR_FALSE);
|
||||
NS_ASSERTION(totalAllocated <= maxWidth, "over allocated");
|
||||
NS_WARN_IF_FALSE(totalAllocated <= maxWidth, "over allocated");
|
||||
}
|
||||
else {
|
||||
AllocateConstrained(maxWidth - totalAllocated, MIN_PRO, PR_FALSE, allocTypes);
|
||||
@ -306,7 +306,7 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
|
||||
if (totalAllocated < maxWidth && totalCounts[DES_CON] > 0) {
|
||||
if (totalAllocated + totalAvailWidths[DES_CON] - minWidths[DES_CON]<= maxWidth) {
|
||||
AllocateFully(totalAllocated, allocTypes, DES_CON);
|
||||
NS_ASSERTION(totalAllocated <= maxWidth, "over allocated");
|
||||
NS_WARN_IF_FALSE(totalAllocated <= maxWidth, "over allocated");
|
||||
}
|
||||
else {
|
||||
AllocateConstrained(maxWidth - totalAllocated, DES_CON, PR_FALSE, allocTypes);
|
||||
|
Loading…
Reference in New Issue
Block a user