| OLD | NEW |
| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 case CSSPropertyColumnCount: | 113 case CSSPropertyColumnCount: |
| 114 return clampTo<unsigned short>(round(value), 1); | 114 return clampTo<unsigned short>(round(value), 1); |
| 115 | 115 |
| 116 case CSSPropertyColumnRuleWidth: | 116 case CSSPropertyColumnRuleWidth: |
| 117 return clampTo<unsigned short>(round(value)); | 117 return clampTo<unsigned short>(round(value)); |
| 118 | 118 |
| 119 case CSSPropertyZIndex: | 119 case CSSPropertyZIndex: |
| 120 return clampTo<int>(round(value)); | 120 return clampTo<int>(round(value)); |
| 121 | 121 |
| 122 default: | 122 default: |
| 123 ASSERT_NOT_REACHED(); | 123 NOTREACHED(); |
| 124 return value; | 124 return value; |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 | 127 |
| 128 bool NumberPropertyFunctions::setNumber(CSSPropertyID property, ComputedStyle& s
tyle, double value) | 128 bool NumberPropertyFunctions::setNumber(CSSPropertyID property, ComputedStyle& s
tyle, double value) |
| 129 { | 129 { |
| 130 ASSERT(value == clampNumber(property, value)); | 130 ASSERT(value == clampNumber(property, value)); |
| 131 switch (property) { | 131 switch (property) { |
| 132 case CSSPropertyFillOpacity: | 132 case CSSPropertyFillOpacity: |
| 133 style.setFillOpacity(value); | 133 style.setFillOpacity(value); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 return true; | 170 return true; |
| 171 case CSSPropertyZIndex: | 171 case CSSPropertyZIndex: |
| 172 style.setZIndex(value); | 172 style.setZIndex(value); |
| 173 return true; | 173 return true; |
| 174 default: | 174 default: |
| 175 return false; | 175 return false; |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 | 178 |
| 179 } // namespace blink | 179 } // namespace blink |
| OLD | NEW |