Bug 54616

Summary: transform:matrix() doesn’t respect -0 so can’t do clockwise 180° rotation
Product: WebKit Reporter: Oli Studholme <webkit.org>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, dino, graouts, mattwoodrow, mmaxfield, nmouchtaris, rniwa, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
URL: http://oli.jp/bugs/webkit/transform-matrix-rotate.html
Attachments:
Description Flags
demonstration of difference between -webkit-transform:rotate(180deg) (CW) and -webkit-transform:matrix(-1,0,-0,-1,0,0) (CCW) none

Oli Studholme
Reported 2011-02-16 22:28:25 PST
When transitioning rotations, transform:rotate(180deg) goes clockwise. Converting this to a matrix-based rotation gives transform: matrix(-1,0,-0,-1,0,0), but this rotates counter-clockwise (SVG default) when transitioned. It seems WebKit doesn’t respect -0, so it’s not possible to rotate clockwise for 180° (and multiples thereof). Linked example fails in WebKit Version 5.0.3 (6533.19.4, r78685), Safari Version 5.0.3 (6533.19.4) and Chrome 9.0.597.102. -0 is respected and linked example works as expected in Opera 11.01 and Firefox 4 beta. http://oli.jp/bugs/webkit/transform-matrix-rotate.html
Attachments
demonstration of difference between -webkit-transform:rotate(180deg) (CW) and -webkit-transform:matrix(-1,0,-0,-1,0,0) (CCW) (3.96 KB, text/html)
2011-02-17 18:56 PST, Oli Studholme
no flags
Simon Fraser (smfr)
Comment 1 2011-02-17 10:59:27 PST
Please attach your test cases rather than linking to them. Linked files have a habit of going away.
Chris Marrin
Comment 2 2011-02-17 11:08:40 PST
How is this different than https://bugs.webkit.org/show_bug.cgi?id=54617, which I commented on?
Oli Studholme
Comment 3 2011-02-17 18:56:37 PST
Created attachment 82892 [details] demonstration of difference between -webkit-transform:rotate(180deg) (CW) and -webkit-transform:matrix(-1,0,-0,-1,0,0) (CCW) Attaching testcase as per @smfr’s request
Ahmad Saleem
Comment 4 2022-07-13 04:09:26 PDT
I am able to reproduce this bug in Safari 15.5 on macOS 12.4 based on attached test case and fro the expected result - the rotation of transform:matrix(180deg) [second last] is anti-clockwise on hover while all other browsers (Chrome Canary 105 and Firefox Nightly 104) have it as clockwise. Thanks!
Ahmad Saleem
Comment 5 2023-06-08 06:19:59 PDT
Still an issue with WebKit ToT (264981@main). Adding ‘BrowserCompat’ tag for future easier tracking of only failing case in Safari / WebKit.
Radar WebKit Bug Importer
Comment 6 2024-02-08 15:45:15 PST
Note You need to log in before you can comment on or make changes to this bug.