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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 // We do not apply the zoom factor when we are computing the value of the fo
nt-size property. The zooming | 690 // We do not apply the zoom factor when we are computing the value of the fo
nt-size property. The zooming |
691 // for font sizes is much more complicated, since we have to worry about enf
orcing the minimum font size preference | 691 // for font sizes is much more complicated, since we have to worry about enf
orcing the minimum font size preference |
692 // as well as enforcing the implicit "smart minimum." | 692 // as well as enforcing the implicit "smart minimum." |
693 double result = getDoubleValue() * factor; | 693 double result = getDoubleValue() * factor; |
694 if (computingFontSize || isFontRelativeLength()) | 694 if (computingFontSize || isFontRelativeLength()) |
695 return result; | 695 return result; |
696 | 696 |
697 return result * conversionData.zoom(); | 697 return result * conversionData.zoom(); |
698 } | 698 } |
699 | 699 |
| 700 void CSSPrimitiveValue::zeroLengthArray(CSSLengthArray& lengthArray) |
| 701 { |
| 702 lengthArray.resize(LengthUnitTypeCount); |
| 703 for (size_t i = 0; i < LengthUnitTypeCount; ++i) |
| 704 lengthArray.at(i) = 0; |
| 705 } |
| 706 |
700 void CSSPrimitiveValue::accumulateLengthArray(CSSLengthArray& lengthArray, doubl
e multiplier) const | 707 void CSSPrimitiveValue::accumulateLengthArray(CSSLengthArray& lengthArray, doubl
e multiplier) const |
701 { | 708 { |
702 ASSERT(lengthArray.size() == LengthUnitTypeCount); | 709 ASSERT(lengthArray.size() == LengthUnitTypeCount); |
703 | 710 |
704 if (m_primitiveUnitType == CSS_CALC) { | 711 if (m_primitiveUnitType == CSS_CALC) { |
705 cssCalcValue()->accumulateLengthArray(lengthArray, multiplier); | 712 cssCalcValue()->accumulateLengthArray(lengthArray, multiplier); |
706 return; | 713 return; |
707 } | 714 } |
708 | 715 |
709 LengthUnitType lengthType; | 716 LengthUnitType lengthType; |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 case CSS_SHAPE: | 1471 case CSS_SHAPE: |
1465 visitor->trace(m_value.shape); | 1472 visitor->trace(m_value.shape); |
1466 break; | 1473 break; |
1467 default: | 1474 default: |
1468 break; | 1475 break; |
1469 } | 1476 } |
1470 CSSValue::traceAfterDispatch(visitor); | 1477 CSSValue::traceAfterDispatch(visitor); |
1471 } | 1478 } |
1472 | 1479 |
1473 } // namespace WebCore | 1480 } // namespace WebCore |
OLD | NEW |