Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: Source/core/animation/ActiveAnimations.cpp

Issue 189883003: Web Animations: Allow animations with delay to start on compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Interpolation of transform treats 'none' as identity. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/transitions/negative-delay-expected.txt ('k') | Source/core/animation/Player.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if (!renderer.node() || !renderer.node()->isElementNode()) 68 if (!renderer.node() || !renderer.node()->isElementNode())
69 return false; 69 return false;
70 70
71 const Element* element = toElement(renderer.node()); 71 const Element* element = toElement(renderer.node());
72 if (const ActiveAnimations* activeAnimations = element->activeAnimations()) 72 if (const ActiveAnimations* activeAnimations = element->activeAnimations())
73 return activeAnimations->hasActiveAnimationsOnCompositor(property); 73 return activeAnimations->hasActiveAnimationsOnCompositor(property);
74 74
75 return false; 75 return false;
76 } 76 }
77 77
78 bool ActiveAnimations::hasActiveAnimations(CSSPropertyID property) const 78 bool ActiveAnimations::hasActiveAnimations(CSSPropertyID property) const
shans 2014/03/17 04:03:47 This name is no longer correct.
dstockwell 2014/03/17 04:16:34 FIXME, I think we'll want to consider renaming mos
79 { 79 {
80 return m_defaultStack.affects(property); 80 for (PlayerSet::const_iterator it = m_players.begin(); it != players().end() ; ++it) {
81 const Player& player = *it->key;
82 ASSERT(player.source());
83 // FIXME: Needs to consider AnimationGroup once added.
84 ASSERT(player.source()->isAnimation());
85 const Animation& animation = *toAnimation(player.source());
86 if (animation.isCurrent() && animation.affects(property))
87 return true;
88 }
89 return false;
shans 2014/03/17 04:03:47 Can m_defaultStack reflect animations that are pen
dstockwell 2014/03/17 04:16:34 Possibly, or perhaps we should create a separate c
81 } 90 }
82 91
83 bool ActiveAnimations::hasActiveAnimationsOnCompositor(CSSPropertyID property) c onst 92 bool ActiveAnimations::hasActiveAnimationsOnCompositor(CSSPropertyID property) c onst
84 { 93 {
85 return m_defaultStack.hasActiveAnimationsOnCompositor(property); 94 return m_defaultStack.hasActiveAnimationsOnCompositor(property);
86 } 95 }
87 96
88 void ActiveAnimations::cancelAnimationOnCompositor() 97 void ActiveAnimations::cancelAnimationOnCompositor()
89 { 98 {
90 for (PlayerSet::iterator it = m_players.begin(); it != players().end(); ++it ) 99 for (PlayerSet::iterator it = m_players.begin(); it != players().end(); ++it )
91 it->key->cancelAnimationOnCompositor(); 100 it->key->cancelAnimationOnCompositor();
92 } 101 }
93 102
94 } // namespace WebCore 103 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/transitions/negative-delay-expected.txt ('k') | Source/core/animation/Player.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698