| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * * Redistributions of source code must retain the above copyright | 4 * * Redistributions of source code must retain the above copyright |
| 5 * notice, this list of conditions and the following disclaimer. | 5 * notice, this list of conditions and the following disclaimer. |
| 6 * * Redistributions in binary form must reproduce the above | 6 * * Redistributions in binary form must reproduce the above |
| 7 * copyright notice, this list of conditions and the following disclaimer | 7 * copyright notice, this list of conditions and the following disclaimer |
| 8 * in the documentation and/or other materials provided with the | 8 * in the documentation and/or other materials provided with the |
| 9 * distribution. | 9 * distribution. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 StyleResolverState& state, | 1168 StyleResolverState& state, |
| 1169 const CSSValue& value) { | 1169 const CSSValue& value) { |
| 1170 // Handles: none | repeat(<length>) | 1170 // Handles: none | repeat(<length>) |
| 1171 ScrollSnapPoints points; | 1171 ScrollSnapPoints points; |
| 1172 points.hasRepeat = false; | 1172 points.hasRepeat = false; |
| 1173 | 1173 |
| 1174 if (!value.isFunctionValue()) | 1174 if (!value.isFunctionValue()) |
| 1175 return points; | 1175 return points; |
| 1176 | 1176 |
| 1177 const CSSFunctionValue& repeatFunction = toCSSFunctionValue(value); | 1177 const CSSFunctionValue& repeatFunction = toCSSFunctionValue(value); |
| 1178 ASSERT_WITH_SECURITY_IMPLICATION(repeatFunction.length() == 1); | 1178 SECURITY_DCHECK(repeatFunction.length() == 1); |
| 1179 points.repeatOffset = | 1179 points.repeatOffset = |
| 1180 convertLength(state, toCSSPrimitiveValue(repeatFunction.item(0))); | 1180 convertLength(state, toCSSPrimitiveValue(repeatFunction.item(0))); |
| 1181 points.hasRepeat = true; | 1181 points.hasRepeat = true; |
| 1182 | 1182 |
| 1183 return points; | 1183 return points; |
| 1184 } | 1184 } |
| 1185 | 1185 |
| 1186 Vector<LengthPoint> StyleBuilderConverter::convertSnapCoordinates( | 1186 Vector<LengthPoint> StyleBuilderConverter::convertSnapCoordinates( |
| 1187 StyleResolverState& state, | 1187 StyleResolverState& state, |
| 1188 const CSSValue& value) { | 1188 const CSSValue& value) { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1296 // Instead of the actual zoom, use 1 to avoid potential rounding errors | 1296 // Instead of the actual zoom, use 1 to avoid potential rounding errors |
| 1297 Length length = primitiveValue.convertToLength( | 1297 Length length = primitiveValue.convertToLength( |
| 1298 state.cssToLengthConversionData().copyWithAdjustedZoom(1)); | 1298 state.cssToLengthConversionData().copyWithAdjustedZoom(1)); |
| 1299 return *CSSPrimitiveValue::create(length, 1); | 1299 return *CSSPrimitiveValue::create(length, 1); |
| 1300 } | 1300 } |
| 1301 } | 1301 } |
| 1302 return value; | 1302 return value; |
| 1303 } | 1303 } |
| 1304 | 1304 |
| 1305 } // namespace blink | 1305 } // namespace blink |
| OLD | NEW |