Last Comment Bug 716628 - Support "turn" unit from CSS3 Values and Units
: Support "turn" unit from CSS3 Values and Units
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: P3 enhancement (vote)
: mozilla13
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
Depends on: 726465
Blocks: css3-values
  Show dependency treegraph
 
Reported: 2012-01-09 12:10 PST by :Aryeh Gregor (away until August 15)
Modified: 2012-04-02 16:48 PDT (History)
3 users (show)
bzbarsky: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Implement support for 'turn' unit in CSS. (18.18 KB, patch)
2012-01-09 21:16 PST, Boris Zbarsky [:bz]
dbaron: review+
Details | Diff | Splinter Review

Description :Aryeh Gregor (away until August 15) 2012-01-09 12:10:26 PST
"""
turn
Turns. There is 1 turn in a full circle.
"""
http://dev.w3.org/csswg/css3-values/#turn

Test case:
data:text/html,<!doctype html>
<style>div {
height:50px;
width:50px;
background:blue;
-moz-transform:rotate(0.125turn);
}</style>
<div></div>

The square should be tilted 45 degrees.  In Firefox 12.0a1 (2012-01-09), it's not.  In IE9, Chrome 17 dev, and Opera Next 12.00 alpha, if the prefix is adjusted, it is.  This causes Firefox to fail some of the 2D Transform tests I'm writing.
Comment 1 Boris Zbarsky [:bz] 2012-01-09 21:16:40 PST
Created attachment 587242 [details] [diff] [review]
Implement support for 'turn' unit in CSS.

Pretty straightforward
Comment 2 David Baron :dbaron: ⌚️UTC+1 (mostly busy through August 4; review requests must explain patch) 2012-01-19 14:44:29 PST
Comment on attachment 587242 [details] [diff] [review]
Implement support for 'turn' unit in CSS.

Also adjust the switch in the SetGradient function in nsRuleNode.cpp, and add a test for the gradient angle that fails without that adjustment.

r=dbaron with that
Comment 3 Boris Zbarsky [:bz] 2012-02-03 20:50:39 PST
Gah.  I thought I'd fixed that switch....  I did hit the assert, but of course that doesn't make mochitest fail.

I'll add a test to test_computed_style.html.
Comment 5 Ed Morley [:emorley] 2012-02-05 04:12:06 PST
https://hg.mozilla.org/mozilla-central/rev/a096800c8f6b

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