mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Make RestyleDamage::compute take no optional argument, delegate the handling to the caller.
This commit is contained in:
parent
6b60383f24
commit
1c322f35a6
5 changed files with 79 additions and 65 deletions
|
@ -51,7 +51,7 @@ impl TRestyleDamage for RestyleDamage {
|
|||
RestyleDamage::empty()
|
||||
}
|
||||
|
||||
fn compute(old: Option<&Arc<ServoComputedValues>>,
|
||||
fn compute(old: &Arc<ServoComputedValues>,
|
||||
new: &Arc<ServoComputedValues>) -> RestyleDamage {
|
||||
compute_damage(old, new)
|
||||
}
|
||||
|
@ -154,13 +154,7 @@ macro_rules! add_if_not_equal(
|
|||
})
|
||||
);
|
||||
|
||||
fn compute_damage(old: Option<&Arc<ServoComputedValues>>, new: &Arc<ServoComputedValues>) -> RestyleDamage {
|
||||
let new = &**new;
|
||||
let old: &ServoComputedValues = match old {
|
||||
None => return RestyleDamage::rebuild_and_reflow(),
|
||||
Some(cv) => &**cv,
|
||||
};
|
||||
|
||||
fn compute_damage(old: &ServoComputedValues, new: &ServoComputedValues) -> RestyleDamage {
|
||||
let mut damage = RestyleDamage::empty();
|
||||
|
||||
// This should check every CSS property, as enumerated in the fields of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue