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

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

Issue 212703003: [Oilpan]: Move StyleKeyFrame to the oilpan heap using transition types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « no previous file | Source/core/css/CSSGrammar.y » ('j') | Source/core/css/CSSGrammar.y » ('J')
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 static void resolveKeyframes(StyleResolver* resolver, Element* element, const El ement& parentElement, const RenderStyle& style, RenderStyle* parentStyle, const AtomicString& name, TimingFunction* defaultTimingFunction, 75 static void resolveKeyframes(StyleResolver* resolver, Element* element, const El ement& parentElement, const RenderStyle& style, RenderStyle* parentStyle, const AtomicString& name, TimingFunction* defaultTimingFunction,
76 WillBeHeapVector<KeyframeEffectModel::KeyframeVector>& resolvedKeyframes) 76 WillBeHeapVector<KeyframeEffectModel::KeyframeVector>& resolvedKeyframes)
77 { 77 {
78 // When the element is null, use its parent for scoping purposes. 78 // When the element is null, use its parent for scoping purposes.
79 const Element* elementForScoping = element ? element : &parentElement; 79 const Element* elementForScoping = element ? element : &parentElement;
80 const StyleRuleKeyframes* keyframesRule = CSSAnimations::matchScopedKeyframe sRule(resolver, elementForScoping, name.impl()); 80 const StyleRuleKeyframes* keyframesRule = CSSAnimations::matchScopedKeyframe sRule(resolver, elementForScoping, name.impl());
81 if (!keyframesRule) 81 if (!keyframesRule)
82 return; 82 return;
83 83
84 const Vector<RefPtr<StyleKeyframe> >& styleKeyframes = keyframesRule->keyfra mes(); 84 const WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> >& styleKeyframes = keyframesRule->keyframes();
85 if (styleKeyframes.isEmpty()) 85 if (styleKeyframes.isEmpty())
86 return; 86 return;
87 87
88 // Construct and populate the style for each keyframe 88 // Construct and populate the style for each keyframe
89 PropertySet specifiedProperties; 89 PropertySet specifiedProperties;
90 KeyframeEffectModel::KeyframeVector keyframes; 90 KeyframeEffectModel::KeyframeVector keyframes;
91 for (size_t i = 0; i < styleKeyframes.size(); ++i) { 91 for (size_t i = 0; i < styleKeyframes.size(); ++i) {
92 const StyleKeyframe* styleKeyframe = styleKeyframes[i].get(); 92 const StyleKeyframe* styleKeyframe = styleKeyframes[i].get();
93 // It's OK to pass a null element here. 93 // It's OK to pass a null element here.
94 RefPtr<RenderStyle> keyframeStyle = resolver->styleForKeyframe(element, style, parentStyle, styleKeyframe, name); 94 RefPtr<RenderStyle> keyframeStyle = resolver->styleForKeyframe(element, style, parentStyle, styleKeyframe, name);
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 } 903 }
904 904
905 void CSSAnimationUpdate::trace(Visitor* visitor) 905 void CSSAnimationUpdate::trace(Visitor* visitor)
906 { 906 {
907 visitor->trace(m_newTransitions); 907 visitor->trace(m_newTransitions);
908 visitor->trace(m_activeInterpolationsForAnimations); 908 visitor->trace(m_activeInterpolationsForAnimations);
909 visitor->trace(m_activeInterpolationsForTransitions); 909 visitor->trace(m_activeInterpolationsForTransitions);
910 } 910 }
911 911
912 } // namespace WebCore 912 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/CSSGrammar.y » ('j') | Source/core/css/CSSGrammar.y » ('J')

Powered by Google App Engine
This is Rietveld 408576698