mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Revert "Backed out changeset b10e6ba9cbdb because gecko part had to be backed out."
This reverts commit b96d96d448
.
The fix on the Gecko side is trivial, and I can land it after this lands.
This commit is contained in:
parent
3d3f30a3f9
commit
ef4fbfaa6b
6 changed files with 18 additions and 10 deletions
|
@ -1047,8 +1047,9 @@ extern "C" {
|
|||
-> CSSPseudoElementType;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_CalcStyleDifference(oldstyle: *mut nsStyleContext,
|
||||
newstyle: ServoComputedValuesBorrowed,
|
||||
pub fn Gecko_CalcStyleDifference(old_style: *const ServoStyleContext,
|
||||
new_style: *const ServoStyleContext,
|
||||
old_style_bits: u64,
|
||||
any_style_changed: *mut bool)
|
||||
-> nsChangeHint;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
&new_style,
|
||||
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