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

Side by Side Diff: Source/platform/transforms/TransformOperation.h

Issue 1196913005: Implement animations for Independent CSS Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove Compositor Animations and add tests for inherit and initial Created 5 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 || opType == Translate3D 74 || opType == Translate3D
75 || opType == RotateX 75 || opType == RotateX
76 || opType == RotateY 76 || opType == RotateY
77 || opType == Rotate3D 77 || opType == Rotate3D
78 || opType == Matrix3D 78 || opType == Matrix3D
79 || opType == Perspective 79 || opType == Perspective
80 || opType == Interpolated; 80 || opType == Interpolated;
81 } 81 }
82 82
83 virtual bool dependsOnBoxSize() const { return false; } 83 virtual bool dependsOnBoxSize() const { return false; }
84
85 bool isRotate() const
86 {
87 return type() == Rotate
88 || type() == RotateX
89 || type() == RotateY
90 || type() == RotateZ
91 || type() == Rotate3D;
92 }
93
94 bool isScale() const
95 {
96 return type() == Scale
97 || type() == ScaleX
98 || type() == ScaleY
99 || type() == ScaleZ
100 || type() == Scale3D;
101 }
102
103 bool isTranslate() const
104 {
105 return type() == Translate
106 || type() == TranslateX
107 || type() == TranslateY
108 || type() == TranslateZ
109 || type() == Translate3D;
110 }
alancutter (OOO until 2018) 2015/06/24 01:17:09 Make these virtual and define them in the subclass
soonm 2015/06/24 02:53:19 Done.
111
84 }; 112 };
85 113
114 #define DEFINE_TRANSFORM_TYPE_CASTS(thisType, predicate) \
115 DEFINE_TYPE_CASTS(thisType, TransformOperation, transform, transform->predic ate, transform.predicate)
116
86 } // namespace blink 117 } // namespace blink
87 118
88 #endif // TransformOperation_h 119 #endif // TransformOperation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698