Bug 1341985 - Part 1: Use borrow() instead of borrow_mut() for PerDocumentStyleData. r?heycam
We don't mutate any PerDocumentStyleData in Servo_StyleSet_FillKeyframesForName.
MozReview-Commit-ID: H1uJkxEpi0I
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -1414,17 +1414,17 @@ pub extern "C" fn Servo_AssertTreeIsClea
pub extern "C" fn Servo_StyleSet_FillKeyframesForName(raw_data: RawServoStyleSetBorrowed,
name: *const nsACString,
timing_function: *const nsTimingFunction,
style: ServoComputedValuesBorrowed,
keyframes: RawGeckoKeyframeListBorrowedMut) -> bool {
use style::gecko_bindings::structs::Keyframe;
use style::properties::LonghandIdSet;
- let data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut();
+ 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) {
for step in &animation.steps {
// Override timing_function if the keyframe has animation-timing-function.
let timing_function = if let Some(val) = step.get_animation_timing_function() {