OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights |
4 * reserved. | 4 * reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } | 295 } |
296 | 296 |
297 template <> | 297 template <> |
298 unsigned short CSSPrimitiveValue::computeLength( | 298 unsigned short CSSPrimitiveValue::computeLength( |
299 const CSSToLengthConversionData& conversionData) const { | 299 const CSSToLengthConversionData& conversionData) const { |
300 return roundForImpreciseConversion<unsigned short>( | 300 return roundForImpreciseConversion<unsigned short>( |
301 computeLengthDouble(conversionData)); | 301 computeLengthDouble(conversionData)); |
302 } | 302 } |
303 | 303 |
304 template <> | 304 template <> |
| 305 uint8_t CSSPrimitiveValue::computeLength( |
| 306 const CSSToLengthConversionData& conversionData) const { |
| 307 return roundForImpreciseConversion<uint8_t>( |
| 308 computeLengthDouble(conversionData)); |
| 309 } |
| 310 |
| 311 template <> |
305 float CSSPrimitiveValue::computeLength( | 312 float CSSPrimitiveValue::computeLength( |
306 const CSSToLengthConversionData& conversionData) const { | 313 const CSSToLengthConversionData& conversionData) const { |
307 return clampTo<float>(computeLengthDouble(conversionData)); | 314 return clampTo<float>(computeLengthDouble(conversionData)); |
308 } | 315 } |
309 | 316 |
310 template <> | 317 template <> |
311 double CSSPrimitiveValue::computeLength( | 318 double CSSPrimitiveValue::computeLength( |
312 const CSSToLengthConversionData& conversionData) const { | 319 const CSSToLengthConversionData& conversionData) const { |
313 return computeLengthDouble(conversionData); | 320 return computeLengthDouble(conversionData); |
314 } | 321 } |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 case UnitType::Calc: | 715 case UnitType::Calc: |
709 visitor->trace(m_value.calc); | 716 visitor->trace(m_value.calc); |
710 break; | 717 break; |
711 default: | 718 default: |
712 break; | 719 break; |
713 } | 720 } |
714 CSSValue::traceAfterDispatch(visitor); | 721 CSSValue::traceAfterDispatch(visitor); |
715 } | 722 } |
716 | 723 |
717 } // namespace blink | 724 } // namespace blink |
OLD | NEW |