diff options
author | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-07-28 19:36:37 -0700 |
---|---|---|
committer | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-08-03 13:31:11 -0700 |
commit | 1470d5b17443a74ebcb1f9be42f7daa124f7b01a (patch) | |
tree | 2b13507eb3cc94baa53e7a20d2210ca48fd9e410 /components/script_layout_interface | |
parent | 67ac81f4402768f43e6bd69e3901169d4af511e5 (diff) | |
download | servo-1470d5b17443a74ebcb1f9be42f7daa124f7b01a.tar.gz servo-1470d5b17443a74ebcb1f9be42f7daa124f7b01a.zip |
stylo: Allow computing change hints during the traversal.
Diffstat (limited to 'components/script_layout_interface')
-rw-r--r-- | components/script_layout_interface/restyle_damage.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script_layout_interface/restyle_damage.rs b/components/script_layout_interface/restyle_damage.rs index c1005099442..733b33bead0 100644 --- a/components/script_layout_interface/restyle_damage.rs +++ b/components/script_layout_interface/restyle_damage.rs @@ -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, |