Clean up and simplify the accumulation of restyle damage.

This commit is contained in:
Bobby Holley 2017-02-09 16:55:16 -08:00
parent 0e3aeac922
commit 1f4f099efe
4 changed files with 44 additions and 58 deletions

View file

@ -451,14 +451,9 @@ impl<'le> TElement for GeckoElement<'le> {
}
fn existing_style_for_restyle_damage<'a>(&'a self,
current_cv: Option<&'a Arc<ComputedValues>>,
_existing_values: &'a Arc<ComputedValues>,
pseudo: Option<&PseudoElement>)
-> Option<&'a nsStyleContext> {
if current_cv.is_none() {
// Don't bother in doing an ffi call to get null back.
return None;
}
unsafe {
let atom_ptr = pseudo.map(|p| p.as_atom().as_ptr())
.unwrap_or(ptr::null_mut());