W3C home > Mailing lists > Public > www-svg@w3.org > July 2010

RE: HTML5 and SVG

From: Patrick Dengler <patd@microsoft.com>
Date: Mon, 19 Jul 2010 15:34:17 +0000
To: "L. David Baron" <dbaron@dbaron.org>, Alex Danilo <alex@abbra.com>
CC: "www-svg@w3.org" <www-svg@w3.org>, Jennifer Yu <Jennifer.Yu@microsoft.com>, Tony Schreiner <tonyschr@microsoft.com>, "Sylvain Galineau" <sylvaing@microsoft.com>
Message-ID: <4A2DB3AE4504E944AF122BBFBA7FBA1F514F77AC@TK5EX14MBXC118.redmond.corp.microsoft.com>
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. 

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


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

Either way this is a key scenario for the vendors to agree upon, so let's do so.

Thanks!

Patrick
-----Original Message-----
From: L. David Baron [mailto:dbaron@dbaron.org] 
Sent: Friday, July 16, 2010 4:32 PM
To: Alex Danilo
Cc: Patrick Dengler; www-svg@w3.org; Jennifer Yu; Tony Schreiner
Subject: Re: HTML5 and SVG

On Saturday 2010-07-17 08:53 +1000, Alex Danilo wrote:
> Are you aware of the work done by the Compound Documents Format (CDF) 
> working group (now defunct).
> 
> It was formed to address these sort of issues when trying to mix 
> different namespaces in XML. That work predates the HTML5 effort but 
> it did include representatives of most of the browser vendors.

It's also worth noting that a bunch of the requirements that browser vendors brought up in discussions in CDF actually ended up being addressed by clarifications in other specs.  In particular, a bunch is specified in HTML5 and in CSS 2.1 that was not specified then.

In particular, for this case, I think the sizing behavior for SVG-in-HTML is pretty clearly defined by sections 10.3.2 and 10.6.2 of CSS 2.1:
http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width
http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height
and by the SVG specification, probably most importantly:
http://www.w3.org/TR/SVG11/coords.html#ViewportSpace

Since the *svg* element defaults to width="100%" and height="100%", the size of the svg element in this case is defined by the behavior of percentage widths and heights in CSS, and then the size of the rect follows from that according to the rules in the SVG spec.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Monday, 19 July 2010 15:34:52 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:45 GMT