Re: handling fallback content for still images

On Jul 9, 2007, at 3:01 AM, Robert Burns wrote:

>
> On Jul 9, 2007, at 4:54 AM, Maciej Stachowiak wrote:
>
>>
>>
>> On Jul 9, 2007, at 12:52 AM, Robert Burns wrote:
>>
>>>
>>> Earlier in this thread Mcaiej indicated that Opera and Safari (now  
>>> anyway with an XML de-serialization) are adding an anonymous tbody  
>>> element for CSS purposes.
>>
>> It's not an actually element in the DOM, so it's not really  
>> accurate to say element. They are anonymous boxes in the CSS visual  
>> formatting model. See here for more detail than you ever wanted:
>
> Understood, I should have said anonymous box.
>
>>
>> http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes
>>
>> These anonymous boxes let the table render, but they do not affect  
>> CSS selectors or DOM scripting.
>
> Sorry, I misunderstood. How is that different than the current  
> behavior (not in beta 3, but in 2)? The table still renders there.  
> Right? So with this approach you still won't be able to do tbody  
> {property: value;} or anything else like that. Is that correct?

I'm not sure any more what you mean by current behavior. To my  
knowledge:

- Safari 2 inserted a tbody element into the DOM for XHTML. This has  
been true in Safari for a while. I think it is still true in the  
Safari 3 beta.
- In current SVN WebKit, we no longer insert a tbody element into the  
DOM in xhtml, but we do have the relevant anonymous boxes in the  
render tree. Someday this will likely be picked up in a released  
Safari version.

This affects at least the following things:

1) Styling the tbody element.
2) CSS selectors that assume tbody is or isn't present but target tr  
or td, etc.
3) DOM traversals that look for tr elements expecting the tbody to be  
there, or to not be there.
4) Table-specific DOM methods like HTMLTableElement.insertRow, which  
could have different behavior depending on whether that implicit tbody  
is in the DOM.
5) innerHTML on the table will give different results, when supported  
for XHTML.

I'm sure there's more I am not thinking of. So a construct like  
<table><tr><td>foo</td></tr></table> could have all sorts of behavior  
differences in HTML vs. XHTML, depending on what scripts and  
stylesheets you are using.

(Note, the tbody isn't only in the DOM in HTML when you say  
<table><tr>; it has an implicit open tag which means that semantically  
it is always there in the document, even when there isn't a tag for  
it. Yes, this is weird and confusing. But we are stuck with it.)

Regards,
Maciej

Received on Monday, 9 July 2007 10:33:43 UTC