mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
style: Pass a &ComputedValues (aka ServoStyleContext*) to Gecko_CalcStyleDifference.
This commit is contained in:
parent
a9b748f17a
commit
25dc352d7c
2 changed files with 5 additions and 1 deletions
|
@ -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 };
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue