| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 189 } |
| 190 ASSERT(startKeyframe->properties().size() == allProperties.size()); | 190 ASSERT(startKeyframe->properties().size() == allProperties.size()); |
| 191 ASSERT(endKeyframe->properties().size() == allProperties.size()); | 191 ASSERT(endKeyframe->properties().size() == allProperties.size()); |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace | 194 } // namespace |
| 195 | 195 |
| 196 const StyleRuleKeyframes* CSSAnimations::matchScopedKeyframesRule(StyleResolver*
resolver, const Element* element, const StringImpl* animationName) | 196 const StyleRuleKeyframes* CSSAnimations::matchScopedKeyframesRule(StyleResolver*
resolver, const Element* element, const StringImpl* animationName) |
| 197 { | 197 { |
| 198 // FIXME: This is all implementation detail of style resolver, CSSAnimations
shouldn't be reaching into any of it. | 198 // FIXME: This is all implementation detail of style resolver, CSSAnimations
shouldn't be reaching into any of it. |
| 199 if (resolver->document().styleEngine()->hasOnlyScopedResolverForDocument()) | |
| 200 return element->document().scopedStyleResolver()->keyframeStylesForAnima
tion(animationName); | |
| 201 | |
| 202 Vector<RawPtr<ScopedStyleResolver>, 8> stack; | 199 Vector<RawPtr<ScopedStyleResolver>, 8> stack; |
| 203 resolver->styleTreeResolveScopedKeyframesRules(element, stack); | 200 resolver->styleTreeResolveScopedKeyframesRules(element, stack); |
| 204 if (stack.isEmpty()) | 201 if (stack.isEmpty()) |
| 205 return 0; | 202 return 0; |
| 206 | 203 |
| 207 for (size_t i = 0; i < stack.size(); ++i) { | 204 for (size_t i = 0; i < stack.size(); ++i) { |
| 208 if (const StyleRuleKeyframes* keyframesRule = stack.at(i)->keyframeStyle
sForAnimation(animationName)) | 205 if (const StyleRuleKeyframes* keyframesRule = stack.at(i)->keyframeStyle
sForAnimation(animationName)) |
| 209 return keyframesRule; | 206 return keyframesRule; |
| 210 } | 207 } |
| 211 return 0; | 208 return 0; |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 case CSSPropertyTransitionDuration: | 639 case CSSPropertyTransitionDuration: |
| 643 case CSSPropertyTransitionProperty: | 640 case CSSPropertyTransitionProperty: |
| 644 case CSSPropertyTransitionTimingFunction: | 641 case CSSPropertyTransitionTimingFunction: |
| 645 return false; | 642 return false; |
| 646 default: | 643 default: |
| 647 return true; | 644 return true; |
| 648 } | 645 } |
| 649 } | 646 } |
| 650 | 647 |
| 651 } // namespace blink | 648 } // namespace blink |
| OLD | NEW |