- From: Erik Dahlstrom <ed@opera.com>
- Date: Fri, 11 Dec 2009 15:01:50 +0100
- To: "public-svg-wg@w3.org" <public-svg-wg@w3.org>
- Cc: "Cameron McCormack" <cam@mcc.id.au>
Hello svg-wg, I've been reviewing testcases for checkIntersection, getIntersectionList, checkEnclosure and getEnclosureList (one of the remaining unreviewed tests: http://www.w3.org/Graphics/SVG/WG/wiki/Errata_in_SVG_1.1_Second_Edition#Jonathan). http://dev.w3.org/SVG/profiles/1.1F2/test/svg/struct-dom-11-f.svg I've tested Batik 1.7 and Opera 10.10, and it seems like "initial coordinate system" from the definitions of the above methods may have been interpreted differently. Opera expects the rectangle that is passed in to be in initial viewport coordinates[1], so to pass the test the coordinates that are given in the test (which seem to be in user units) need to be transformed first. The test works fine if and only if the userspace coordinate system matches the initial viewport coordinate system, or in other words when the computed size of the svg image matches the viewBox. If loading the svg file separately in Opera it fails because the two coordinate spaces usually don't match. Batik seems to not honor the 'pointer-events' property when considering which elements to return, while Opera does. The test has a <g> element that has visibility="hidden" and it expects the elements inside to be intersected. This is not the case unless e.g pointer-events="painted" is specified. Opera expects the elements to be within the viewport, while Batik has no problems with elements outside the viewport. Anyway, moving the elements in the test a bit and adding pointer-events="painted" makes it pass in both viewers (as long as the testframe dimensions matches the viewBox). To make the test more robust the userspace coordinates used in the 'rect' parameter need to be transformed to the initial viewport coordinate system before passing it to checkIntersection/getIntersectionList. Cheers /Erik (part of ACTION-2695) [1] http://www.w3.org/TR/SVG11/coords.html#InitialCoordinateSystem -- Erik Dahlstrom, Core Technology Developer, Opera Software Co-Chair, W3C SVG Working Group Personal blog: http://my.opera.com/macdev_ed
Received on Friday, 11 December 2009 14:00:54 UTC