Re: Funny parsing issue...

On Wed, 14 Jan 2009, Travis Leithead wrote:
>
> <style>
> P { border: red solid 1px; }
> P P { border: green solid 1px;}
> </style>
> <p>A paragraph
> <object>
> <p>innerP
> </object>
> 
> Issue: P nested inside another P is incorrect.

The HTML parsing rules don't prevent illegal DOMs from being created, 
correct. Other examples that generate illegal DOMs:

   Bogus content in a table:
   <table><input type=hidden><tbody><tr><td>...</table>

   P inside SPAN:
   <span><p>...

All of the above are also mising the <!DOCTYPE> and the <title> element.


> I thought I read somewhere on this mailing list that per HTML5 we're 
> supposed to ignore/treat-as-opaque fallback content from an Object. Can 
> someone point out where that might be specified?

I'm not sure what you mean. Scripts, form controls, etc, inside an 
<object> continue to work as normal; regardless of whether the fallback is 
shown or not. The fallback being shown or not is purely a CSS issue 
really. The only things that the spec does or will say about fallback as 
far as I am aware is that plugins on elements inside <object>s that aren't 
showing their fallback should not themselves be instantiated. (This is 
already in the spec for nested <object>s, it's the first step of the 
<object> algorithm. I still need to explicitly say it for <applet>-in- 
<object> and <embed>-in-<object>, that's bug 6434.)

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 14 January 2009 21:08:34 UTC