- From: <bugzilla@jessica.w3.org>
- Date: Fri, 22 Apr 2011 17:04:14 +0000
- To: www-svg@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12540
Summary: Reevaluate handling of invalid viewBox values
Product: SVG
Version: SVG 2.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: Transformations
AssignedTo: schepers@w3.org
ReportedBy: jwatt@jwatt.org
QAContact: www-svg@w3.org
About the viewBox attribute's 'width' and 'height' components, the spec says "A
value of zero disables rendering of the element":
http://www.w3.org/TR/SVG11/coords.html#ViewBoxAttribute
http://www.w3.org/TR/SVGTiny12/coords.html#ViewBoxAttribute
However, Opera, Webkit and IE9 all display SVG files where the viewBox's
width/height has a value of zero. E.g.:
http://srufaculty.sru.edu/david.dailey/svg/newstuff/path5.svg
http://srufaculty.sru.edu/david.dailey/svg/newstuff/path6.svg
http://srufaculty.sru.edu/david.dailey/svg/newstuff/path7.svg
http://srufaculty.sru.edu/david.dailey/svg/newstuff/path8.svg
Actually it's not quite so simple. Consider an SVG file containing the
following markup:
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 0 0">
<rect height="100%" width="100%" fill="orange"/>
<rect height="100" width="100" fill="pink"/>
</svg>
IE shows both the orange and pink rects, so it seems to ignore the invalid
viewBox attribute completely. Opera and Webkit both display the pink rect, but
do not display the orange rect, so they seem to be ignoring the invalid
(singular) implicit transform implied by the viewBox attribute, but seem to
still be resolving percentage lengths against the viewBox (any percentage of
zero is zero, so the orange rect's dimensions resolve to 0px x 0px).
Mozilla displays none of the SVG at all, since it follows the spec on this
point.
I'm happy for Mozilla to either continue to follow what the spec currently says
to do, or to agree to change the spec to do what IE9 does (ignore the broken
viewBox completely), but I don't think that the Opera/Webkit behavior is good.
Either way we should agree on interop behavior here.
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Friday, 22 April 2011 17:04:15 UTC