mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
Bug 1343153 - Replace pointer to const with immutable reference for nsTimingFunction.
This commit is contained in:
parent
708f446364
commit
30f44da11c
2 changed files with 7 additions and 8 deletions
|
@ -1394,7 +1394,7 @@ extern "C" {
|
|||
pub fn Servo_StyleSet_FillKeyframesForName(set: RawServoStyleSetBorrowed,
|
||||
property: *const nsACString,
|
||||
timing_function:
|
||||
*const nsTimingFunction,
|
||||
nsTimingFunctionBorrowed,
|
||||
computed_values:
|
||||
ServoComputedValuesBorrowed,
|
||||
keyframe_list:
|
||||
|
|
|
@ -48,6 +48,7 @@ use style::gecko_bindings::bindings::RawServoAnimationValueStrong;
|
|||
use style::gecko_bindings::bindings::RawServoImportRuleBorrowed;
|
||||
use style::gecko_bindings::bindings::ServoComputedValuesBorrowedOrNull;
|
||||
use style::gecko_bindings::bindings::nsTArrayBorrowed_uintptr_t;
|
||||
use style::gecko_bindings::bindings::nsTimingFunctionBorrowed;
|
||||
use style::gecko_bindings::bindings::nsTimingFunctionBorrowedMut;
|
||||
use style::gecko_bindings::structs;
|
||||
use style::gecko_bindings::structs::{SheetParsingMode, nsIAtom, nsCSSPropertyID};
|
||||
|
@ -57,7 +58,6 @@ use style::gecko_bindings::structs::Loader;
|
|||
use style::gecko_bindings::structs::RawGeckoPresContextOwned;
|
||||
use style::gecko_bindings::structs::ServoStyleSheet;
|
||||
use style::gecko_bindings::structs::nsCSSValueSharedList;
|
||||
use style::gecko_bindings::structs::nsTimingFunction;
|
||||
use style::gecko_bindings::structs::nsresult;
|
||||
use style::gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
|
||||
use style::gecko_bindings::sugar::ownership::{HasSimpleFFI, Strong};
|
||||
|
@ -1639,7 +1639,7 @@ pub extern "C" fn Servo_AssertTreeIsClean(root: RawGeckoElementBorrowed) {
|
|||
#[no_mangle]
|
||||
pub extern "C" fn Servo_StyleSet_FillKeyframesForName(raw_data: RawServoStyleSetBorrowed,
|
||||
name: *const nsACString,
|
||||
timing_function: *const nsTimingFunction,
|
||||
timing_function: nsTimingFunctionBorrowed,
|
||||
style: ServoComputedValuesBorrowed,
|
||||
keyframes: RawGeckoKeyframeListBorrowedMut) -> bool {
|
||||
use style::gecko_bindings::structs::Keyframe;
|
||||
|
@ -1648,7 +1648,6 @@ pub extern "C" fn Servo_StyleSet_FillKeyframesForName(raw_data: RawServoStyleSet
|
|||
|
||||
let data = PerDocumentStyleData::from_ffi(raw_data).borrow();
|
||||
let name = unsafe { Atom::from(name.as_ref().unwrap().as_str_unchecked()) };
|
||||
let style_timing_function = unsafe { timing_function.as_ref().unwrap() };
|
||||
let style = ComputedValues::as_arc(&style);
|
||||
|
||||
if let Some(ref animation) = data.stylist.animations().get(&name) {
|
||||
|
@ -1659,7 +1658,7 @@ pub extern "C" fn Servo_StyleSet_FillKeyframesForName(raw_data: RawServoStyleSet
|
|||
let timing_function = if let Some(val) = step.get_animation_timing_function(&guard) {
|
||||
val.into()
|
||||
} else {
|
||||
*style_timing_function
|
||||
*timing_function
|
||||
};
|
||||
|
||||
let keyframe = unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue