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

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

Issue 2394683005: Remove ASSERT_UNUSED (Closed)
Patch Set: Created 4 years, 2 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 reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 double multiplier) const { 321 double multiplier) const {
322 ASSERT(lengthArray.values.size() == LengthUnitTypeCount); 322 ASSERT(lengthArray.values.size() == LengthUnitTypeCount);
323 323
324 if (type() == UnitType::Calc) { 324 if (type() == UnitType::Calc) {
325 cssCalcValue()->accumulateLengthArray(lengthArray, multiplier); 325 cssCalcValue()->accumulateLengthArray(lengthArray, multiplier);
326 return; 326 return;
327 } 327 }
328 328
329 LengthUnitType lengthType; 329 LengthUnitType lengthType;
330 bool conversionSuccess = unitTypeToLengthUnitType(type(), lengthType); 330 bool conversionSuccess = unitTypeToLengthUnitType(type(), lengthType);
331 ASSERT_UNUSED(conversionSuccess, conversionSuccess); 331 DCHECK(conversionSuccess);
332 lengthArray.values[lengthType] += 332 lengthArray.values[lengthType] +=
333 m_value.num * conversionToCanonicalUnitsScaleFactor(type()) * multiplier; 333 m_value.num * conversionToCanonicalUnitsScaleFactor(type()) * multiplier;
334 lengthArray.typeFlags.set(lengthType); 334 lengthArray.typeFlags.set(lengthType);
335 } 335 }
336 336
337 double CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor( 337 double CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor(
338 UnitType unitType) { 338 UnitType unitType) {
339 double factor = 1.0; 339 double factor = 1.0;
340 // FIXME: the switch can be replaced by an array of scale factors. 340 // FIXME: the switch can be replaced by an array of scale factors.
341 switch (unitType) { 341 switch (unitType) {
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 case UnitType::Calc: 704 case UnitType::Calc:
705 visitor->trace(m_value.calc); 705 visitor->trace(m_value.calc);
706 break; 706 break;
707 default: 707 default:
708 break; 708 break;
709 } 709 }
710 CSSValue::traceAfterDispatch(visitor); 710 CSSValue::traceAfterDispatch(visitor);
711 } 711 }
712 712
713 } // namespace blink 713 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698