OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 David Smith (catfish.man@gmail.com) | 2 * Copyright (C) 2007 David Smith (catfish.man@gmail.com) |
3 * Copyright (C) 2007, 2008, 2011, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008, 2011, 2012 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 return map; | 150 return map; |
151 } | 151 } |
152 | 152 |
153 void SpaceSplitString::set(const AtomicString& inputString, CaseFolding caseFold
ing) | 153 void SpaceSplitString::set(const AtomicString& inputString, CaseFolding caseFold
ing) |
154 { | 154 { |
155 if (inputString.isNull()) { | 155 if (inputString.isNull()) { |
156 clear(); | 156 clear(); |
157 return; | 157 return; |
158 } | 158 } |
159 | 159 |
160 if (caseFolding == ShouldFoldCase && hasNonASCIIOrUpper(inputString.string()
)) { | 160 if (caseFolding == ShouldFoldCase && hasNonASCIIOrUpper(inputString.getStrin
g())) { |
161 String string(inputString.string()); | 161 String string(inputString.getString()); |
162 string = string.foldCase(); | 162 string = string.foldCase(); |
163 m_data = Data::create(AtomicString(string)); | 163 m_data = Data::create(AtomicString(string)); |
164 } else { | 164 } else { |
165 m_data = Data::create(inputString); | 165 m_data = Data::create(inputString); |
166 } | 166 } |
167 } | 167 } |
168 | 168 |
169 SpaceSplitString::Data::~Data() | 169 SpaceSplitString::Data::~Data() |
170 { | 170 { |
171 if (!m_keyString.isNull()) | 171 if (!m_keyString.isNull()) |
(...skipping 24 matching lines...) Expand all Loading... |
196 | 196 |
197 SpaceSplitString::Data::Data(const SpaceSplitString::Data& other) | 197 SpaceSplitString::Data::Data(const SpaceSplitString::Data& other) |
198 : RefCounted<Data>() | 198 : RefCounted<Data>() |
199 , m_vector(other.m_vector) | 199 , m_vector(other.m_vector) |
200 { | 200 { |
201 // Note that we don't copy m_keyString to indicate to the destructor that th
ere's nothing | 201 // Note that we don't copy m_keyString to indicate to the destructor that th
ere's nothing |
202 // to be removed from the sharedDataMap(). | 202 // to be removed from the sharedDataMap(). |
203 } | 203 } |
204 | 204 |
205 } // namespace blink | 205 } // namespace blink |
OLD | NEW |