CSS says <angle> should accept "turn" units <rdar://problem/6217769>
Created attachment 25562 [details] Patch for 'turn' CSS angle unit type + testcases
Comment on attachment 25562 [details] Patch for 'turn' CSS angle unit type + testcases Is it okay for the values in CSSPrimitiveValue.h to mismatch the values in CSSPrimitiveValue.idl?
No, it should be the same. I'll update the patch
Created attachment 25667 [details] updated patch Updated patch for mitz's comment. Also updated test for Window properties since it changed with the new value for CSS_TURN.
Comment on attachment 25667 [details] updated patch The values in the .idl come from <http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue> and I don't think they can be changed. Since the turn unit is not specified (yet?), I think it should be left out of the IDL completely and assigned a UnitType value that does not clash with the IDL-specified ones. It seems like the 100-and-higher range has been used for such "units". Sorry about not thinking about all that before making my previous comment :(
DOH! You're right. The reason I shoved it in the list was I saw a lot of code in the CSS engine that checks for < and > various types. I don't know why the engine thinks the order of those enums is important, but I thought it would be less risky to put a new unit in the "right" place. I'll put it at the end (100+) and see if anything breaks. The unit is defined in CSS3 but not CSS 2.1.
Created attachment 25679 [details] update with (hopefully) correct enum vals Changed the enum values back to the specified values, and added TURN as 100+.
Comment on attachment 25679 [details] update with (hopefully) correct enum vals r=me, but as discussed in IRC, please don't check in the changed to the IDL.
Committed without the IDL change. This also meant the Window DOM testcase didn't need updating. M JavaScriptCore/ChangeLog M JavaScriptCore/wtf/MathExtras.h M LayoutTests/ChangeLog M LayoutTests/transforms/2d/transform-2d-expected.txt M LayoutTests/transforms/2d/transform-2d.html M LayoutTests/transforms/transform-value-types-expected.txt M LayoutTests/transforms/transform-value-types.html M WebCore/ChangeLog M WebCore/css/CSSGrammar.y M WebCore/css/CSSParser.cpp M WebCore/css/CSSPrimitiveValue.cpp M WebCore/css/CSSPrimitiveValue.h M WebCore/css/CSSStyleSelector.cpp M WebCore/css/tokenizer.flex Committed r38959