Add has_current_styles_for_traversal().

In animation-only restyle, we just need to check the element
has animation restyle hints or has recascade self which is a result
of animation-only restyle for ancestors.
has_current_styles() in Servo_ResolveStyle() is intentionally left there,
it will be changed in a subsequent patch.
This commit is contained in:
Hiroyuki Ikezoe 2017-07-18 19:13:48 +09:00
parent ae55e51aaf
commit f91126ba86
4 changed files with 37 additions and 7 deletions

View file

@ -675,7 +675,7 @@ impl<E: TElement> StyleSharingCandidateCache<E> {
}
let data = candidate.element.borrow_data().unwrap();
debug_assert!(target.has_current_styles(&data));
debug_assert!(target.has_current_styles_for_traversal(&data, shared.traversal_flags));
debug!("Sharing style between {:?} and {:?}",
target.element, candidate.element);