| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 return true; | 48 return true; |
| 49 case CSSPropertyWidows: | 49 case CSSPropertyWidows: |
| 50 result = style.widows(); | 50 result = style.widows(); |
| 51 return true; | 51 return true; |
| 52 | 52 |
| 53 case CSSPropertyFontSizeAdjust: | 53 case CSSPropertyFontSizeAdjust: |
| 54 if (!style.hasFontSizeAdjust()) | 54 if (!style.hasFontSizeAdjust()) |
| 55 return false; | 55 return false; |
| 56 result = style.fontSizeAdjust(); | 56 result = style.fontSizeAdjust(); |
| 57 return true; | 57 return true; |
| 58 case CSSPropertyWebkitColumnCount: | 58 case CSSPropertyColumnCount: |
| 59 if (style.hasAutoColumnCount()) | 59 if (style.hasAutoColumnCount()) |
| 60 return false; | 60 return false; |
| 61 result = style.columnCount(); | 61 result = style.columnCount(); |
| 62 return true; | 62 return true; |
| 63 case CSSPropertyZIndex: | 63 case CSSPropertyZIndex: |
| 64 if (style.hasAutoZIndex()) | 64 if (style.hasAutoZIndex()) |
| 65 return false; | 65 return false; |
| 66 result = style.zIndex(); | 66 result = style.zIndex(); |
| 67 return true; | 67 return true; |
| 68 | 68 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 case CSSPropertyFlexGrow: | 103 case CSSPropertyFlexGrow: |
| 104 case CSSPropertyFlexShrink: | 104 case CSSPropertyFlexShrink: |
| 105 case CSSPropertyFontSizeAdjust: | 105 case CSSPropertyFontSizeAdjust: |
| 106 case CSSPropertyLineHeight: | 106 case CSSPropertyLineHeight: |
| 107 return clampTo<float>(value, 0); | 107 return clampTo<float>(value, 0); |
| 108 | 108 |
| 109 case CSSPropertyOrphans: | 109 case CSSPropertyOrphans: |
| 110 case CSSPropertyWidows: | 110 case CSSPropertyWidows: |
| 111 return clampTo<short>(round(value), 1); | 111 return clampTo<short>(round(value), 1); |
| 112 | 112 |
| 113 case CSSPropertyWebkitColumnCount: | 113 case CSSPropertyColumnCount: |
| 114 return clampTo<unsigned short>(round(value), 1); | 114 return clampTo<unsigned short>(round(value), 1); |
| 115 | 115 |
| 116 case CSSPropertyWebkitColumnRuleWidth: | 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 ASSERT_NOT_REACHED(); |
| 124 return value; | 124 return value; |
| 125 } | 125 } |
| 126 } | 126 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 155 return true; | 155 return true; |
| 156 case CSSPropertyStopOpacity: | 156 case CSSPropertyStopOpacity: |
| 157 style.setStopOpacity(value); | 157 style.setStopOpacity(value); |
| 158 return true; | 158 return true; |
| 159 case CSSPropertyStrokeMiterlimit: | 159 case CSSPropertyStrokeMiterlimit: |
| 160 style.setStrokeMiterLimit(value); | 160 style.setStrokeMiterLimit(value); |
| 161 return true; | 161 return true; |
| 162 case CSSPropertyStrokeOpacity: | 162 case CSSPropertyStrokeOpacity: |
| 163 style.setStrokeOpacity(value); | 163 style.setStrokeOpacity(value); |
| 164 return true; | 164 return true; |
| 165 case CSSPropertyWebkitColumnCount: | 165 case CSSPropertyColumnCount: |
| 166 style.setColumnCount(value); | 166 style.setColumnCount(value); |
| 167 return true; | 167 return true; |
| 168 case CSSPropertyWidows: | 168 case CSSPropertyWidows: |
| 169 style.setWidows(value); | 169 style.setWidows(value); |
| 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 |