File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 195195 < td style ="WIDTH: 4.53mm; min-width: 4.53mm; background-color: green "> </ td >
196196 </ tr >
197197 </ table >
198+ < br />
199+ < table cellspacing ="0 " cellpadding ="0 " border ="1 " cols ="6 " lang ="en-US " class ="r10 " style ="WIDTH: 175.1543mm; background-color: red ">
200+ < tr >
201+ < td style ="HEIGHT: 3mm; WIDTH: 12.00mm; background-color: yellow "> </ td >
202+ < td style ="WIDTH: 6.05mm; min-width: 6.05mm; background-color: blue "> </ td >
203+ </ tr >
204+ < tr >
205+ < td style ="HEIGHT: 3mm; WIDTH: 12.00mm; background-color: yellow "> </ td >
206+ < td style ="WIDTH: 18.05mm; background-color: blue "> </ td >
207+ </ tr >
208+ </ table >
198209 </ blockquote >
199210</ body >
200211</ html >
Original file line number Diff line number Diff line change @@ -335,18 +335,19 @@ private float CalculateCountAndWidth()
335335 //Check for column width in table-cell definitions
336336 for ( int i = 0 ; i < _columnCount ; i ++ )
337337 {
338- if ( float . IsNaN ( _columnWidths [ i ] ) && //Check if no width specified for column
339- i < row . Boxes . Count && //And there's a box to check
340- row . Boxes [ i ] . Display == CssConstants . TableCell ) //And the box is a table-cell
338+ if ( i < 20 || float . IsNaN ( _columnWidths [ i ] ) ) // limit column width check
341339 {
342- float len = CssValueParser . ParseLength ( row . Boxes [ i ] . Width , availCellSpace , row . Boxes [ i ] ) ; //Get width as an absolute-pixel value
343- if ( len > 0 ) //If some width specified
340+ if ( i < row . Boxes . Count && row . Boxes [ i ] . Display == CssConstants . TableCell )
344341 {
345- int colspan = GetColSpan ( row . Boxes [ i ] ) ;
346- len /= Convert . ToSingle ( colspan ) ;
347- for ( int j = i ; j < i + colspan ; j ++ )
342+ float len = CssValueParser . ParseLength ( row . Boxes [ i ] . Width , availCellSpace , row . Boxes [ i ] ) ;
343+ if ( len > 0 ) //If some width specified
348344 {
349- _columnWidths [ j ] = len ;
345+ int colspan = GetColSpan ( row . Boxes [ i ] ) ;
346+ len /= Convert . ToSingle ( colspan ) ;
347+ for ( int j = i ; j < i + colspan ; j ++ )
348+ {
349+ _columnWidths [ j ] = float . IsNaN ( _columnWidths [ j ] ) ? len : Math . Max ( _columnWidths [ j ] , len ) ;
350+ }
350351 }
351352 }
352353 }
You can’t perform that action at this time.
0 commit comments