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 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 return roundForImpreciseConversion<int>(computeLengthDouble(style, rootStyle
, multiplier, computingFontSize)); | 424 return roundForImpreciseConversion<int>(computeLengthDouble(style, rootStyle
, multiplier, computingFontSize)); |
425 } | 425 } |
426 | 426 |
427 template<> unsigned CSSPrimitiveValue::computeLength(RenderStyle* style, RenderS
tyle* rootStyle, float multiplier, bool computingFontSize) | 427 template<> unsigned CSSPrimitiveValue::computeLength(RenderStyle* style, RenderS
tyle* rootStyle, float multiplier, bool computingFontSize) |
428 { | 428 { |
429 return roundForImpreciseConversion<unsigned>(computeLengthDouble(style, root
Style, multiplier, computingFontSize)); | 429 return roundForImpreciseConversion<unsigned>(computeLengthDouble(style, root
Style, multiplier, computingFontSize)); |
430 } | 430 } |
431 | 431 |
432 template<> Length CSSPrimitiveValue::computeLength(RenderStyle* style, RenderSty
le* rootStyle, float multiplier, bool computingFontSize) | 432 template<> Length CSSPrimitiveValue::computeLength(RenderStyle* style, RenderSty
le* rootStyle, float multiplier, bool computingFontSize) |
433 { | 433 { |
434 return Length(roundForImpreciseConversion<float>(computeLengthDouble(style,
rootStyle, multiplier, computingFontSize)), Fixed); | 434 return Length(roundForImpreciseConversion<int>(computeLengthDouble(style, ro
otStyle, multiplier, computingFontSize)), Fixed); |
435 } | 435 } |
436 | 436 |
437 template<> short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyl
e* rootStyle, float multiplier, bool computingFontSize) | 437 template<> short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyl
e* rootStyle, float multiplier, bool computingFontSize) |
438 { | 438 { |
439 return roundForImpreciseConversion<short>(computeLengthDouble(style, rootSty
le, multiplier, computingFontSize)); | 439 return roundForImpreciseConversion<short>(computeLengthDouble(style, rootSty
le, multiplier, computingFontSize)); |
440 } | 440 } |
441 | 441 |
442 template<> unsigned short CSSPrimitiveValue::computeLength(RenderStyle* style, R
enderStyle* rootStyle, float multiplier, bool computingFontSize) | 442 template<> unsigned short CSSPrimitiveValue::computeLength(RenderStyle* style, R
enderStyle* rootStyle, float multiplier, bool computingFontSize) |
443 { | 443 { |
444 return roundForImpreciseConversion<unsigned short>(computeLengthDouble(style
, rootStyle, multiplier, computingFontSize)); | 444 return roundForImpreciseConversion<unsigned short>(computeLengthDouble(style
, rootStyle, multiplier, computingFontSize)); |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 ASSERT_NOT_REACHED(); | 1163 ASSERT_NOT_REACHED(); |
1164 break; | 1164 break; |
1165 } | 1165 } |
1166 if (result) | 1166 if (result) |
1167 result->setCSSOMSafe(); | 1167 result->setCSSOMSafe(); |
1168 | 1168 |
1169 return result; | 1169 return result; |
1170 } | 1170 } |
1171 | 1171 |
1172 } // namespace WebCore | 1172 } // namespace WebCore |
OLD | NEW |