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

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

Issue 1153943003: Add foundation for removing AnimatableValues from StyleInterpolation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef InterpolationIsInvalid_h
6 #define InterpolationIsInvalid_h
7
8 #include "platform/heap/Handle.h"
9
10 namespace blink {
11
12 class StyleResolverState;
13
14 class InterpolationIsInvalid : public RefCountedWillBeGarbageCollectedFinalized< InterpolationIsInvalid> {
15 public:
16 virtual ~InterpolationIsInvalid() { }
17
18 bool checkChain(const StyleResolverState& state)
19 {
20 return checkSingle(state) || (m_next && m_next->checkChain(state));
21 }
22
23 static void chain(RefPtrWillBeRawPtr<InterpolationIsInvalid>& existing, Pass RefPtrWillBeRawPtr<InterpolationIsInvalid> extra)
Eric Willigers 2015/05/27 04:26:35 Possibly rename arguments to prefix, suffix
alancutter (OOO until 2018) 2015/05/27 08:27:48 Done.
24 {
25 if (!extra)
26 return;
27 if (!existing)
28 existing = extra;
29 else if (existing != extra)
30 existing->chainWith(extra);
31 }
32
33 DEFINE_INLINE_VIRTUAL_TRACE()
34 {
35 visitor->trace(m_next);
36 }
37
38 protected:
39 virtual bool checkSingle(const StyleResolverState&) = 0;
40
41 private:
42 void chainWith(PassRefPtrWillBeRawPtr<InterpolationIsInvalid> extra)
Eric Willigers 2015/05/27 04:26:35 Possibly rename argument to suffix
alancutter (OOO until 2018) 2015/05/27 08:27:48 Done.
43 {
44 ASSERT(extra);
45 if (!m_next)
46 m_next = extra;
47 else if (m_next != extra)
48 m_next->chainWith(extra);
Eric Willigers 2015/05/27 04:26:35 Explicit while loop instead?
alancutter (OOO until 2018) 2015/05/27 08:27:48 Done.
49 }
50
51 RefPtrWillBeMember<InterpolationIsInvalid> m_next;
52 };
53
54 } // namespace blink
55
56 #endif // InterpolationIsInvalid_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698