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

Side by Side Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 751593002: Removed add/removeScopedStyleResolver from StyleEngine (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 ASSERT(startKeyframe->properties().size() == allProperties.size()); 193 ASSERT(startKeyframe->properties().size() == allProperties.size());
194 ASSERT(endKeyframe->properties().size() == allProperties.size()); 194 ASSERT(endKeyframe->properties().size() == allProperties.size());
195 } 195 }
196 196
197 } // namespace 197 } // namespace
198 198
199 const StyleRuleKeyframes* CSSAnimations::matchScopedKeyframesRule(StyleResolver* resolver, const Element* element, const StringImpl* animationName) 199 const StyleRuleKeyframes* CSSAnimations::matchScopedKeyframesRule(StyleResolver* resolver, const Element* element, const StringImpl* animationName)
200 { 200 {
201 // FIXME: This is all implementation detail of style resolver, CSSAnimations shouldn't be reaching into any of it. 201 // FIXME: This is all implementation detail of style resolver, CSSAnimations shouldn't be reaching into any of it.
202 if (element->document().styleEngine()->hasOnlyScopedResolverForDocument()) 202 if (element->document().styleEngine()->onlyDocumentHasStyles()) {
203 return element->document().scopedStyleResolver()->keyframeStylesForAnima tion(animationName); 203 if (ScopedStyleResolver* resolver = element->document().scopedStyleResol ver())
204 return resolver->keyframeStylesForAnimation(animationName);
205 return nullptr;
206 }
204 207
205 WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8> stack; 208 WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8> stack;
206 resolver->styleTreeResolveScopedKeyframesRules(element, stack); 209 resolver->styleTreeResolveScopedKeyframesRules(element, stack);
207 if (stack.isEmpty()) 210 if (stack.isEmpty())
208 return nullptr; 211 return nullptr;
209 212
210 for (size_t i = 0; i < stack.size(); ++i) { 213 for (size_t i = 0; i < stack.size(); ++i) {
211 if (const StyleRuleKeyframes* keyframesRule = stack.at(i)->keyframeStyle sForAnimation(animationName)) 214 if (const StyleRuleKeyframes* keyframesRule = stack.at(i)->keyframeStyle sForAnimation(animationName))
212 return keyframesRule; 215 return keyframesRule;
213 } 216 }
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 #if ENABLE(OILPAN) 740 #if ENABLE(OILPAN)
738 visitor->trace(m_newTransitions); 741 visitor->trace(m_newTransitions);
739 visitor->trace(m_activeInterpolationsForAnimations); 742 visitor->trace(m_activeInterpolationsForAnimations);
740 visitor->trace(m_activeInterpolationsForTransitions); 743 visitor->trace(m_activeInterpolationsForTransitions);
741 visitor->trace(m_newAnimations); 744 visitor->trace(m_newAnimations);
742 visitor->trace(m_cancelledAnimationPlayers); 745 visitor->trace(m_cancelledAnimationPlayers);
743 #endif 746 #endif
744 } 747 }
745 748
746 } // namespace blink 749 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698