| 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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 } | 795 } |
| 796 | 796 |
| 797 String CSSPrimitiveValue::getStringValue() const | 797 String CSSPrimitiveValue::getStringValue() const |
| 798 { | 798 { |
| 799 switch (type()) { | 799 switch (type()) { |
| 800 case UnitType::CustomIdentifier: | 800 case UnitType::CustomIdentifier: |
| 801 case UnitType::String: | 801 case UnitType::String: |
| 802 case UnitType::Attribute: | 802 case UnitType::Attribute: |
| 803 case UnitType::URI: | 803 case UnitType::URI: |
| 804 return m_value.string; | 804 return m_value.string; |
| 805 case UnitType::ValueID: | |
| 806 return valueName(m_value.valueID); | |
| 807 case UnitType::PropertyID: | |
| 808 return propertyName(m_value.propertyID); | |
| 809 default: | 805 default: |
| 810 break; | 806 break; |
| 811 } | 807 } |
| 812 | 808 |
| 809 ASSERT_NOT_REACHED(); |
| 813 return String(); | 810 return String(); |
| 814 } | 811 } |
| 815 | 812 |
| 816 static String formatNumber(double number, const char* suffix, unsigned suffixLen
gth) | 813 static String formatNumber(double number, const char* suffix, unsigned suffixLen
gth) |
| 817 { | 814 { |
| 818 #if OS(WIN) && _MSC_VER < 1900 | 815 #if OS(WIN) && _MSC_VER < 1900 |
| 819 unsigned oldFormat = _set_output_format(_TWO_DIGIT_EXPONENT); | 816 unsigned oldFormat = _set_output_format(_TWO_DIGIT_EXPONENT); |
| 820 #endif | 817 #endif |
| 821 String result = String::format("%.6g", number); | 818 String result = String::format("%.6g", number); |
| 822 #if OS(WIN) && _MSC_VER < 1900 | 819 #if OS(WIN) && _MSC_VER < 1900 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 visitor->trace(m_value.shape); | 1106 visitor->trace(m_value.shape); |
| 1110 break; | 1107 break; |
| 1111 default: | 1108 default: |
| 1112 break; | 1109 break; |
| 1113 } | 1110 } |
| 1114 #endif | 1111 #endif |
| 1115 CSSValue::traceAfterDispatch(visitor); | 1112 CSSValue::traceAfterDispatch(visitor); |
| 1116 } | 1113 } |
| 1117 | 1114 |
| 1118 } // namespace blink | 1115 } // namespace blink |
| OLD | NEW |