mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Part 8: Hook scroll-timeline rule into Cascade data and use it for CSS animations
We hook the rule into cascade data, and so we can look it up by timeline name. Now we only use StyleScrollDirection from @scroll-timeline rule. `source` and `scroll-offsets` are skipped now and use the default values instead because I'm pretty sure the syntax will be changed in Bug 1733260, and `scroll-offsets` may be obsolete because the spec proposal intents to make it be always 0% ~ 100%. Also, add some reftests for the default `source` and `scroll-offsets`, and different `orientation`s. Besides, we disable at-scroll-timeline-start-end.html in Gecko because we don't support start/end descriptors, and there are too many intermittents in it. Differential Revision: https://phabricator.services.mozilla.com/D126452
This commit is contained in:
parent
84cd22c3e0
commit
e66bcf2cc5
3 changed files with 33 additions and 14 deletions
|
@ -277,7 +277,7 @@ trait PrivateMatchMethods: TElement {
|
|||
|
||||
let old_box_style = old_style.get_box();
|
||||
|
||||
let keyframes_could_have_changed = context
|
||||
let keyframes_or_timeline_could_have_changed = context
|
||||
.shared
|
||||
.traversal_flags
|
||||
.contains(TraversalFlags::ForCSSRuleChanges);
|
||||
|
@ -287,9 +287,9 @@ trait PrivateMatchMethods: TElement {
|
|||
// element has or will have CSS animation style regardless of whether
|
||||
// the animation is running or not.
|
||||
//
|
||||
// TODO: We should check which @keyframes were added/changed/deleted and
|
||||
// update only animations corresponding to those @keyframes.
|
||||
if keyframes_could_have_changed {
|
||||
// TODO: We should check which @keyframes/@scroll-timeline were added/changed/deleted and
|
||||
// update only animations corresponding to those @keyframes/@scroll-timeline.
|
||||
if keyframes_or_timeline_could_have_changed {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue