Auto merge of #16144 - emilio:number-calc, r=heycam

style: Make numbers keep track of whether they were specified as calc().

Fixes #15960

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16144)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-03-27 06:13:39 -07:00 committed by GitHub
commit b6bc49225e
28 changed files with 778 additions and 319 deletions

View file

@ -59,13 +59,16 @@ impl From<SpecifiedTimingFunction> for nsTimingFunction {
match function {
SpecifiedTimingFunction::Steps(steps, StartEnd::Start) => {
tf.set_as_step(nsTimingFunction_Type::StepStart, steps);
debug_assert!(steps.value() >= 0);
tf.set_as_step(nsTimingFunction_Type::StepStart, steps.value() as u32);
},
SpecifiedTimingFunction::Steps(steps, StartEnd::End) => {
tf.set_as_step(nsTimingFunction_Type::StepEnd, steps);
debug_assert!(steps.value() >= 0);
tf.set_as_step(nsTimingFunction_Type::StepEnd, steps.value() as u32);
},
SpecifiedTimingFunction::CubicBezier(p1, p2) => {
tf.set_as_cubic_bezier(p1, p2);
tf.set_as_cubic_bezier(Point2D::new(p1.x.value, p1.y.value),
Point2D::new(p2.x.value, p2.y.value));
},
SpecifiedTimingFunction::Keyword(keyword) => {
match keyword {