mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Drop Servo_AnimationValues_Uncompute.
This commit is contained in:
parent
b210813124
commit
254d5f6229
5 changed files with 4 additions and 35 deletions
|
@ -420,7 +420,6 @@ mod bindings {
|
||||||
"mozilla::DefaultDelete",
|
"mozilla::DefaultDelete",
|
||||||
"mozilla::Side",
|
"mozilla::Side",
|
||||||
"mozilla::binding_danger::AssertAndSuppressCleanupPolicy",
|
"mozilla::binding_danger::AssertAndSuppressCleanupPolicy",
|
||||||
"RawServoAnimationValueBorrowedListBorrowed",
|
|
||||||
"RawServoAnimationValueMapBorrowed",
|
"RawServoAnimationValueMapBorrowed",
|
||||||
];
|
];
|
||||||
let opaque_types = [
|
let opaque_types = [
|
||||||
|
@ -622,7 +621,6 @@ mod bindings {
|
||||||
"Loader",
|
"Loader",
|
||||||
"ServoStyleSheet",
|
"ServoStyleSheet",
|
||||||
"EffectCompositor_CascadeLevel",
|
"EffectCompositor_CascadeLevel",
|
||||||
"RawServoAnimationValueBorrowedListBorrowed",
|
|
||||||
];
|
];
|
||||||
struct ArrayType {
|
struct ArrayType {
|
||||||
cpp_type: &'static str,
|
cpp_type: &'static str,
|
||||||
|
|
|
@ -175,7 +175,6 @@ use gecko_bindings::structs::nsresult;
|
||||||
use gecko_bindings::structs::Loader;
|
use gecko_bindings::structs::Loader;
|
||||||
use gecko_bindings::structs::ServoStyleSheet;
|
use gecko_bindings::structs::ServoStyleSheet;
|
||||||
use gecko_bindings::structs::EffectCompositor_CascadeLevel;
|
use gecko_bindings::structs::EffectCompositor_CascadeLevel;
|
||||||
use gecko_bindings::structs::RawServoAnimationValueBorrowedListBorrowed;
|
|
||||||
pub type nsTArrayBorrowed_uintptr_t<'a> = &'a mut ::gecko_bindings::structs::nsTArray<usize>;
|
pub type nsTArrayBorrowed_uintptr_t<'a> = &'a mut ::gecko_bindings::structs::nsTArray<usize>;
|
||||||
pub type ServoCssRulesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoCssRules>;
|
pub type ServoCssRulesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoCssRules>;
|
||||||
pub type ServoCssRulesBorrowed<'a> = &'a ServoCssRules;
|
pub type ServoCssRulesBorrowed<'a> = &'a ServoCssRules;
|
||||||
|
@ -1513,11 +1512,6 @@ extern "C" {
|
||||||
progress: f64)
|
progress: f64)
|
||||||
-> RawServoAnimationValueStrong;
|
-> RawServoAnimationValueStrong;
|
||||||
}
|
}
|
||||||
extern "C" {
|
|
||||||
pub fn Servo_AnimationValues_Uncompute(value:
|
|
||||||
RawServoAnimationValueBorrowedListBorrowed)
|
|
||||||
-> RawServoDeclarationBlockStrong;
|
|
||||||
}
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Servo_AnimationValue_Serialize(value:
|
pub fn Servo_AnimationValue_Serialize(value:
|
||||||
RawServoAnimationValueBorrowed,
|
RawServoAnimationValueBorrowed,
|
||||||
|
|
|
@ -25836,10 +25836,10 @@ pub mod root {
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct RawServoAnimationValue([u8; 0]);
|
pub struct RawServoStyleSet([u8; 0]);
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct RawServoStyleSet([u8; 0]);
|
pub struct RawServoAnimationValue([u8; 0]);
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct RawServoAnimationValueMap([u8; 0]);
|
pub struct RawServoAnimationValueMap([u8; 0]);
|
||||||
|
@ -25852,8 +25852,6 @@ pub mod root {
|
||||||
root::nsTArray<root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>>;
|
root::nsTArray<root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>>;
|
||||||
pub type RawGeckoAnimationValueList =
|
pub type RawGeckoAnimationValueList =
|
||||||
root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>;
|
root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>;
|
||||||
pub type RawServoAnimationValueBorrowedList =
|
|
||||||
root::nsTArray<*const root::RawServoAnimationValue>;
|
|
||||||
pub type RawGeckoStyleAnimationList =
|
pub type RawGeckoStyleAnimationList =
|
||||||
root::nsStyleAutoArray<root::mozilla::StyleAnimation>;
|
root::nsStyleAutoArray<root::mozilla::StyleAnimation>;
|
||||||
pub type RawServoAnimationValueMapBorrowed =
|
pub type RawServoAnimationValueMapBorrowed =
|
||||||
|
@ -25869,8 +25867,6 @@ pub mod root {
|
||||||
pub type RawGeckoPresContextBorrowedMut = *mut root::RawGeckoPresContext;
|
pub type RawGeckoPresContextBorrowedMut = *mut root::RawGeckoPresContext;
|
||||||
pub type RawGeckoAnimationValueListBorrowedMut =
|
pub type RawGeckoAnimationValueListBorrowedMut =
|
||||||
*mut root::RawGeckoAnimationValueList;
|
*mut root::RawGeckoAnimationValueList;
|
||||||
pub type RawServoAnimationValueBorrowedListBorrowed =
|
|
||||||
*const root::RawServoAnimationValueBorrowedList;
|
|
||||||
pub type RawGeckoKeyframeListBorrowedMut =
|
pub type RawGeckoKeyframeListBorrowedMut =
|
||||||
*mut root::RawGeckoKeyframeList;
|
*mut root::RawGeckoKeyframeList;
|
||||||
pub type RawGeckoKeyframeListBorrowed = *const root::RawGeckoKeyframeList;
|
pub type RawGeckoKeyframeListBorrowed = *const root::RawGeckoKeyframeList;
|
||||||
|
|
|
@ -25194,10 +25194,10 @@ pub mod root {
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct RawServoAnimationValue([u8; 0]);
|
pub struct RawServoStyleSet([u8; 0]);
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct RawServoStyleSet([u8; 0]);
|
pub struct RawServoAnimationValue([u8; 0]);
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct RawServoAnimationValueMap([u8; 0]);
|
pub struct RawServoAnimationValueMap([u8; 0]);
|
||||||
|
@ -25210,8 +25210,6 @@ pub mod root {
|
||||||
root::nsTArray<root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>>;
|
root::nsTArray<root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>>;
|
||||||
pub type RawGeckoAnimationValueList =
|
pub type RawGeckoAnimationValueList =
|
||||||
root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>;
|
root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>;
|
||||||
pub type RawServoAnimationValueBorrowedList =
|
|
||||||
root::nsTArray<*const root::RawServoAnimationValue>;
|
|
||||||
pub type RawGeckoStyleAnimationList =
|
pub type RawGeckoStyleAnimationList =
|
||||||
root::nsStyleAutoArray<root::mozilla::StyleAnimation>;
|
root::nsStyleAutoArray<root::mozilla::StyleAnimation>;
|
||||||
pub type RawServoAnimationValueMapBorrowed =
|
pub type RawServoAnimationValueMapBorrowed =
|
||||||
|
@ -25227,8 +25225,6 @@ pub mod root {
|
||||||
pub type RawGeckoPresContextBorrowedMut = *mut root::RawGeckoPresContext;
|
pub type RawGeckoPresContextBorrowedMut = *mut root::RawGeckoPresContext;
|
||||||
pub type RawGeckoAnimationValueListBorrowedMut =
|
pub type RawGeckoAnimationValueListBorrowedMut =
|
||||||
*mut root::RawGeckoAnimationValueList;
|
*mut root::RawGeckoAnimationValueList;
|
||||||
pub type RawServoAnimationValueBorrowedListBorrowed =
|
|
||||||
*const root::RawServoAnimationValueBorrowedList;
|
|
||||||
pub type RawGeckoKeyframeListBorrowedMut =
|
pub type RawGeckoKeyframeListBorrowedMut =
|
||||||
*mut root::RawGeckoKeyframeList;
|
*mut root::RawGeckoKeyframeList;
|
||||||
pub type RawGeckoKeyframeListBorrowed = *const root::RawGeckoKeyframeList;
|
pub type RawGeckoKeyframeListBorrowed = *const root::RawGeckoKeyframeList;
|
||||||
|
|
|
@ -56,7 +56,6 @@ use style::gecko_bindings::structs::{ThreadSafePrincipalHolder, ThreadSafeURIHol
|
||||||
use style::gecko_bindings::structs::{nsRestyleHint, nsChangeHint};
|
use style::gecko_bindings::structs::{nsRestyleHint, nsChangeHint};
|
||||||
use style::gecko_bindings::structs::Loader;
|
use style::gecko_bindings::structs::Loader;
|
||||||
use style::gecko_bindings::structs::RawGeckoPresContextOwned;
|
use style::gecko_bindings::structs::RawGeckoPresContextOwned;
|
||||||
use style::gecko_bindings::structs::RawServoAnimationValueBorrowedListBorrowed;
|
|
||||||
use style::gecko_bindings::structs::ServoStyleSheet;
|
use style::gecko_bindings::structs::ServoStyleSheet;
|
||||||
use style::gecko_bindings::structs::nsCSSValueSharedList;
|
use style::gecko_bindings::structs::nsCSSValueSharedList;
|
||||||
use style::gecko_bindings::structs::nsTimingFunction;
|
use style::gecko_bindings::structs::nsTimingFunction;
|
||||||
|
@ -260,20 +259,6 @@ pub extern "C" fn Servo_AnimationValueMap_Push(value_map: RawServoAnimationValue
|
||||||
value_map.write().insert(property.into(), value.clone());
|
value_map.write().insert(property.into(), value.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
|
||||||
pub extern "C" fn Servo_AnimationValues_Uncompute(value: RawServoAnimationValueBorrowedListBorrowed)
|
|
||||||
-> RawServoDeclarationBlockStrong
|
|
||||||
{
|
|
||||||
let value = unsafe { value.as_ref().unwrap() };
|
|
||||||
let mut block = PropertyDeclarationBlock::new();
|
|
||||||
for v in value.iter() {
|
|
||||||
let raw_anim = unsafe { v.as_ref().unwrap() };
|
|
||||||
let anim = AnimationValue::as_arc(&raw_anim);
|
|
||||||
block.push(anim.uncompute(), Importance::Normal);
|
|
||||||
}
|
|
||||||
Arc::new(RwLock::new(block)).into_strong()
|
|
||||||
}
|
|
||||||
|
|
||||||
macro_rules! get_property_id_from_nscsspropertyid {
|
macro_rules! get_property_id_from_nscsspropertyid {
|
||||||
($property_id: ident, $ret: expr) => {{
|
($property_id: ident, $ret: expr) => {{
|
||||||
match PropertyId::from_nscsspropertyid($property_id) {
|
match PropertyId::from_nscsspropertyid($property_id) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue