aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/style/gecko/generated/bindings.rs10
-rw-r--r--ports/geckolib/glue.rs41
2 files changed, 31 insertions, 20 deletions
diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs
index b880c0e1abf..404e072b04e 100644
--- a/components/style/gecko/generated/bindings.rs
+++ b/components/style/gecko/generated/bindings.rs
@@ -1922,6 +1922,11 @@ extern "C" {
len: usize);
}
extern "C" {
+ pub fn Gecko_AnnotateCrashReport(key_str: *const ::std::os::raw::c_char,
+ value_str:
+ *const ::std::os::raw::c_char);
+}
+extern "C" {
pub fn Servo_Element_ClearData(node: RawGeckoElementBorrowed);
}
extern "C" {
@@ -2119,6 +2124,11 @@ extern "C" {
-> bool;
}
extern "C" {
+ pub fn Servo_SelectorList_Closest(arg1: RawGeckoElementBorrowed,
+ arg2: RawServoSelectorListBorrowed)
+ -> *const RawGeckoElement;
+}
+extern "C" {
pub fn Servo_StyleSet_AddSizeOfExcludingThis(malloc_size_of: MallocSizeOf,
malloc_enclosing_size_of:
MallocSizeOf,
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index 4b7474b7bd7..509d869c625 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -332,11 +332,11 @@ pub extern "C" fn Servo_MaybeGCRuleTree(raw_data: RawServoStyleSetBorrowed) {
}
#[no_mangle]
-pub extern "C" fn Servo_AnimationValues_Interpolate(from: RawServoAnimationValueBorrowed,
- to: RawServoAnimationValueBorrowed,
- progress: f64)
- -> RawServoAnimationValueStrong
-{
+pub extern "C" fn Servo_AnimationValues_Interpolate(
+ from: RawServoAnimationValueBorrowed,
+ to: RawServoAnimationValueBorrowed,
+ progress: f64,
+) -> RawServoAnimationValueStrong {
let from_value = AnimationValue::as_arc(&from);
let to_value = AnimationValue::as_arc(&to);
if let Ok(value) = from_value.animate(to_value, Procedure::Interpolate { progress }) {
@@ -356,10 +356,10 @@ pub extern "C" fn Servo_AnimationValues_IsInterpolable(from: RawServoAnimationVa
}
#[no_mangle]
-pub extern "C" fn Servo_AnimationValues_Add(a: RawServoAnimationValueBorrowed,
- b: RawServoAnimationValueBorrowed)
- -> RawServoAnimationValueStrong
-{
+pub extern "C" fn Servo_AnimationValues_Add(
+ a: RawServoAnimationValueBorrowed,
+ b: RawServoAnimationValueBorrowed,
+) -> RawServoAnimationValueStrong {
let a_value = AnimationValue::as_arc(&a);
let b_value = AnimationValue::as_arc(&b);
if let Ok(value) = a_value.animate(b_value, Procedure::Add) {
@@ -370,11 +370,11 @@ pub extern "C" fn Servo_AnimationValues_Add(a: RawServoAnimationValueBorrowed,
}
#[no_mangle]
-pub extern "C" fn Servo_AnimationValues_Accumulate(a: RawServoAnimationValueBorrowed,
- b: RawServoAnimationValueBorrowed,
- count: u64)
- -> RawServoAnimationValueStrong
-{
+pub extern "C" fn Servo_AnimationValues_Accumulate(
+ a: RawServoAnimationValueBorrowed,
+ b: RawServoAnimationValueBorrowed,
+ count: u64,
+) -> RawServoAnimationValueStrong {
let a_value = AnimationValue::as_arc(&a);
let b_value = AnimationValue::as_arc(&b);
if let Ok(value) = a_value.animate(b_value, Procedure::Accumulate { count }) {
@@ -673,8 +673,9 @@ pub extern "C" fn Servo_AnimationValue_DeepEqual(this: RawServoAnimationValueBor
}
#[no_mangle]
-pub extern "C" fn Servo_AnimationValue_Uncompute(value: RawServoAnimationValueBorrowed)
- -> RawServoDeclarationBlockStrong {
+pub extern "C" fn Servo_AnimationValue_Uncompute(
+ value: RawServoAnimationValueBorrowed,
+) -> RawServoDeclarationBlockStrong {
let value = AnimationValue::as_arc(&value);
let global_style_data = &*GLOBAL_STYLE_DATA;
Arc::new(global_style_data.shared_lock.wrap(
@@ -1521,10 +1522,10 @@ pub extern "C" fn Servo_StyleRule_SelectorMatchesElement(rule: RawServoStyleRule
}
#[no_mangle]
-pub unsafe extern "C" fn Servo_SelectorList_Closest<'a>(
- element: RawGeckoElementBorrowed<'a>,
+pub unsafe extern "C" fn Servo_SelectorList_Closest(
+ element: RawGeckoElementBorrowed,
selectors: RawServoSelectorListBorrowed,
-) -> RawGeckoElementBorrowedOrNull<'a> {
+) -> *const structs::RawGeckoElement {
use std::borrow::Borrow;
use style::dom_apis;
@@ -1532,7 +1533,7 @@ pub unsafe extern "C" fn Servo_SelectorList_Closest<'a>(
let selectors = ::selectors::SelectorList::from_ffi(selectors).borrow();
dom_apis::element_closest(element, &selectors, element.owner_document_quirks_mode())
- .map(|e| e.0)
+ .map_or(ptr::null(), |e| e.0)
}
#[no_mangle]