| 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 14 matching lines...) Expand all Loading... |
| 25 #include "core/css/CSSCalculationValue.h" | 25 #include "core/css/CSSCalculationValue.h" |
| 26 #include "core/css/CSSHelper.h" | 26 #include "core/css/CSSHelper.h" |
| 27 #include "core/css/CSSMarkup.h" | 27 #include "core/css/CSSMarkup.h" |
| 28 #include "core/css/CSSToLengthConversionData.h" | 28 #include "core/css/CSSToLengthConversionData.h" |
| 29 #include "core/css/Counter.h" | 29 #include "core/css/Counter.h" |
| 30 #include "core/css/Pair.h" | 30 #include "core/css/Pair.h" |
| 31 #include "core/css/Rect.h" | 31 #include "core/css/Rect.h" |
| 32 #include "core/css/StyleSheetContents.h" | 32 #include "core/css/StyleSheetContents.h" |
| 33 #include "core/dom/Node.h" | 33 #include "core/dom/Node.h" |
| 34 #include "core/style/ComputedStyle.h" | 34 #include "core/style/ComputedStyle.h" |
| 35 #include "platform/Decimal.h" | |
| 36 #include "platform/LayoutUnit.h" | 35 #include "platform/LayoutUnit.h" |
| 37 #include "platform/fonts/FontMetrics.h" | 36 #include "platform/fonts/FontMetrics.h" |
| 38 #include "wtf/StdLibExtras.h" | 37 #include "wtf/StdLibExtras.h" |
| 39 #include "wtf/ThreadSpecific.h" | 38 #include "wtf/ThreadSpecific.h" |
| 40 #include "wtf/Threading.h" | 39 #include "wtf/Threading.h" |
| 41 #include "wtf/text/StringBuffer.h" | 40 #include "wtf/text/StringBuffer.h" |
| 42 #include "wtf/text/StringBuilder.h" | 41 #include "wtf/text/StringBuilder.h" |
| 43 | 42 |
| 44 using namespace WTF; | 43 using namespace WTF; |
| 45 | 44 |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 return propertyName(m_value.propertyID); | 819 return propertyName(m_value.propertyID); |
| 821 default: | 820 default: |
| 822 break; | 821 break; |
| 823 } | 822 } |
| 824 | 823 |
| 825 return String(); | 824 return String(); |
| 826 } | 825 } |
| 827 | 826 |
| 828 static String formatNumber(double number, const char* suffix, unsigned suffixLen
gth) | 827 static String formatNumber(double number, const char* suffix, unsigned suffixLen
gth) |
| 829 { | 828 { |
| 830 Decimal decimal = Decimal::fromDouble(number); | 829 #if OS(WIN) |
| 831 String result = decimal.toString(); | 830 unsigned oldFormat = _set_output_format(_TWO_DIGIT_EXPONENT); |
| 831 #endif |
| 832 String result = String::format("%.6g", number); |
| 833 #if OS(WIN) |
| 834 _set_output_format(oldFormat); |
| 835 #endif |
| 832 result.append(suffix, suffixLength); | 836 result.append(suffix, suffixLength); |
| 833 return result; | 837 return result; |
| 834 } | 838 } |
| 835 | 839 |
| 836 template <unsigned characterCount> | 840 template <unsigned characterCount> |
| 837 ALWAYS_INLINE static String formatNumber(double number, const char (&characters)
[characterCount]) | 841 ALWAYS_INLINE static String formatNumber(double number, const char (&characters)
[characterCount]) |
| 838 { | 842 { |
| 839 return formatNumber(number, characters, characterCount - 1); | 843 return formatNumber(number, characters, characterCount - 1); |
| 840 } | 844 } |
| 841 | 845 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 visitor->trace(m_value.shape); | 1135 visitor->trace(m_value.shape); |
| 1132 break; | 1136 break; |
| 1133 default: | 1137 default: |
| 1134 break; | 1138 break; |
| 1135 } | 1139 } |
| 1136 #endif | 1140 #endif |
| 1137 CSSValue::traceAfterDispatch(visitor); | 1141 CSSValue::traceAfterDispatch(visitor); |
| 1138 } | 1142 } |
| 1139 | 1143 |
| 1140 } // namespace blink | 1144 } // namespace blink |
| OLD | NEW |