mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
style: Pass old ComputedValues and old cached struct bits to Gecko_CalcStyleDifference.
This commit is contained in:
parent
25dc352d7c
commit
914ba609c0
4 changed files with 10 additions and 7 deletions
|
@ -48,14 +48,14 @@ impl GeckoRestyleDamage {
|
|||
/// accessed from layout.
|
||||
pub fn compute_style_difference(
|
||||
source: &nsStyleContext,
|
||||
new_style: &Arc<ComputedValues>
|
||||
old_style: &ComputedValues,
|
||||
new_style: &Arc<ComputedValues>,
|
||||
) -> StyleDifference {
|
||||
// TODO(emilio): Const-ify this?
|
||||
let context = source as *const nsStyleContext as *mut nsStyleContext;
|
||||
let mut any_style_changed: bool = false;
|
||||
let hint = unsafe {
|
||||
bindings::Gecko_CalcStyleDifference(context,
|
||||
bindings::Gecko_CalcStyleDifference(old_style.as_style_context(),
|
||||
new_style.as_style_context(),
|
||||
source.mBits,
|
||||
&mut any_style_changed)
|
||||
};
|
||||
let change = if any_style_changed { StyleChange::Changed } else { StyleChange::Unchanged };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue