style: Rust side plumbing work for linear easing function

Add LinearFunction to TimingFunction. Because the linear function is a
variable list of linear stops, the enum is no longer Copyable.

Differential Revision: https://phabricator.services.mozilla.com/D146837
This commit is contained in:
David Shin 2022-06-07 11:51:24 +00:00 committed by Martin Robinson
parent 898cafb5a5
commit 6326a384a8
6 changed files with 81 additions and 25 deletions

View file

@ -1046,7 +1046,7 @@ fn static_assert() {
for (ours, others) in iter {
% if member:
ours.m${gecko_ffi_name}.${member} = others.m${gecko_ffi_name}.${member};
ours.m${gecko_ffi_name}.${member} = others.m${gecko_ffi_name}.${member}.clone();
% else:
ours.m${gecko_ffi_name} = others.m${gecko_ffi_name}.clone();
% endif
@ -1111,7 +1111,7 @@ fn static_assert() {
${impl_copy_animation_or_transition_value(type, 'timing_function', "TimingFunction", "mTiming")}
pub fn ${type}_timing_function_at(&self, index: usize)
-> longhands::${type}_timing_function::computed_value::SingleComputedValue {
self.gecko.m${type.capitalize()}s[index].mTimingFunction.mTiming
self.gecko.m${type.capitalize()}s[index].mTimingFunction.mTiming.clone()
}
</%def>