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

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

Issue 18228003: Remove AtomicStringImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 return 0; 170 return 0;
171 171
172 node = node->shadowHost(); 172 node = node->shadowHost();
173 } 173 }
174 174
175 return 0; 175 return 0;
176 } 176 }
177 177
178 void TreeScope::addImageMap(HTMLMapElement* imageMap) 178 void TreeScope::addImageMap(HTMLMapElement* imageMap)
179 { 179 {
180 AtomicStringImpl* name = imageMap->getName().impl(); 180 StringImpl* name = imageMap->getName().impl();
181 if (!name) 181 if (!name)
182 return; 182 return;
183 if (!m_imageMapsByName) 183 if (!m_imageMapsByName)
184 m_imageMapsByName = adoptPtr(new DocumentOrderedMap); 184 m_imageMapsByName = adoptPtr(new DocumentOrderedMap);
185 m_imageMapsByName->add(name, imageMap); 185 m_imageMapsByName->add(name, imageMap);
186 } 186 }
187 187
188 void TreeScope::removeImageMap(HTMLMapElement* imageMap) 188 void TreeScope::removeImageMap(HTMLMapElement* imageMap)
189 { 189 {
190 if (!m_imageMapsByName) 190 if (!m_imageMapsByName)
191 return; 191 return;
192 AtomicStringImpl* name = imageMap->getName().impl(); 192 StringImpl* name = imageMap->getName().impl();
193 if (!name) 193 if (!name)
194 return; 194 return;
195 m_imageMapsByName->remove(name, imageMap); 195 m_imageMapsByName->remove(name, imageMap);
196 } 196 }
197 197
198 HTMLMapElement* TreeScope::getImageMap(const String& url) const 198 HTMLMapElement* TreeScope::getImageMap(const String& url) const
199 { 199 {
200 if (url.isNull()) 200 if (url.isNull())
201 return 0; 201 return 0;
202 if (!m_imageMapsByName) 202 if (!m_imageMapsByName)
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 { 486 {
487 ASSERT(scope); 487 ASSERT(scope);
488 for (; scope; scope = scope->parentTreeScope()) { 488 for (; scope; scope = scope->parentTreeScope()) {
489 if (scope == this) 489 if (scope == this)
490 return true; 490 return true;
491 } 491 }
492 return false; 492 return false;
493 } 493 }
494 494
495 } // namespace WebCore 495 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698