Line
Link Here
|
0 |
-- a/khtml/rendering/table_layout.cpp |
0 |
++ b/khtml/rendering/table_layout.cpp |
Lines 297-303
void FixedTableLayout::layout()
Link Here
|
297 |
#endif |
297 |
#endif |
298 |
for ( int i = 0; available > 0 && i < nEffCols; i++ ) { |
298 |
for ( int i = 0; available > 0 && i < nEffCols; i++ ) { |
299 |
if ( width[i].isPercent() ) { |
299 |
if ( width[i].isPercent() ) { |
300 |
int w = base * width[i].value() / totalPercent; |
300 |
// totalPercent may be 0 below if all %-width specifed are 0%. (#172557) |
|
|
301 |
int w = totalPercent ? base * width[i].value() / totalPercent : 0; |
301 |
available -= w; |
302 |
available -= w; |
302 |
calcWidth[i] = w; |
303 |
calcWidth[i] = w; |
303 |
} |
304 |
} |
Lines 313-319
void FixedTableLayout::layout()
Link Here
|
313 |
|
314 |
|
314 |
for ( int i = 0; available > 0 && i < nEffCols; i++ ) { |
315 |
for ( int i = 0; available > 0 && i < nEffCols; i++ ) { |
315 |
if ( width[i].isVariable() ) { |
316 |
if ( width[i].isVariable() ) { |
316 |
int w = available / totalVariable; |
317 |
// totalVariable may be 0 below if all the variable widths specified are 0. |
|
|
318 |
int w = totalVariable ? available / totalVariable : 0; |
317 |
available -= w; |
319 |
available -= w; |
318 |
calcWidth[i] = w; |
320 |
calcWidth[i] = w; |
319 |
totalVariable--; |
321 |
totalVariable--; |