Auto merge of #15863 - BorisChiou:animation/ns_timing_function, r=heycam

stylo: update ns_timing_function

This is an interdependent binding fix for [Bug 1248340](https://bugzilla.mozilla.org/show_bug.cgi?id=1248340).

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1248340](https://bugzilla.mozilla.org/show_bug.cgi?id=1248340)
- [X] These changes do not require tests because Bug 1248340 will merge some wpt tests for frames timing function.

<!-- 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/15863)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-03-07 23:03:21 -08:00 committed by GitHub
commit ee3af09a8c
3 changed files with 1491 additions and 1408 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -17,7 +17,7 @@ impl nsTimingFunction {
"function_type should be step-start or step-end");
self.mType = function_type;
unsafe {
self.__bindgen_anon_1.__bindgen_anon_1.as_mut().mSteps = steps;
self.__bindgen_anon_1.__bindgen_anon_1.as_mut().mStepsOrFrames = steps;
}
}
@ -91,13 +91,19 @@ impl From<nsTimingFunction> for ComputedTimingFunction {
fn from(function: nsTimingFunction) -> ComputedTimingFunction {
match function.mType {
nsTimingFunction_Type::StepStart => {
ComputedTimingFunction::Steps(unsafe { function.__bindgen_anon_1.__bindgen_anon_1.as_ref().mSteps },
ComputedTimingFunction::Steps(
unsafe { function.__bindgen_anon_1.__bindgen_anon_1.as_ref().mStepsOrFrames },
StartEnd::Start)
},
nsTimingFunction_Type::StepEnd => {
ComputedTimingFunction::Steps(unsafe { function.__bindgen_anon_1.__bindgen_anon_1.as_ref().mSteps },
ComputedTimingFunction::Steps(
unsafe { function.__bindgen_anon_1.__bindgen_anon_1.as_ref().mStepsOrFrames },
StartEnd::End)
},
nsTimingFunction_Type::Frames => {
// https://github.com/servo/servo/issues/15740
panic!("Frames timing function is not support yet");
}
nsTimingFunction_Type::Ease |
nsTimingFunction_Type::Linear |
nsTimingFunction_Type::EaseIn |