Fix some tests to:
* Not assume `double` precision.
* Account for recent working group resolution with regards to NaN: https://github.com/w3c/csswg-drafts/issues/7067#issuecomment-1111211295
Not sure I caught all, but normalizing to 0 was already our existing
behavior. This feature needs more work before it can be enabled more
generally, so make it nightly-only, for now.
Also, it's unclear per spec what the serialization for infinity*1s or so
should be. Right now we serialize to <very-big-number>s, which seems
reasonable, but some tests (but not others!) expect different behavior.
I left those untouched for now.
Differential Revision: https://phabricator.services.mozilla.com/D154883
While I was looking at this, let's fix some incorrect tests.
The changes to expect simplification come from
https://drafts.csswg.org/css-values-4/#calc-simplification:
Internal representations of math functions are eagerly simplified to
the extent possible, using standard algebraic simplifications
(distributing multiplication over sums, combining similar units,
etc.)
The changes to tests that expected 0% / 0px / etc are just wrong because
the test harness treat 0 as the "default" used value, and fails. These
fail in all browsers.
Depends on D154831
Differential Revision: https://phabricator.services.mozilla.com/D154832
We now have test coverage, so let's do this.
The remaining failures are just about infinity/nan, which is a
completely different feature.
Differential Revision: https://phabricator.services.mozilla.com/D154831
Fix some tests to:
* Not assume `double` precision.
* Account for recent working group resolution with regards to NaN: https://github.com/w3c/csswg-drafts/issues/7067#issuecomment-1111211295
Not sure I caught all, but normalizing to 0 was already our existing
behavior. This feature needs more work before it can be enabled more
generally, so make it nightly-only, for now.
Also, it's unclear per spec what the serialization for infinity*1s or so
should be. Right now we serialize to <very-big-number>s, which seems
reasonable, but some tests (but not others!) expect different behavior.
I left those untouched for now.
Differential Revision: https://phabricator.services.mozilla.com/D154883
While I was looking at this, let's fix some incorrect tests.
The changes to expect simplification come from
https://drafts.csswg.org/css-values-4/#calc-simplification:
Internal representations of math functions are eagerly simplified to
the extent possible, using standard algebraic simplifications
(distributing multiplication over sums, combining similar units,
etc.)
The changes to tests that expected 0% / 0px / etc are just wrong because
the test harness treat 0 as the "default" used value, and fails. These
fail in all browsers.
Depends on D154831
Differential Revision: https://phabricator.services.mozilla.com/D154832
We now have test coverage, so let's do this.
The remaining failures are just about infinity/nan, which is a
completely different feature.
Differential Revision: https://phabricator.services.mozilla.com/D154831
This is a "simplified" implementation of 'ic', similar to what Safari Preview
currently supports: it only considers the advance of U+6C34 if found in the
first available font, and otherwise falls back to the default of 1em.
(The spec allows for this "in cases where it is impossible or impractical to
determine the ideographic advance measure".)
Differential Revision: https://phabricator.services.mozilla.com/D132818
There's still some potential work to do for layout-dependent shorthands, but I
believe given there's only progressions here this is worth doing.
Differential Revision: https://phabricator.services.mozilla.com/D132286