Comment 7 for bug 1245989

Revision history for this message
Tavmjong Bah (tavmjong-free) wrote :

width="100%" and height="100%" are valid, in fact they are the default values (See: http://www.w3.org/TR/SVG/struct.html#SVGElementWidthAttribute)

We handle width="100%" and height="100%" fine if there is a viewBox. If there is no width/height and no viewBox then one assumes a scaling of 1 (1user-unit is the same as 1px). So absolute units work. This will render the above file (clipRect.svg) correctly. (Note: The browsers render the file correctly.)

We do need an "effective page" to calculate % values against but we can choose what ever we want. I would suggest using something like 500x500 px. So the 'viewBox' should default to (0 0 500 500).