This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22419 - SVGMatrix rotateFromVector exception
Summary: SVGMatrix rotateFromVector exception
Status: NEW
Alias: None
Product: SVG
Classification: Unclassified
Component: ECMAScript Language Binding (show other bugs)
Version: SVG 2.0
Hardware: All All
: P2 normal
Target Milestone: Test Suite
Assignee: Doug Schepers
QA Contact: SVG Public List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-20 15:37 UTC by Erik Arvidsson
Modified: 2013-06-20 17:20 UTC (History)
1 user (show)

See Also:


Attachments

Description Erik Arvidsson 2013-06-20 15:37:31 UTC
http://www.w3.org/TR/SVG2/single-page.html#coords-__svg__SVGMatrix__rotateFromVector

SVGMatrix is documented to throw an InvalidAccessError. Maybe it makes more sense to throw a RangeError (since 0 is outside the valid range). http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.11.6.2

Another option is to throw a TypeError?
Comment 1 Erik Arvidsson 2013-06-20 16:07:52 UTC
I guess the same issue applies to skewX and skewY
Comment 2 Dirk Schulze 2013-06-20 16:20:21 UTC
The idea is to replace SVGMatrix with the interface CSSMatrix https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html It still needs approval from the CSS WG though.

This would also get rid of the exception handling, since we try to avoid exceptions in general unless you do something forbidden nowadays.

Also, I assume the old exception handling is based on SVG exceptions which got replaced by general DOM exception in SVG2.
Comment 3 Erik Arvidsson 2013-06-20 16:36:42 UTC
CSSMatrix does not document what happens when x or y is 0.
Comment 4 Dirk Schulze 2013-06-20 17:16:25 UTC
(In reply to comment #3)
> CSSMatrix does not document what happens when x or y is 0.

Doesn't need to. Some matrix values get undefined.
Comment 5 Dirk Schulze 2013-06-20 17:20:06 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > CSSMatrix does not document what happens when x or y is 0.
> 
> Doesn't need to. Some matrix values get undefined.

Sorry, in general depends on the math of each function. Some values can get none-finit.