the mew of colspan cell needs to be redistributed this can only be done during the strategy init. bug 207208 r=jkeiser sr=dbaron
This commit is contained in:
Родитель
c779a0a86a
Коммит
0cb0bf69a5
|
@ -2421,9 +2421,9 @@ PRBool nsCellMap::ColHasSpanningCells(nsTableCellMap& aMap,
|
|||
for (PRInt32 rowIndex = 0; rowIndex < mRowCount; rowIndex++) {
|
||||
CellData* cd = GetDataAt(aMap, rowIndex, aColIndex, PR_TRUE);
|
||||
if (cd && (cd->IsOrig())) { // cell originates
|
||||
CellData* cd2 = GetDataAt(aMap, rowIndex + 1, aColIndex, PR_TRUE);
|
||||
CellData* cd2 = GetDataAt(aMap, rowIndex, aColIndex +1, PR_TRUE);
|
||||
if (cd2 && cd2->IsColSpan()) { // cd2 is spanned by a col
|
||||
if (cd->GetCellFrame() == GetCellFrame(rowIndex + 1, aColIndex, *cd2, PR_FALSE)) {
|
||||
if (cd->GetCellFrame() == GetCellFrame(rowIndex , aColIndex + 1, *cd2, PR_FALSE)) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3782,7 +3782,7 @@ nsTableFrame::CellChangedWidth(const nsTableCellFrame& aCellFrame,
|
|||
PRBool colMinGetsSmaller = (cellMin < colMin) && (colMin == aPrevCellMin);
|
||||
|
||||
if (colMinGetsBigger || colMinGetsSmaller) {
|
||||
if (ColIsSpannedInto(colIndex)) {
|
||||
if (ColIsSpannedInto(colIndex) || ColHasSpanningCells(colIndex)) {
|
||||
// bail out if a colspan is involved
|
||||
SetNeedStrategyInit(PR_TRUE);
|
||||
return PR_TRUE;
|
||||
|
@ -7324,6 +7324,17 @@ PRBool nsTableFrame::RowIsSpannedInto(PRInt32 aRowIndex)
|
|||
return result;
|
||||
}
|
||||
|
||||
PRBool nsTableFrame::ColHasSpanningCells(PRInt32 aColIndex)
|
||||
{
|
||||
PRBool result = PR_FALSE;
|
||||
nsTableCellMap * cellMap = GetCellMap();
|
||||
NS_PRECONDITION (cellMap, "bad call, cellMap not yet allocated.");
|
||||
if (cellMap) {
|
||||
result = cellMap->ColHasSpanningCells(aColIndex);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
PRBool nsTableFrame::ColIsSpannedInto(PRInt32 aColIndex)
|
||||
{
|
||||
PRBool result = PR_FALSE;
|
||||
|
|
|
@ -2421,9 +2421,9 @@ PRBool nsCellMap::ColHasSpanningCells(nsTableCellMap& aMap,
|
|||
for (PRInt32 rowIndex = 0; rowIndex < mRowCount; rowIndex++) {
|
||||
CellData* cd = GetDataAt(aMap, rowIndex, aColIndex, PR_TRUE);
|
||||
if (cd && (cd->IsOrig())) { // cell originates
|
||||
CellData* cd2 = GetDataAt(aMap, rowIndex + 1, aColIndex, PR_TRUE);
|
||||
CellData* cd2 = GetDataAt(aMap, rowIndex, aColIndex +1, PR_TRUE);
|
||||
if (cd2 && cd2->IsColSpan()) { // cd2 is spanned by a col
|
||||
if (cd->GetCellFrame() == GetCellFrame(rowIndex + 1, aColIndex, *cd2, PR_FALSE)) {
|
||||
if (cd->GetCellFrame() == GetCellFrame(rowIndex , aColIndex + 1, *cd2, PR_FALSE)) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3782,7 +3782,7 @@ nsTableFrame::CellChangedWidth(const nsTableCellFrame& aCellFrame,
|
|||
PRBool colMinGetsSmaller = (cellMin < colMin) && (colMin == aPrevCellMin);
|
||||
|
||||
if (colMinGetsBigger || colMinGetsSmaller) {
|
||||
if (ColIsSpannedInto(colIndex)) {
|
||||
if (ColIsSpannedInto(colIndex) || ColHasSpanningCells(colIndex)) {
|
||||
// bail out if a colspan is involved
|
||||
SetNeedStrategyInit(PR_TRUE);
|
||||
return PR_TRUE;
|
||||
|
@ -7324,6 +7324,17 @@ PRBool nsTableFrame::RowIsSpannedInto(PRInt32 aRowIndex)
|
|||
return result;
|
||||
}
|
||||
|
||||
PRBool nsTableFrame::ColHasSpanningCells(PRInt32 aColIndex)
|
||||
{
|
||||
PRBool result = PR_FALSE;
|
||||
nsTableCellMap * cellMap = GetCellMap();
|
||||
NS_PRECONDITION (cellMap, "bad call, cellMap not yet allocated.");
|
||||
if (cellMap) {
|
||||
result = cellMap->ColHasSpanningCells(aColIndex);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
PRBool nsTableFrame::ColIsSpannedInto(PRInt32 aColIndex)
|
||||
{
|
||||
PRBool result = PR_FALSE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче