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 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 void CSSPrimitiveValue::accumulateLengthArray(CSSLengthArray& lengthArray, CSSLe
ngthTypeArray& lengthTypeArray, double multiplier) const | 433 void CSSPrimitiveValue::accumulateLengthArray(CSSLengthArray& lengthArray, CSSLe
ngthTypeArray& lengthTypeArray, double multiplier) const |
434 { | 434 { |
435 ASSERT(lengthArray.size() == LengthUnitTypeCount); | 435 ASSERT(lengthArray.size() == LengthUnitTypeCount); |
436 | 436 |
437 if (type() == UnitType::Calc) { | 437 if (type() == UnitType::Calc) { |
438 cssCalcValue()->accumulateLengthArray(lengthArray, lengthTypeArray, mult
iplier); | 438 cssCalcValue()->accumulateLengthArray(lengthArray, lengthTypeArray, mult
iplier); |
439 return; | 439 return; |
440 } | 440 } |
441 | 441 |
442 LengthUnitType lengthType; | 442 LengthUnitType lengthType; |
443 if (unitTypeToLengthUnitType(type(), lengthType)) { | 443 bool conversionSuccess = unitTypeToLengthUnitType(type(), lengthType); |
444 lengthArray.at(lengthType) += m_value.num * conversionToCanonicalUnitsSc
aleFactor(type()) * multiplier; | 444 ASSERT_UNUSED(conversionSuccess, conversionSuccess); |
445 lengthTypeArray.set(lengthType); | 445 lengthArray.at(lengthType) += m_value.num * conversionToCanonicalUnitsScaleF
actor(type()) * multiplier; |
446 } | 446 lengthTypeArray.set(lengthType); |
447 } | 447 } |
448 | 448 |
449 void CSSPrimitiveValue::accumulateLengthArray(CSSLengthArray& lengthArray, doubl
e multiplier) const | 449 void CSSPrimitiveValue::accumulateLengthArray(CSSLengthArray& lengthArray, doubl
e multiplier) const |
450 { | 450 { |
451 CSSLengthTypeArray lengthTypeArray; | 451 CSSLengthTypeArray lengthTypeArray; |
452 lengthTypeArray.resize(CSSPrimitiveValue::LengthUnitTypeCount); | 452 lengthTypeArray.resize(CSSPrimitiveValue::LengthUnitTypeCount); |
453 for (size_t i = 0; i < CSSPrimitiveValue::LengthUnitTypeCount; ++i) | 453 for (size_t i = 0; i < CSSPrimitiveValue::LengthUnitTypeCount; ++i) |
454 lengthTypeArray.clear(i); | 454 lengthTypeArray.clear(i); |
455 return CSSPrimitiveValue::accumulateLengthArray(lengthArray, lengthTypeArray
, multiplier); | 455 return CSSPrimitiveValue::accumulateLengthArray(lengthArray, lengthTypeArray
, multiplier); |
456 } | 456 } |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 visitor->trace(m_value.calc); | 842 visitor->trace(m_value.calc); |
843 break; | 843 break; |
844 default: | 844 default: |
845 break; | 845 break; |
846 } | 846 } |
847 #endif | 847 #endif |
848 CSSValue::traceAfterDispatch(visitor); | 848 CSSValue::traceAfterDispatch(visitor); |
849 } | 849 } |
850 | 850 |
851 } // namespace blink | 851 } // namespace blink |
OLD | NEW |