Created attachment 271870 [details] transform bug demo Nested (orange) div should be translated to the right: <div style='background: green'> <div style="width:100px; height: 100px; background: orange; transform: translateX(0.0000001E+9px);">42424242</div> </div> See the image attached. FireFox and Chrome render this properly. Verified using latest Nightly build (Version 9.0.3 (10601.4.4, r196858)) on OSX (10.10.5) Have also confirmed this bug in mobile iOS browser (Mozilla/5.0 (iPhone; CPU iPhone OS 9_2_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13D15 Safari/601.1) Verified that the same happens for matrix3 transforms. JSBin: http://jsbin.com/didotureja/edit?html,css,output CSS Specs for <number>: https://www.w3.org/TR/css3-values/#number-value - allows exponential notation
<rdar://problem/24945902>
Created attachment 278583 [details] Reduction test case
Looks like the parser is saying the CSSPrimitiveValue's unit is CSSPrimitiveValue::CSS_DIMENSION instead of CSSPrimitiveValue::CSS_NUMBER
The problem is in the "case CharacterNumber" part of CSSParser::realLex(). We see the string "5.868880048609526e-9" and we parse 5.868880048609526 (in charactersToDouble()) but when we hit the "e" we think this is part of a unit (like "em" or "ex" and we bail when we realize the "-" isn't part of any unit.
It looks like we already have handling for this, but it's behind a "if (m_context.mode == SVGAttributeMode)" guard.
The spec says: matrix3d() = matrix3d( <number> [, <number> ]{15,15} )[1] "When written literally, a number is either an integer, or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits and optionally an exponent composed of "e" or "E" and an integer."[2] [1] https://drafts.csswg.org/css-transforms/#funcdef-matrix3d [2] https://drafts.csswg.org/css-values-3/#number-value
Created attachment 278600 [details] WIP
(In reply to comment #7) > Created attachment 278600 [details] > WIP This patch causes many many tests to fail.
Most of the tests which fail are in css3/ and fast/
See also bug 127720, bug 130542
Dup of bug 127720?
*** This bug has been marked as a duplicate of bug 127720 ***