mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Hoist StyleNew{Children,Subtree} into their own paths.
The buggy animation handling isn't a regression, since currently we pass UnstyledChildrenOnly in those cases, which blocks the animation traversal in Servo_TraverseSubtree. In general I really wanted to handle these two paths together. But there's enough broken with the NewChildren path that I wanted to scope the buginess as tightly as possible. And I really need to separate the handling here from StyleDocument() to make the restyle root stuff work. MozReview-Commit-ID: 9F0mcQl7AAX
This commit is contained in:
parent
32790be78d
commit
f4ccbf3687
6 changed files with 63 additions and 103 deletions
|
@ -16,8 +16,9 @@ bitflags! {
|
|||
/// Traverse and update all elements with CSS animations since
|
||||
/// @keyframes rules may have changed. Triggered by CSS rule changes.
|
||||
const ForCSSRuleChanges = 1 << 1,
|
||||
/// Traverse only unstyled children of the root and their descendants.
|
||||
const UnstyledChildrenOnly = 1 << 2,
|
||||
/// Styles unstyled elements, but does not handle invalidations on
|
||||
/// already-styled elements.
|
||||
const UnstyledOnly = 1 << 2,
|
||||
/// A forgetful traversal ignores the previous state of the frame tree, and
|
||||
/// thus does not compute damage or maintain other state describing the styles
|
||||
/// pre-traversal. A forgetful traversal is usually the right thing if you
|
||||
|
@ -55,7 +56,7 @@ pub fn assert_traversal_flags_match() {
|
|||
check_traversal_flags! {
|
||||
ServoTraversalFlags_AnimationOnly => AnimationOnly,
|
||||
ServoTraversalFlags_ForCSSRuleChanges => ForCSSRuleChanges,
|
||||
ServoTraversalFlags_UnstyledChildrenOnly => UnstyledChildrenOnly,
|
||||
ServoTraversalFlags_UnstyledOnly => UnstyledOnly,
|
||||
ServoTraversalFlags_Forgetful => Forgetful,
|
||||
ServoTraversalFlags_AggressivelyForgetful => AggressivelyForgetful,
|
||||
ServoTraversalFlags_ClearDirtyDescendants => ClearDirtyDescendants,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue