Bug 145407

Summary: JavaScript WebKitCSSMatrix 'rotate' method on iOS generates matrix different than the method in other OS
Product: WebKit Reporter: damians1987 <damianstefaniak1987>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: benjamin, damianstefaniak1987, dino, jonlee, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 525.x (Safari 3.2)   
Hardware: iPhone / iPad   
OS: iOS 8.4   

Description damians1987 2015-05-27 07:10:35 PDT
stackoverflow: http://stackoverflow.com/questions/30454078/webkitcssmatrix-rotate-method-on-ios-safari-chrome-and-other-browsers-genera
js fiddle testbed: http://jsfiddle.net/DamianS1987/c5c0r4y6/18/

The above js fiddle testbed using WebKitCSSMatrix constructor and 'rotate' method generates following strings:

-iOS (8.3) ipadMini (Safari,Chrome) or ipad 3 retina iOS (8.3)
matrix(0, 0.258819, 0, 0.965926, 0, 0);

-Mac Yosemite, Win8.1, Android (any browser)
matrix(0.965926, 0.258819, -0.258819, 0.965926, 0, 0);

Now most major devices work well. However, ipad (tested on two different devices) generates matrix with 'a' and 'd' values equal to 0 - transform: matrix(a, c, b, d, tx, ty).
Comment 1 damians1987 2015-05-27 07:13:46 PDT
'Platform' dropdown - there was no 'iOS 8.3' option available to select. Hence, 8.2 selected.
Comment 2 Simon Fraser (smfr) 2015-05-28 23:09:15 PDT
Possibly a bug in the ARM assembly used for TransformationMatrix multiply.
Comment 3 damians1987 2015-05-29 01:09:56 PDT
Please let me know if you need any more details about the issue from the devices.
Comment 4 damians1987 2015-08-28 08:03:31 PDT
I just updated my iPadMini to iSO 8.4.1 and after checking the testbed I can still recreate the issue. Do we know if this issue is going to be fixed?
Comment 5 Radar WebKit Bug Importer 2015-08-28 08:16:19 PDT
<rdar://problem/22475169>
Comment 6 Benjamin Poulain 2015-08-28 18:19:20 PDT
I tried the jsfiddle on an iPad 3rd gen with iOS 9 and I cannot reproduce the issue.

I checked the Matrix multiply assembly and I don't see anything weird with it.
LLVM is unfortunately unrolling the loop but the register are preserved.

Can you please try iOS 9?
Comment 7 damians1987 2015-08-29 11:56:45 PDT
Yes, that's right. I can confirm that after updating ipad mini to iOS 9 beta the issue can't be recreated. It seems to be fixed. Thanks for that update.