mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
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:
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
|
@ -17,7 +17,7 @@ impl nsTimingFunction {
|
||||||
"function_type should be step-start or step-end");
|
"function_type should be step-start or step-end");
|
||||||
self.mType = function_type;
|
self.mType = function_type;
|
||||||
unsafe {
|
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 {
|
fn from(function: nsTimingFunction) -> ComputedTimingFunction {
|
||||||
match function.mType {
|
match function.mType {
|
||||||
nsTimingFunction_Type::StepStart => {
|
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)
|
StartEnd::Start)
|
||||||
},
|
},
|
||||||
nsTimingFunction_Type::StepEnd => {
|
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)
|
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::Ease |
|
||||||
nsTimingFunction_Type::Linear |
|
nsTimingFunction_Type::Linear |
|
||||||
nsTimingFunction_Type::EaseIn |
|
nsTimingFunction_Type::EaseIn |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue