Warning, /frameworks/khtml/src/rendering/table_layout.txt is written in an unsupported language. File is not indexed.

0001 CSS describes two ways of layouting tables. Auto layout (the NS4
0002 compliant HTML table layout) and fixed layout. The fixed layout
0003 strategy is described in detail in the CSS specs and will not be
0004 repeated here.
0005 
0006 Due to the fact that two layout strategies exist, it is rather natural
0007 to encapsulate the layouting process in a TableLayout class. Two types
0008 (FixedTableLayout and AutoTableLayout) exist. AutoTableLayout is the
0009 default and also need a quirks flags for NS compatibility
0010 mode. FixedTableLayout will be used if a style rule sets the
0011 table-layout property to fixed.
0012 
0013 The grid of table cells is stored in each table section, as spans
0014 can't pass section borders. Changing the number of cols in the grid
0015 has to be done by the table to keep all grids (for all sections) in
0016 sync. The grid only stores effective columns. The table below would
0017 only result in one column being allocated in the grid:
0018 
0019 <table><tr><td colspan=1000>foo</td></tr></table>
0020 
0021 Once a colspan get's used, the column is split into its subparts. To
0022 do this, the table has to store the colspans of effective columns in a
0023 structure.
0024 
0025 
0026 
0027 
0028 NS & Mozilla compliant table layouting algorithm (AutoTableLayout)
0029 ------------------------------------------------------------------
0030 
0031 The table layout algorithm computes a set of layout hints from the
0032 information in the table cells, <col> elements and style
0033 sheets. Hints from different sources are treated a bit differently in
0034 the collection stage.
0035 
0036 In addition certain operations are only done in quirks (NS4 compat)
0037 mode.
0038 
0039 Resizing the table doesn't require you to build up this information
0040 again. All that is needed is a list of layout hints for each column.
0041 
0042 The algorithm below describes to the best of our knowledge the way
0043 table alyouting is handled in a NS compatible way.
0044 
0045 There are two stages, the collection stage (assocaited with
0046 calcMinMaxWidth() in khtml) and the stage assigning width to cells
0047 (associated with layout()).
0048 
0049 A set of hinted widths are used to determine the final table layout in
0050 the layouting stage.
0051 
0052 enum hintType {
0053      MinWidth,
0054      DesiredWidth,
0055      FixedWidth,
0056      MinWidthAdjusted,
0057      DesiredWidthAdjusted,
0058      FixedWidthAdjusted,
0059      PercentWidth,
0060      PercentWidthAdjusted,
0061      ProportionalWidth
0062 };
0063 
0064 One width (in pixels) for each hintType describes how the column
0065 wishes to be layouted. The layouting stage operates only on an array
0066 of hints for each column.
0067 
0068 An additional totalCellSpacing variable is used to know about the
0069 remaining width to distribute.
0070 
0071 Collection stage:
0072 -----------------
0073 
0074