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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 } | 556 } |
557 ASSERT_NOT_REACHED(); | 557 ASSERT_NOT_REACHED(); |
558 return CSSPrimitiveValue::UnitType::Unknown; | 558 return CSSPrimitiveValue::UnitType::Unknown; |
559 } | 559 } |
560 | 560 |
561 static String formatNumber(double number, const StringView& suffix) | 561 static String formatNumber(double number, const StringView& suffix) |
562 { | 562 { |
563 #if OS(WIN) && _MSC_VER < 1900 | 563 #if OS(WIN) && _MSC_VER < 1900 |
564 unsigned oldFormat = _set_output_format(_TWO_DIGIT_EXPONENT); | 564 unsigned oldFormat = _set_output_format(_TWO_DIGIT_EXPONENT); |
565 #endif | 565 #endif |
566 String result = String::format("%.6g", number); | 566 String result = String::format("%.7g", number); |
567 #if OS(WIN) && _MSC_VER < 1900 | 567 #if OS(WIN) && _MSC_VER < 1900 |
568 _set_output_format(oldFormat); | 568 _set_output_format(oldFormat); |
569 #endif | 569 #endif |
570 result.append(suffix); | 570 result.append(suffix); |
571 return result; | 571 return result; |
572 } | 572 } |
573 | 573 |
574 const char* CSSPrimitiveValue::unitTypeToString(UnitType type) | 574 const char* CSSPrimitiveValue::unitTypeToString(UnitType type) |
575 { | 575 { |
576 switch (type) { | 576 switch (type) { |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 case UnitType::Calc: | 772 case UnitType::Calc: |
773 visitor->trace(m_value.calc); | 773 visitor->trace(m_value.calc); |
774 break; | 774 break; |
775 default: | 775 default: |
776 break; | 776 break; |
777 } | 777 } |
778 CSSValue::traceAfterDispatch(visitor); | 778 CSSValue::traceAfterDispatch(visitor); |
779 } | 779 } |
780 | 780 |
781 } // namespace blink | 781 } // namespace blink |
OLD | NEW |