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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp

Issue 2704343003: Catch up the spec update in CSS Rhythmic Sizing (Closed)
Patch Set: Sorted CSSProperties.json5 alphabetically (meade@'s nit) Created 3 years, 9 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 /* 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698