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

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

Issue 2737673003: Revert of Catch up the spec update in CSS Rhythmic Sizing (Closed)
Patch Set: 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 computeLengthDouble(conversionData)); 294 computeLengthDouble(conversionData));
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 <>
305 uint8_t CSSPrimitiveValue::computeLength(
306 const CSSToLengthConversionData& conversionData) const {
307 return roundForImpreciseConversion<uint8_t>(
308 computeLengthDouble(conversionData));
309 }
310
311 template <> 304 template <>
312 float CSSPrimitiveValue::computeLength( 305 float CSSPrimitiveValue::computeLength(
313 const CSSToLengthConversionData& conversionData) const { 306 const CSSToLengthConversionData& conversionData) const {
314 return clampTo<float>(computeLengthDouble(conversionData)); 307 return clampTo<float>(computeLengthDouble(conversionData));
315 } 308 }
316 309
317 template <> 310 template <>
318 double CSSPrimitiveValue::computeLength( 311 double CSSPrimitiveValue::computeLength(
319 const CSSToLengthConversionData& conversionData) const { 312 const CSSToLengthConversionData& conversionData) const {
320 return computeLengthDouble(conversionData); 313 return computeLengthDouble(conversionData);
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 case UnitType::Calc: 708 case UnitType::Calc:
716 visitor->trace(m_value.calc); 709 visitor->trace(m_value.calc);
717 break; 710 break;
718 default: 711 default:
719 break; 712 break;
720 } 713 }
721 CSSValue::traceAfterDispatch(visitor); 714 CSSValue::traceAfterDispatch(visitor);
722 } 715 }
723 716
724 } // namespace blink 717 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698