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

Side by Side Diff: Source/core/animation/AnimatableRepeatable.h

Issue 26292004: Web Animations CSS: Support animation of stroke-dasharray property (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 2 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
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual ~AnimatableRepeatable() { } 43 virtual ~AnimatableRepeatable() { }
44 44
45 // This will consume the vector passed into it. 45 // This will consume the vector passed into it.
46 static PassRefPtr<AnimatableRepeatable> create(Vector<RefPtr<AnimatableValue > >& values) 46 static PassRefPtr<AnimatableRepeatable> create(Vector<RefPtr<AnimatableValue > >& values)
47 { 47 {
48 return adoptRef(new AnimatableRepeatable(values)); 48 return adoptRef(new AnimatableRepeatable(values));
49 } 49 }
50 50
51 const Vector<RefPtr<AnimatableValue> >& values() const { return m_values; } 51 const Vector<RefPtr<AnimatableValue> >& values() const { return m_values; }
52 52
53 private: 53 protected:
54 AnimatableRepeatable()
55 {
56 }
54 AnimatableRepeatable(Vector<RefPtr<AnimatableValue> >& values) 57 AnimatableRepeatable(Vector<RefPtr<AnimatableValue> >& values)
55 { 58 {
56 ASSERT(!values.isEmpty()); 59 ASSERT(!values.isEmpty());
57 m_values.swap(values); 60 m_values.swap(values);
58 } 61 }
59 62
63 static bool interpolateLists(const Vector<RefPtr<AnimatableValue> >& fromVal ues, const Vector<RefPtr<AnimatableValue> >& toValues, double fraction, Vector<R efPtr<AnimatableValue> >& interpolatedValues);
64
65 Vector<RefPtr<AnimatableValue> > m_values;
66
67 private:
60 virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, do uble fraction) const OVERRIDE; 68 virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, do uble fraction) const OVERRIDE;
61 virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OV ERRIDE; 69 virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OV ERRIDE;
62 70
63 virtual AnimatableType type() const OVERRIDE { return TypeRepeatable; } 71 virtual AnimatableType type() const OVERRIDE { return TypeRepeatable; }
64 virtual bool equalTo(const AnimatableValue*) const OVERRIDE; 72 virtual bool equalTo(const AnimatableValue*) const OVERRIDE;
65
66 Vector<RefPtr<AnimatableValue> > m_values;
67 }; 73 };
68 74
69 inline const AnimatableRepeatable* toAnimatableRepeatable(const AnimatableValue* value) 75 inline const AnimatableRepeatable* toAnimatableRepeatable(const AnimatableValue* value)
70 { 76 {
71 ASSERT_WITH_SECURITY_IMPLICATION(value && value->isRepeatable()); 77 ASSERT_WITH_SECURITY_IMPLICATION(value && value->isRepeatable());
72 return static_cast<const AnimatableRepeatable*>(value); 78 return static_cast<const AnimatableRepeatable*>(value);
73 } 79 }
74 80
75 } // namespace WebCore 81 } // namespace WebCore
76 82
77 #endif // AnimatableRepeatable_h 83 #endif // AnimatableRepeatable_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698