- From: Giovanni Campagna <scampa.giovanni@gmail.com>
- Date: Sun, 31 May 2009 16:30:27 +0200
- To: Boris Zbarsky <bzbarsky@mit.edu>
- Cc: Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>
2009/5/31 Boris Zbarsky <bzbarsky@mit.edu>: > Giovanni Campagna wrote: >>> >>> If desired, we could probably make display compute to none in cases like >>> this instead of having the rule about throwing out the box. It probably >>> doesn't matter much either way; all that's affected is what the DOM style >>> APIs return for the relevant nodes; the rendering is the same either way. >> >> As a general rule, finding the computed value of a property does not >> require laying out the page, so this point should change only the used >> value. This is the reason we have specified, computed, used and actual >> values, differently from CSS2.0. > > There is no need for layout here. All the rule would say is that computed > display is none if the computed display of the node's parent is > 'table-column' and that it's none if the specified value is not > 'table-column' and the parent's display is 'table-column-group'. This is no > worse than the behavior of "display: inherit" in that all it needs is the > computed display of the parent and the specified display of the child to > decide on the computed display value of the child. Reading again the algorithm, I see that a box can be discarded if one of the following are true: - it is a child of table-column - it is a child of table-column-group, and it is not a table-column - it only contains one _discardable_ (whitespace) box (and it has a table-*-group, table, inline-table, table-row display) - it is out-of-flow and its _related inline box_ (a concept I personally dislike) is discarded This means that rule 1) is superflous, since the _related inline box_ of a out-of-flow box is never _discardable_, so out-of-flow boxes can be discarded only if children of table-column / table-column-group, which makes the solution with the computed value fine (assuming that elements with display:none generate no boxes for them or their children / descendants). A final solution which removes the _discard_ concept is just to say that - The computed value for display is none if the parent's display is "table-column", or if the parent's is "table-column-group" and the specified is not "table-column" - The "white-space" property does not apply to table, table-header-group, table-row-group, table-row display types, and it is always processed as "normal" (collapsing and discarding all whitespace not explicitly wrapped in container elements) > -Boris > Giovanni
Received on Sunday, 31 May 2009 14:31:05 UTC