OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |