diff --git a/components/style/gecko/restyle_damage.rs b/components/style/gecko/restyle_damage.rs index 2af898a28aa..cd8402d07af 100644 --- a/components/style/gecko/restyle_damage.rs +++ b/components/style/gecko/restyle_damage.rs @@ -55,7 +55,7 @@ impl GeckoRestyleDamage { let mut any_style_changed: bool = false; let hint = unsafe { bindings::Gecko_CalcStyleDifference(context, - &new_style, + new_style.as_style_context(), &mut any_style_changed) }; let change = if any_style_changed { StyleChange::Changed } else { StyleChange::Unchanged }; diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 055d33a62c9..f34b8a9d8fa 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -137,6 +137,10 @@ impl ComputedValues { let atom = Atom::from(atom); PseudoElement::from_atom(&atom) } + + pub fn as_style_context(&self) -> &::gecko_bindings::structs::mozilla::ServoStyleContext { + &self.0 + } } impl Drop for ComputedValues {