Use atom for animation-name property

This commit is contained in:
Hiroyuki Ikezoe 2017-10-04 12:55:22 +09:00
parent 2cd9dcebee
commit e0ef378b20
3 changed files with 24 additions and 22 deletions

View file

@ -3625,14 +3625,14 @@ fn fill_in_missing_keyframe_values(
#[no_mangle]
pub extern "C" fn Servo_StyleSet_GetKeyframesForName(raw_data: RawServoStyleSetBorrowed,
name: *const nsACString,
name: *mut nsAtom,
inherited_timing_function: nsTimingFunctionBorrowed,
keyframes: RawGeckoKeyframeListBorrowedMut) -> bool {
debug_assert!(keyframes.len() == 0,
"keyframes should be initially empty");
let data = PerDocumentStyleData::from_ffi(raw_data).borrow();
let name = unsafe { Atom::from(name.as_ref().unwrap().as_str_unchecked()) };
let name = Atom::from(name);
let animation = match data.stylist.get_animation(&name) {
Some(animation) => animation,