Re: HTML5 and SVG

On Monday 2010-07-19 15:34 +0000, Patrick Dengler wrote:
> Thanks for the responses. The way I read this for the scenario below:
> 
> " Otherwise, if 'width' has a computed value of 'auto', but none
> of the conditions above are met, then the used value of 
> 	'width' becomes 300px. 

Well, our interpretation (and I admit there's a bit of
interpretation involved here) is that the SVG spec saying that
the width attribute on the SVG element defaults to 100% means that
the computed value of width is 100%, not auto.

> Otherwise, if 'height' has a computed value of 'auto', but none of
> the conditions above are met, then the used value of 'height' must
> be set to the height of the largest rectangle that has a 2:1
> ratio, 
> 	has a height not greater than 150px

However, in the case of height, the equivalent computed value of
100% turns into auto because of the rules in CSS about percentage
heights in containing blocks without explicit height:
http://www.w3.org/TR/CSS21/visudet.html#the-height-property

> Thus it should be 300x150.  Unfortunately, we are unsure if this
> expected behavior. We are not seeing this behavior anywhere else
> in HTML.  

... which means Mozilla displays the testcase as 100% width * 150px
height.

I'm not sure whether this interpretation of what the SVG spec says
about the width and height attributes is really ideal, though.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Monday, 19 July 2010 16:14:15 UTC