mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Cleanup code that was used for verifying styling results for throttled animation flush in post traversal.
Now that we do process normal traversal even in the case of throttled animation flush so that we don't need to do special handling for the case. Note about the comment in has_current_styles(): the remaining animation hints is not caused by either this patch or the previous patch in this patch series, it's been there in the first place, but it should be fixed somehow later. See bug 1389675. MozReview-Commit-ID: JojHufxNCiS
This commit is contained in:
parent
c0de5ebd21
commit
015a249afc
2 changed files with 25 additions and 27 deletions
|
@ -462,6 +462,28 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
|
|||
data.has_styles() && !data.restyle.hint.has_non_animation_invalidations()
|
||||
}
|
||||
|
||||
/// Returns whether the element's styles are up-to-date after traversal
|
||||
/// (i.e. in post traversal).
|
||||
fn has_current_styles(&self, data: &ElementData) -> bool {
|
||||
if self.has_snapshot() && !self.handled_snapshot() {
|
||||
return false;
|
||||
}
|
||||
|
||||
data.has_styles() &&
|
||||
// TODO(hiro): When an animating element moved into subtree of
|
||||
// contenteditable element, there remains animation restyle hints in
|
||||
// post traversal. It's generally harmless since the hints will be
|
||||
// processed in a next styling but ideally it should be processed soon.
|
||||
//
|
||||
// Without this, we get failures in:
|
||||
// layout/style/crashtests/1383319.html
|
||||
// layout/style/crashtests/1383001.html
|
||||
//
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1389675 tracks fixing
|
||||
// this.
|
||||
!data.restyle.hint.has_non_animation_invalidations()
|
||||
}
|
||||
|
||||
/// Flag that this element has a descendant for style processing.
|
||||
///
|
||||
/// Only safe to call with exclusive access to the element.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue