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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 { | 157 { |
158 if (inputString.isNull()) { | 158 if (inputString.isNull()) { |
159 clear(); | 159 clear(); |
160 return; | 160 return; |
161 } | 161 } |
162 | 162 |
163 String string(inputString.string()); | 163 String string(inputString.string()); |
164 if (shouldFoldCase && hasNonASCIIOrUpper(string)) | 164 if (shouldFoldCase && hasNonASCIIOrUpper(string)) |
165 string = string.foldCase(); | 165 string = string.foldCase(); |
166 | 166 |
167 m_data = SpaceSplitStringData::create(string); | 167 m_data = SpaceSplitStringData::create(AtomicString(string)); |
168 } | 168 } |
169 | 169 |
170 SpaceSplitStringData::~SpaceSplitStringData() | 170 SpaceSplitStringData::~SpaceSplitStringData() |
171 { | 171 { |
172 if (!m_keyString.isNull()) | 172 if (!m_keyString.isNull()) |
173 sharedDataMap().remove(m_keyString); | 173 sharedDataMap().remove(m_keyString); |
174 } | 174 } |
175 | 175 |
176 PassRefPtr<SpaceSplitStringData> SpaceSplitStringData::create(const AtomicString
& string) | 176 PassRefPtr<SpaceSplitStringData> SpaceSplitStringData::create(const AtomicString
& string) |
177 { | 177 { |
(...skipping 19 matching lines...) Expand all Loading... |
197 | 197 |
198 SpaceSplitStringData::SpaceSplitStringData(const SpaceSplitStringData& other) | 198 SpaceSplitStringData::SpaceSplitStringData(const SpaceSplitStringData& other) |
199 : RefCounted<SpaceSplitStringData>() | 199 : RefCounted<SpaceSplitStringData>() |
200 , m_vector(other.m_vector) | 200 , m_vector(other.m_vector) |
201 { | 201 { |
202 // Note that we don't copy m_keyString to indicate to the destructor that th
ere's nothing | 202 // Note that we don't copy m_keyString to indicate to the destructor that th
ere's nothing |
203 // to be removed from the sharedDataMap(). | 203 // to be removed from the sharedDataMap(). |
204 } | 204 } |
205 | 205 |
206 } // namespace WebCore | 206 } // namespace WebCore |
OLD | NEW |