Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Remove Stylist::is_device_dirty. #18143

Merged
merged 3 commits into from Aug 21, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

style: Make sure to set the initial value of the transition even if w…

…e don't start it.

Otherwise we may get to the end of it directly, which is far from what we want.
  • Loading branch information
emilio committed Aug 21, 2017
commit 293274fa5ef6e1104e97b7db788a2846b01e2e11
@@ -437,21 +437,23 @@ pub fn start_transitions_if_applicable(new_animations_sender: &Sender<Animation>
old_style,
Arc::make_mut(new_style));
for property_animation in property_animations {
// Per [1], don't trigger a new transition if the end state for that transition is
// the same as that of a transition that's already running on the same node.
// Set the property to the initial value.
//
// NB: get_mut is guaranteed to succeed since we called make_mut()
// above.
property_animation.update(Arc::get_mut(new_style).unwrap(), 0.0);

// Per [1], don't trigger a new transition if the end state for that
// transition is the same as that of a transition that's already
// running on the same node.
//
// [1]: https://drafts.csswg.org/css-transitions/#starting
if possibly_expired_animations.iter().any(|animation| {
animation.has_the_same_end_value_as(&property_animation)
}) {
animation.has_the_same_end_value_as(&property_animation)
}) {
continue
}

// Set the property to the initial value.
// NB: get_mut is guaranteed to succeed since we called make_mut()
// above.
property_animation.update(Arc::get_mut(new_style).unwrap(), 0.0);

// Kick off the animation.
let box_style = new_style.get_box();
let now = timer.seconds();
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.