W3C home > Mailing lists > Public > public-html@w3.org > October 2008

Re: Don't make <h1><h1> nest

From: Simon Pieters <simonp@opera.com>
Date: Mon, 13 Oct 2008 14:06:49 +0200
To: public-html <public-html@w3.org>
Message-ID: <op.uiyo9nxfidj3kv@zcorpandell.linkoping.osa>

On Mon, 13 Oct 2008 10:27:45 +0200, Simon Pieters <simonp@opera.com> wrote:

> http://html5.org/tools/web-apps-tracker?from=925&to=926
>
> In order to get the layout right, what is actually needed is a unit that  
> acts like 'em' but ignores ancestor h1-h6 elements when calculating the  
> computed style of font-size. Using 'rem' or similar isn't good enough  
> because pages can set the font-size on root to something that isn't used  
> for the actual text on the page, or some pages have a sidebar in a  
> smaller font, etc.
>
> So we've decided to do what webkit does. (Any element in between whose  
> end tag isn't implied by <h1> makes them nest.)

What about <h1><p><font><h2>x

I'm tempted to say that the <h2> should cause the imply-end-tag-for-p  
rules to be followed, so that the h1 is at the top of the stack (or is it  
bottom?), and so the tree would be

<h1>
   <p>
     <font>
<h2>
   <font>
     "x"

But I'm not sure.


PS. It seems that in webkit, <p><font><h2>x is parsed into

<p>
   <font>
     <h2>
       "x"

and <p><font><p>x is parsed into

<p>
   <font>
<font>
   <p>
     "x"

which causes less elements in the tree than the spec for  
<p><u><u><u><p>x<p>x<p>x...

-- 
Simon Pieters
Opera Software
Received on Monday, 13 October 2008 12:07:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:58 UTC