Closed Bug 1558001 Opened 3 months ago Closed 2 months ago

DOMMatrix converts double into float

Categories

(Core :: DOM: Core & HTML, defect)

69 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox67 --- wontfix
firefox68 --- wontfix
firefox69 --- fixed

People

(Reporter: saschanaz, Assigned: saschanaz)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0

Steps to reproduce:

new DOMMatrix([.9, .8, .7, .6, .5, .4])

Actual results:

DOMMatrix { a: 0.8999999761581421, b: 0.800000011920929, c: 0.699999988079071, d: 0.6000000238418579, e: 0.5, f: 0.4000000059604645, m11: 0.8999999761581421, m12: 0.800000011920929, m13: 0, m14: 0 }

Expected results:

DOMMatrix { a: 0.9, b: 0.8, c: 0.7, d: 0.6, e: 0.5, f: 0.4, m11: 0.9, m12: 0.8, m13: 0, m14: 0 }

The spec defines the constructor argument and attributes as unrestricted doubles and yet the implementation internally uses float.

Hi, I was able to reproduce this issue on my machine with Firefox Release 67, Firefox Beta 68.0b9 and Nightly 69.0a1.

Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Core & HTML
Ever confirmed: true
Product: Firefox → Core
Blocks: 1364400

DOMMatrix now internally uses double instead of float. This only fixes DOMMatrix internals so we still have to work on Servo CSS Parser to pass doubles instead of floats.

Hmm. Did the spec use to say float or something?

Flags: needinfo?(saschanaz)

No prose requires a specific type but the IDL consistently uses unrestricted double.

Flags: needinfo?(saschanaz)
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a488599483ee
Use double for DOMMatrix r=bzbarsky
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Assignee: nobody → saschanaz

I assume this can ride the trains. Please reset status and request uplift if not.

You need to log in before you can comment on or make changes to this bug.