Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: Source/core/dom/SpaceSplitString.cpp

Issue 112843002: Make calls to AtomicString(const String&) explicit in dom/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698