stylo: Allow computing change hints during the traversal.

This commit is contained in:
Emilio Cobos Álvarez 2016-07-28 19:36:37 -07:00
parent 67ac81f440
commit 1470d5b174
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 55 additions and 21 deletions

View file

@ -44,7 +44,7 @@ bitflags! {
}
impl TRestyleDamage for RestyleDamage {
fn compute(old: Option<&Arc<ServoComputedValues>>, new: &ServoComputedValues) ->
fn compute(old: Option<&Arc<ServoComputedValues>>, new: &Arc<ServoComputedValues>) ->
RestyleDamage { compute_damage(old, new) }
/// Returns a bitmask that represents a flow that needs to be rebuilt and reflowed.
@ -143,7 +143,8 @@ macro_rules! add_if_not_equal(
})
);
fn compute_damage(old: Option<&Arc<ServoComputedValues>>, new: &ServoComputedValues) -> RestyleDamage {
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,