CSSFrameConstructor/Constraints
This page lists constraints for the CSSFrameConstructor
Some constraints to start things off. Feel free to come up with a better syntax to mark optional and multiple frames
Tables
A table is always constructed of a frame tree like:
nsTableOuterFrame (nsTableCaptionFrame) optional nsTableFrame (nsTableColGroupFrame optional, right? ,see below nsTableColFrame) nsTableRowGroupFrame (is this optional?) nsTableRowFrame nsTableCellFrame
Only the nsTableCaptionFrame and nsTableCellFrames will hold non-table frames.
The nsTableCellFrame creates a block inside (the so called inner table cell frame) which will hold non table frames. The attempt to create table foreign frames below any table frame but the caption and the inner table cell frame invokes the table pseudo frame creation.
The outer table frame is a pseudo frame that will be created around every table frame. The outer table frame can hold also a caption. Around a caption currently a outer table frame will be created and an empty table frame. The outer table frame reflow treats the caption as optional and the table frame as mandatory.
For every column in a table occupied by cells will be a column frame. There might be more columns, but never less. Column frames will always be children of colgroup. A colgroup can not have other children then column frames. A column frame is a leaf. We distinguish three types of columns, content based (defined by a col tag), anonymous by colgroup (<colgroup span>) or due to the cells in the table. As a consequence there are three types of colgroups, content based (defined by a colgroup tag), anonymous around a col tag, anonymous around anonymous columns for table cells. This anonymous colgroup is always the last colgroup. Its a separate colgroup. As soon as there is one table cell frame the existence of a colgroup is mandatory.
A table row will always be encapsulated in a row roup. In this sense the rowgroup is not optional. However a empty table frame is possible.