Closed Bug 1392722 Opened 2 years ago Closed 5 months ago

DOMMatrixReadOnly.rotateFromVector() returns wrong matrix if x or y params are zero

Categories

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

54 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: paul.lebeau, Assigned: saschanaz)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170628075643

Steps to reproduce:

Try the following test: https://jsfiddle.net/uezpwx14/2/

let  m = new DOMMatrix();
console.log("Expected: " + m.rotate(90));
console.log("Actual:   " + m.rotateFromVector(0, 1));



Actual results:

rotateFromVector(0, 1) returns an unchanged matrix.


Expected results:

rotateFromVector(0, 1) should give the same result as rotate(90)

rotateFromVector() seems to return the correct results if neither of the x and y parameters are zero.  But if either are 0, an unchanged matrix is returned.

This behaviour is expected if BOTH parameters are zero, so I am guessing that there is a || in that test where there should be an && :)
Component: Untriaged → DOM
Product: Firefox → Core
Priority: -- → P3
Component: DOM → DOM: Core & HTML
Assignee: nobody → saschanaz
Keywords: checkin-needed
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

This patch could not be landed due to uncomitted changes. Removing the checkin-needed tag.

Flags: needinfo?(saschanaz)
Keywords: checkin-needed
Flags: needinfo?(saschanaz)
Keywords: checkin-needed

Pushed by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cc6fbf8afb48
Allow zero in rotateFromVector r=bzbarsky

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/17703 for changes under testing/web-platform/tests
Upstream PR merged
You need to log in before you can comment on or make changes to this bug.