Re: handling fallback content for still images

On Jul 9, 2007, at 5:33 AM, Maciej Stachowiak wrote:
>
> I'm not sure any more what you mean by current behavior. To my  
> knowledge:

That surprises me. I wouldn't have guessed Safari was inserting a  
tbody in the DOM for XHTML. I saw that it was, in beta 3, but I guess  
I though that was a beta issue. So this means you were treating XHTML  
(when consumed as XML) just the same as you would treat HTML. But now  
you're moving away from that (or you will be).

> - 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.

We expected that (in this thread). But you're saying that until the  
next release of Safari, it is not treated differently. Am I  
understanding you correctly?

> (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.)

No, we understand that. That's been much of the thrust of this  
discussion: i.e., how UAs and authors should be guided on these  
differences by the HTML5 draft (if at all).

Take care,
Rob

Received on Monday, 9 July 2007 10:40:53 UTC