mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Regenerate bindings and tweak some geckolib code for it.
This commit is contained in:
parent
e4a1cb6f87
commit
2f39b49e22
5 changed files with 902 additions and 466 deletions
|
@ -377,6 +377,7 @@ mod bindings {
|
||||||
"mozilla::DefaultDelete",
|
"mozilla::DefaultDelete",
|
||||||
"mozilla::Side",
|
"mozilla::Side",
|
||||||
"mozilla::binding_danger::AssertAndSuppressCleanupPolicy",
|
"mozilla::binding_danger::AssertAndSuppressCleanupPolicy",
|
||||||
|
"RawServoAnimationValueBorrowedListBorrowed",
|
||||||
];
|
];
|
||||||
let opaque_types = [
|
let opaque_types = [
|
||||||
"std::pair__PCCP",
|
"std::pair__PCCP",
|
||||||
|
@ -491,7 +492,6 @@ mod bindings {
|
||||||
"RawGeckoNode",
|
"RawGeckoNode",
|
||||||
"RawGeckoAnimationValueList",
|
"RawGeckoAnimationValueList",
|
||||||
"RawServoAnimationValue",
|
"RawServoAnimationValue",
|
||||||
"RawServoAnimationValueList",
|
|
||||||
"RawGeckoPresContext",
|
"RawGeckoPresContext",
|
||||||
"RawGeckoPresContextOwned",
|
"RawGeckoPresContextOwned",
|
||||||
"ThreadSafeURIHolder",
|
"ThreadSafeURIHolder",
|
||||||
|
@ -558,6 +558,8 @@ mod bindings {
|
||||||
"nsresult",
|
"nsresult",
|
||||||
"Loader",
|
"Loader",
|
||||||
"ServoStyleSheet",
|
"ServoStyleSheet",
|
||||||
|
"EffectCompositor_CascadeLevel",
|
||||||
|
"RawServoAnimationValueBorrowedListBorrowed",
|
||||||
];
|
];
|
||||||
struct ArrayType {
|
struct ArrayType {
|
||||||
cpp_type: &'static str,
|
cpp_type: &'static str,
|
||||||
|
@ -594,7 +596,6 @@ mod bindings {
|
||||||
let servo_borrow_types = [
|
let servo_borrow_types = [
|
||||||
"nsCSSValue",
|
"nsCSSValue",
|
||||||
"RawGeckoAnimationValueList",
|
"RawGeckoAnimationValueList",
|
||||||
"RawServoAnimationValueList",
|
|
||||||
];
|
];
|
||||||
for &ty in structs_types.iter() {
|
for &ty in structs_types.iter() {
|
||||||
builder = builder.hide_type(ty)
|
builder = builder.hide_type(ty)
|
||||||
|
|
|
@ -3,13 +3,11 @@
|
||||||
pub use nsstring::{nsACString, nsAString};
|
pub use nsstring::{nsACString, nsAString};
|
||||||
type nsACString_internal = nsACString;
|
type nsACString_internal = nsACString;
|
||||||
type nsAString_internal = nsAString;
|
type nsAString_internal = nsAString;
|
||||||
use gecko_bindings::structs::EffectCompositor_CascadeLevel;
|
|
||||||
use gecko_bindings::structs::RawGeckoDocument;
|
use gecko_bindings::structs::RawGeckoDocument;
|
||||||
use gecko_bindings::structs::RawGeckoElement;
|
use gecko_bindings::structs::RawGeckoElement;
|
||||||
use gecko_bindings::structs::RawGeckoNode;
|
use gecko_bindings::structs::RawGeckoNode;
|
||||||
use gecko_bindings::structs::RawGeckoAnimationValueList;
|
use gecko_bindings::structs::RawGeckoAnimationValueList;
|
||||||
use gecko_bindings::structs::RawServoAnimationValue;
|
use gecko_bindings::structs::RawServoAnimationValue;
|
||||||
use gecko_bindings::structs::RawServoAnimationValueBorrowedList;
|
|
||||||
use gecko_bindings::structs::RawGeckoPresContext;
|
use gecko_bindings::structs::RawGeckoPresContext;
|
||||||
use gecko_bindings::structs::RawGeckoPresContextOwned;
|
use gecko_bindings::structs::RawGeckoPresContextOwned;
|
||||||
use gecko_bindings::structs::ThreadSafeURIHolder;
|
use gecko_bindings::structs::ThreadSafeURIHolder;
|
||||||
|
@ -152,6 +150,8 @@ use gecko_bindings::structs::nscoord;
|
||||||
use gecko_bindings::structs::nsresult;
|
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::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 ServoComputedValuesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoComputedValues>;
|
pub type ServoComputedValuesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoComputedValues>;
|
||||||
pub type ServoComputedValuesBorrowed<'a> = &'a ServoComputedValues;
|
pub type ServoComputedValuesBorrowed<'a> = &'a ServoComputedValues;
|
||||||
|
@ -226,8 +226,6 @@ pub type RawGeckoAnimationValueListBorrowed<'a> = &'a RawGeckoAnimationValueList
|
||||||
pub type RawGeckoAnimationValueListBorrowedOrNull<'a> = Option<&'a RawGeckoAnimationValueList>;
|
pub type RawGeckoAnimationValueListBorrowedOrNull<'a> = Option<&'a RawGeckoAnimationValueList>;
|
||||||
pub type RawGeckoAnimationValueListBorrowedMut<'a> = &'a mut RawGeckoAnimationValueList;
|
pub type RawGeckoAnimationValueListBorrowedMut<'a> = &'a mut RawGeckoAnimationValueList;
|
||||||
pub type RawGeckoAnimationValueListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoAnimationValueList>;
|
pub type RawGeckoAnimationValueListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoAnimationValueList>;
|
||||||
pub type RawServoAnimationValueBorrowedListBorrowed<'a> = &'a RawServoAnimationValueBorrowedList;
|
|
||||||
pub type RawServoAnimationValueBorrowedListBorrowedOrNull<'a> = Option<&'a RawServoAnimationValueBorrowedList>;
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Gecko_EnsureTArrayCapacity(aArray: *mut ::std::os::raw::c_void,
|
pub fn Gecko_EnsureTArrayCapacity(aArray: *mut ::std::os::raw::c_void,
|
||||||
|
@ -503,9 +501,10 @@ extern "C" {
|
||||||
-> RawServoDeclarationBlockStrongBorrowedOrNull;
|
-> RawServoDeclarationBlockStrongBorrowedOrNull;
|
||||||
}
|
}
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Gecko_GetAnimationRule(element: RawGeckoElementBorrowed,
|
pub fn Gecko_GetAnimationRule(aElement: RawGeckoElementBorrowed,
|
||||||
aAtom: *mut nsIAtom,
|
aPseudoTag: *mut nsIAtom,
|
||||||
aCascadeLevel: EffectCompositor_CascadeLevel)
|
aCascadeLevel:
|
||||||
|
EffectCompositor_CascadeLevel)
|
||||||
-> RawServoDeclarationBlockStrong;
|
-> RawServoDeclarationBlockStrong;
|
||||||
}
|
}
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -1227,16 +1226,6 @@ extern "C" {
|
||||||
ServoComputedValuesBorrowed)
|
ServoComputedValuesBorrowed)
|
||||||
-> ServoComputedValuesStrong;
|
-> ServoComputedValuesStrong;
|
||||||
}
|
}
|
||||||
extern "C" {
|
|
||||||
pub fn Servo_AnimationValues_Interpolate(from: RawServoAnimationValueBorrowed,
|
|
||||||
to: RawServoAnimationValueBorrowed,
|
|
||||||
progress: f64)
|
|
||||||
-> RawServoAnimationValueStrong;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn Servo_AnimationValues_Uncompute(value: RawServoAnimationValueBorrowedListBorrowed)
|
|
||||||
-> RawServoDeclarationBlockStrong;
|
|
||||||
}
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Servo_AnimationValues_Populate(arg1:
|
pub fn Servo_AnimationValues_Populate(arg1:
|
||||||
RawGeckoAnimationValueListBorrowedMut,
|
RawGeckoAnimationValueListBorrowedMut,
|
||||||
|
@ -1247,6 +1236,19 @@ extern "C" {
|
||||||
ServoComputedValuesBorrowedOrNull,
|
ServoComputedValuesBorrowedOrNull,
|
||||||
arg5: RawGeckoPresContextBorrowed);
|
arg5: RawGeckoPresContextBorrowed);
|
||||||
}
|
}
|
||||||
|
extern "C" {
|
||||||
|
pub fn Servo_AnimationValues_Interpolate(from:
|
||||||
|
RawServoAnimationValueBorrowed,
|
||||||
|
to:
|
||||||
|
RawServoAnimationValueBorrowed,
|
||||||
|
progress: f64)
|
||||||
|
-> RawServoAnimationValueStrong;
|
||||||
|
}
|
||||||
|
extern "C" {
|
||||||
|
pub fn Servo_AnimationValues_Uncompute(value:
|
||||||
|
RawServoAnimationValueBorrowedListBorrowed)
|
||||||
|
-> RawServoDeclarationBlockStrong;
|
||||||
|
}
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Servo_ParseStyleAttribute(data: *const nsACString_internal)
|
pub fn Servo_ParseStyleAttribute(data: *const nsACString_internal)
|
||||||
-> RawServoDeclarationBlockStrong;
|
-> RawServoDeclarationBlockStrong;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -39,7 +39,6 @@ use style::gecko_bindings::bindings::RawGeckoAnimationValueListBorrowedMut;
|
||||||
use style::gecko_bindings::bindings::RawGeckoElementBorrowed;
|
use style::gecko_bindings::bindings::RawGeckoElementBorrowed;
|
||||||
use style::gecko_bindings::bindings::RawGeckoPresContextBorrowed;
|
use style::gecko_bindings::bindings::RawGeckoPresContextBorrowed;
|
||||||
use style::gecko_bindings::bindings::RawServoAnimationValueBorrowed;
|
use style::gecko_bindings::bindings::RawServoAnimationValueBorrowed;
|
||||||
use style::gecko_bindings::bindings::RawServoAnimationValueBorrowedListBorrowed;
|
|
||||||
use style::gecko_bindings::bindings::RawServoAnimationValueStrong;
|
use style::gecko_bindings::bindings::RawServoAnimationValueStrong;
|
||||||
use style::gecko_bindings::bindings::RawServoImportRuleBorrowed;
|
use style::gecko_bindings::bindings::RawServoImportRuleBorrowed;
|
||||||
use style::gecko_bindings::bindings::ServoComputedValuesBorrowedOrNull;
|
use style::gecko_bindings::bindings::ServoComputedValuesBorrowedOrNull;
|
||||||
|
@ -50,6 +49,7 @@ 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::nsresult;
|
use style::gecko_bindings::structs::nsresult;
|
||||||
use style::gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
|
use style::gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
|
||||||
|
@ -186,6 +186,7 @@ pub extern "C" fn Servo_AnimationValues_Interpolate(from: RawServoAnimationValue
|
||||||
pub extern "C" fn Servo_AnimationValues_Uncompute(value: RawServoAnimationValueBorrowedListBorrowed)
|
pub extern "C" fn Servo_AnimationValues_Uncompute(value: RawServoAnimationValueBorrowedListBorrowed)
|
||||||
-> RawServoDeclarationBlockStrong
|
-> RawServoDeclarationBlockStrong
|
||||||
{
|
{
|
||||||
|
let value = unsafe { value.as_ref().unwrap() };
|
||||||
let uncomputed_values = value.into_iter()
|
let uncomputed_values = value.into_iter()
|
||||||
.map(|v| {
|
.map(|v| {
|
||||||
let raw_anim = unsafe { v.as_ref().unwrap() };
|
let raw_anim = unsafe { v.as_ref().unwrap() };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue