Emilio Cobos Álvarez
a9c88729a8
style: Remove two useless mem::replace calls.
...
Differential Revision: https://phabricator.services.mozilla.com/D76884
2020-06-04 01:50:36 +02:00
Kunal Mohan
f3fa53b849
update rust toolchain
2020-05-21 21:51:49 +05:30
Emilio Cobos Álvarez
f76acc84c6
style: Reformat recent changes.
2020-04-16 17:50:17 +02:00
Emilio Cobos Álvarez
787ac98d18
style: Properly reject numbers as part of <length-percentage>.
...
We never fast-reject numbers (because they could be part of a product). Without
this refactoring we'd accept stuff like calc(10) and crash during the evaluation
for obvious reasons.
Differential Revision: https://phabricator.services.mozilla.com/D63401
2020-04-16 16:35:07 +02:00
Emilio Cobos Álvarez
039ef3dd53
style: Fix one minor serialization issue which was causing test failures.
...
We were serializing calc(10% + 4px) as calc(10% + calc(4px)).
Differential Revision: https://phabricator.services.mozilla.com/D63400
2020-04-16 16:35:07 +02:00
Emilio Cobos Álvarez
c0f2a4e785
style: Simplify math function resolution.
...
So as to avoid allocating an intermediate tree in Rust to resolve
`<length-percentage>` values.
Differential Revision: https://phabricator.services.mozilla.com/D63399
2020-04-16 16:35:07 +02:00
Emilio Cobos Álvarez
280402b2a1
style: Fix C++ side of <length-percentage> values.
...
Differential Revision: https://phabricator.services.mozilla.com/D63398
2020-04-16 16:35:07 +02:00
Emilio Cobos Álvarez
7e8dbd0896
style: Make CalcNode the specified representation of <length> and <length-percentage> values.
...
This is the meat of the patch. There are a couple improvements done in a couple
later patches which should hopefully be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D63397
2020-04-16 16:35:07 +02:00
Emilio Cobos Álvarez
426edbd991
style: Move the guts of calc nodes into a generic enum.
...
We'll have different leaf nodes as we progress in the value computation stage.
Differential Revision: https://phabricator.services.mozilla.com/D63396
2020-04-16 16:35:07 +02:00