Re: [CSS21] Proposal for a replacement for section 17.2.1 (table anonymous objects)

Arron Eicholz wrote:
> Definition of "discardable": this is a little confusing, because the definition is so narrow (i.e., boxes generated solely by whitespace-only text nodes), yet reading through the rules, a lot of boxes can get discarded (e.g., any child of a table-column), and thus would seem to be 'discardable'.

This definition is solely for use later in this algorithm.  It's not 
mean to imply that only "discardable" boxes will be thrown away.  I'm 
happy to use some other term ("whitespace", "discardable whitespace", 
"unnecessary", whatever).  The key is to have this behavior.

> Are the boxes also removed from the DOM tree if they are discarded? 

Boxes have nothing to do with the DOM tree other than being based on it; 
why would anything we do with boxes affect the DOM tree in any way?

> The term "discard" may be a bit too harsh here. Maybe just say removed or not rendered.

I'm not tied to the term, as long as we defined whatever term we use. 
Sadly, there is no predefined term for this in the spec.  There probably 
should be.

> Just for clarification, the term 'box tree', what is this specifically referring to?

CSS specifies that boxes have parent boxes.  This gives the set of boxes 
and obvious tree structure.  It even so happens that the list of child 
boxes of a given parent is ordered, though this is not made very clear 
in the spec (and should be made clear, as I've said before)...

> Rules 5 and 7: why only discard a generated box if it has one discardable child? What if there are multiple discardable children?

Good catch.  This should discard if and only if all children are 
discardable.

> What about orphan captions and table-columns/groups (e.g. with no defined table container)? They are considered table-related-outside, yet there is no explicit rule to fix them up in anonymous tables.

They're covered by rule 4:

4) If a box P that is not table-related-inside has an in-flow child box
    T that is table-related-outside, generate a box P'.  P' must be an
    'inline-table' box if P is 'inline' and a 'table' box otherwise.
    Take the maximal consecutive set of boxes which contains T and
    consists only of boxes that are table-related-outside and wrap this
    set in P'.

Did you find a case this doesn't cover?

Thank you for the excellent feedback!

-Boris

Received on Wednesday, 22 July 2009 18:25:10 UTC