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

Side by Side Diff: third_party/WebKit/Source/core/animation/NumberPropertyFunctions.cpp

Issue 2692383004: Support animating CSS property "order" (Closed)
Patch Set: orderorder Created 3 years, 10 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 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/animation/NumberPropertyFunctions.h" 5 #include "core/animation/NumberPropertyFunctions.h"
6 6
7 #include "core/style/ComputedStyle.h" 7 #include "core/style/ComputedStyle.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 14 matching lines...) Expand all
25 return true; 25 return true;
26 case CSSPropertyFlexShrink: 26 case CSSPropertyFlexShrink:
27 result = style.flexShrink(); 27 result = style.flexShrink();
28 return true; 28 return true;
29 case CSSPropertyFloodOpacity: 29 case CSSPropertyFloodOpacity:
30 result = style.floodOpacity(); 30 result = style.floodOpacity();
31 return true; 31 return true;
32 case CSSPropertyOpacity: 32 case CSSPropertyOpacity:
33 result = style.opacity(); 33 result = style.opacity();
34 return true; 34 return true;
35 case CSSPropertyOrder:
36 result = style.order();
37 return true;
35 case CSSPropertyOrphans: 38 case CSSPropertyOrphans:
36 result = style.orphans(); 39 result = style.orphans();
37 return true; 40 return true;
38 case CSSPropertyShapeImageThreshold: 41 case CSSPropertyShapeImageThreshold:
39 result = style.shapeImageThreshold(); 42 result = style.shapeImageThreshold();
40 return true; 43 return true;
41 case CSSPropertyStopOpacity: 44 case CSSPropertyStopOpacity:
42 result = style.stopOpacity(); 45 result = style.stopOpacity();
43 return true; 46 return true;
44 case CSSPropertyStrokeMiterlimit: 47 case CSSPropertyStrokeMiterlimit:
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 case CSSPropertyOrphans: 113 case CSSPropertyOrphans:
111 case CSSPropertyWidows: 114 case CSSPropertyWidows:
112 return clampTo<short>(round(value), 1); 115 return clampTo<short>(round(value), 1);
113 116
114 case CSSPropertyColumnCount: 117 case CSSPropertyColumnCount:
115 return clampTo<unsigned short>(round(value), 1); 118 return clampTo<unsigned short>(round(value), 1);
116 119
117 case CSSPropertyColumnRuleWidth: 120 case CSSPropertyColumnRuleWidth:
118 return clampTo<unsigned short>(round(value)); 121 return clampTo<unsigned short>(round(value));
119 122
123 case CSSPropertyOrder:
120 case CSSPropertyZIndex: 124 case CSSPropertyZIndex:
121 return clampTo<int>(round(value)); 125 return clampTo<int>(round(value));
122 126
123 default: 127 default:
124 NOTREACHED(); 128 NOTREACHED();
125 return value; 129 return value;
126 } 130 }
127 } 131 }
128 132
129 bool NumberPropertyFunctions::setNumber(CSSPropertyID property, 133 bool NumberPropertyFunctions::setNumber(CSSPropertyID property,
(...skipping 12 matching lines...) Expand all
142 return true; 146 return true;
143 case CSSPropertyFloodOpacity: 147 case CSSPropertyFloodOpacity:
144 style.setFloodOpacity(value); 148 style.setFloodOpacity(value);
145 return true; 149 return true;
146 case CSSPropertyLineHeight: 150 case CSSPropertyLineHeight:
147 style.setLineHeight(Length(value * 100, Percent)); 151 style.setLineHeight(Length(value * 100, Percent));
148 return true; 152 return true;
149 case CSSPropertyOpacity: 153 case CSSPropertyOpacity:
150 style.setOpacity(value); 154 style.setOpacity(value);
151 return true; 155 return true;
156 case CSSPropertyOrder:
157 style.setOrder(value);
158 return true;
152 case CSSPropertyOrphans: 159 case CSSPropertyOrphans:
153 style.setOrphans(value); 160 style.setOrphans(value);
154 return true; 161 return true;
155 case CSSPropertyShapeImageThreshold: 162 case CSSPropertyShapeImageThreshold:
156 style.setShapeImageThreshold(value); 163 style.setShapeImageThreshold(value);
157 return true; 164 return true;
158 case CSSPropertyStopOpacity: 165 case CSSPropertyStopOpacity:
159 style.setStopOpacity(value); 166 style.setStopOpacity(value);
160 return true; 167 return true;
161 case CSSPropertyStrokeMiterlimit: 168 case CSSPropertyStrokeMiterlimit:
(...skipping 10 matching lines...) Expand all
172 return true; 179 return true;
173 case CSSPropertyZIndex: 180 case CSSPropertyZIndex:
174 style.setZIndex(value); 181 style.setZIndex(value);
175 return true; 182 return true;
176 default: 183 default:
177 return false; 184 return false;
178 } 185 }
179 } 186 }
180 187
181 } // namespace blink 188 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698