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 29820 - "To set the dictionary members a and b of a DOMM..."
Summary: "To set the dictionary members a and b of a DOMM..."
Status: RESOLVED FIXED
Alias: None
Product: FXTF
Classification: Unclassified
Component: Geometry (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: sideshowbarker+geometry
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-13 22:26 UTC by Peter Hall
Modified: 2016-09-15 08:39 UTC (History)
1 user (show)

See Also:


Attachments

Description Peter Hall 2016-09-13 22:26:46 UTC
https://drafts.fxtf.org/geometry-1/#validate-and-fixup

[[
2. Set the dictionary members a and m11 with fallback value 1.
etc.
]]
And
[[
To set the dictionary members a and b of a DOMMatrixInit dictionary, with a fallback value fallback, run the following steps:

If a is present and b is not present, set the b dictionary member to the value of a.
Otherwise, if b is present and a is not present, set the a dictionary member to the value of b.
Otherwise, if neither a or b are present, set a and b dictionary members to fallback.
]]


The a-f properties are never used internally, and don't need to be set - only the mXX values need to be used hereafter, so it makes more sense to only talk about the final values of m11, m12, m21, m22, m41 & m42. As written, it gives the impression that the DOMMatrixInit object should be mutated, which I don't think is the intention.

I think the following makes more sense:
[[

2. If m11 is not present then set it to the value of member a, or value 1 if a is also not present.
3. If m12 is not present then set it to the value of member b, or value 0 if b is also not present.
etc.
]]
Comment 1 Simon Pieters 2016-09-14 12:18:36 UTC
https://github.com/w3c/fxtf-drafts/commit/9d828cef34fccc5303af7a09b0ccdffecd3f18a6

Thanks!

The DOMMatrixInit is mutated, but it's a copy that is mutated.
http://heycam.github.io/webidl/#dfn-dictionary
Comment 2 Peter Hall 2016-09-15 08:39:43 UTC
(In reply to Simon Pieters from comment #1)
> https://github.com/w3c/fxtf-drafts/commit/
> 9d828cef34fccc5303af7a09b0ccdffecd3f18a6
> 
> Thanks!
> 
> The DOMMatrixInit is mutated, but it's a copy that is mutated.
> http://heycam.github.io/webidl/#dfn-dictionary

Thanks for the clarification on dictionaries.