mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Generate StyleTimingFunction and drop ns_timing_function.rs.
First, we generate StyleComputedTimingFunction by cbindgen from Rust, and use it in nsTimingFunction, so we could copy it directly without handling the different memory layout. However, we have to rewrite the nsTimingFunction and mozilla::ComputedTimingFunction for this. Second, the rust-bindgen seems cannot generate the correct generic members from complex C++ templates, especially for the nested template struct, (https://github.com/rust-lang-nursery/rust-bindgen/issues/1429) So we have to hide StyleTimingFunction to avoid the compilation errors. Differential Revision: https://phabricator.services.mozilla.com/D9313
This commit is contained in:
parent
2bbcb5c633
commit
3723042937
7 changed files with 42 additions and 146 deletions
|
@ -5,7 +5,10 @@
|
|||
//! Computed types for CSS Easing functions.
|
||||
|
||||
use values::computed::{Integer, Number};
|
||||
use values::generics::easing::TimingFunction as GenericTimingFunction;
|
||||
use values::generics::easing;
|
||||
|
||||
/// A computed timing function.
|
||||
pub type TimingFunction = GenericTimingFunction<Integer, Number>;
|
||||
pub type ComputedTimingFunction = easing::TimingFunction<Integer, Number>;
|
||||
|
||||
/// An alias of the computed timing function.
|
||||
pub type TimingFunction = ComputedTimingFunction;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue