Backed out changeset b10e6ba9cbdb because gecko part had to be backed out. r=backout on a CLOSED TREE

Backs out https://github.com/servo/servo/pull/17796
This commit is contained in:
Gecko Backout 2017-07-20 13:42:53 +00:00 committed by moz-servo-sync
parent fa34af609f
commit b96d96d448
6 changed files with 10 additions and 18 deletions

View file

@ -1047,9 +1047,8 @@ extern "C" {
-> CSSPseudoElementType;
}
extern "C" {
pub fn Gecko_CalcStyleDifference(old_style: *const ServoStyleContext,
new_style: *const ServoStyleContext,
old_style_bits: u64,
pub fn Gecko_CalcStyleDifference(oldstyle: *mut nsStyleContext,
newstyle: ServoComputedValuesBorrowed,
any_style_changed: *mut bool)
-> nsChangeHint;
}

View file

@ -48,14 +48,14 @@ impl GeckoRestyleDamage {
/// accessed from layout.
pub fn compute_style_difference(
source: &nsStyleContext,
old_style: &ComputedValues,
new_style: &Arc<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(old_style.as_style_context(),
new_style.as_style_context(),
source.mBits,
bindings::Gecko_CalcStyleDifference(context,
&new_style,
&mut any_style_changed)
};
let change = if any_style_changed { StyleChange::Changed } else { StyleChange::Unchanged };