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, 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 case SpaceSeparator: | 72 case SpaceSeparator: |
73 newList = createSpaceSeparated(); | 73 newList = createSpaceSeparated(); |
74 break; | 74 break; |
75 case CommaSeparator: | 75 case CommaSeparator: |
76 newList = createCommaSeparated(); | 76 newList = createCommaSeparated(); |
77 break; | 77 break; |
78 case SlashSeparator: | 78 case SlashSeparator: |
79 newList = createSlashSeparated(); | 79 newList = createSlashSeparated(); |
80 break; | 80 break; |
81 default: | 81 default: |
82 ASSERT_NOT_REACHED(); | 82 NOTREACHED(); |
83 } | 83 } |
84 newList->m_values = m_values; | 84 newList->m_values = m_values; |
85 return newList; | 85 return newList; |
86 } | 86 } |
87 | 87 |
88 String CSSValueList::customCSSText() const { | 88 String CSSValueList::customCSSText() const { |
89 StringBuilder result; | 89 StringBuilder result; |
90 String separator; | 90 String separator; |
91 switch (m_valueListSeparator) { | 91 switch (m_valueListSeparator) { |
92 case SpaceSeparator: | 92 case SpaceSeparator: |
93 separator = " "; | 93 separator = " "; |
94 break; | 94 break; |
95 case CommaSeparator: | 95 case CommaSeparator: |
96 separator = ", "; | 96 separator = ", "; |
97 break; | 97 break; |
98 case SlashSeparator: | 98 case SlashSeparator: |
99 separator = " / "; | 99 separator = " / "; |
100 break; | 100 break; |
101 default: | 101 default: |
102 ASSERT_NOT_REACHED(); | 102 NOTREACHED(); |
103 } | 103 } |
104 | 104 |
105 unsigned size = m_values.size(); | 105 unsigned size = m_values.size(); |
106 for (unsigned i = 0; i < size; i++) { | 106 for (unsigned i = 0; i < size; i++) { |
107 if (!result.isEmpty()) | 107 if (!result.isEmpty()) |
108 result.append(separator); | 108 result.append(separator); |
109 result.append(m_values[i]->cssText()); | 109 result.append(m_values[i]->cssText()); |
110 } | 110 } |
111 | 111 |
112 return result.toString(); | 112 return result.toString(); |
(...skipping 24 matching lines...) Expand all Loading... |
137 for (const auto& value : m_values) | 137 for (const auto& value : m_values) |
138 value->reResolveUrl(document); | 138 value->reResolveUrl(document); |
139 } | 139 } |
140 | 140 |
141 DEFINE_TRACE_AFTER_DISPATCH(CSSValueList) { | 141 DEFINE_TRACE_AFTER_DISPATCH(CSSValueList) { |
142 visitor->trace(m_values); | 142 visitor->trace(m_values); |
143 CSSValue::traceAfterDispatch(visitor); | 143 CSSValue::traceAfterDispatch(visitor); |
144 } | 144 } |
145 | 145 |
146 } // namespace blink | 146 } // namespace blink |
OLD | NEW |