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

Side by Side Diff: third_party/WebKit/Source/core/css/StyleSheetContents.cpp

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: rebase, add TODOs Created 3 years, 10 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 return true; 305 return true;
306 } 306 }
307 307
308 void StyleSheetContents::parserAddNamespace(const AtomicString& prefix, 308 void StyleSheetContents::parserAddNamespace(const AtomicString& prefix,
309 const AtomicString& uri) { 309 const AtomicString& uri) {
310 ASSERT(!uri.isNull()); 310 ASSERT(!uri.isNull());
311 if (prefix.isNull()) { 311 if (prefix.isNull()) {
312 m_defaultNamespace = uri; 312 m_defaultNamespace = uri;
313 return; 313 return;
314 } 314 }
315 PrefixNamespaceURIMap::AddResult result = m_namespaces.add(prefix, uri); 315 PrefixNamespaceURIMap::AddResult result = m_namespaces.insert(prefix, uri);
316 if (result.isNewEntry) 316 if (result.isNewEntry)
317 return; 317 return;
318 result.storedValue->value = uri; 318 result.storedValue->value = uri;
319 } 319 }
320 320
321 const AtomicString& StyleSheetContents::namespaceURIFromPrefix( 321 const AtomicString& StyleSheetContents::namespaceURIFromPrefix(
322 const AtomicString& prefix) { 322 const AtomicString& prefix) {
323 return m_namespaces.get(prefix); 323 return m_namespaces.get(prefix);
324 } 324 }
325 325
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 visitor->trace(m_namespaceRules); 692 visitor->trace(m_namespaceRules);
693 visitor->trace(m_childRules); 693 visitor->trace(m_childRules);
694 visitor->trace(m_loadingClients); 694 visitor->trace(m_loadingClients);
695 visitor->trace(m_completedClients); 695 visitor->trace(m_completedClients);
696 visitor->trace(m_ruleSet); 696 visitor->trace(m_ruleSet);
697 visitor->trace(m_referencedFromResource); 697 visitor->trace(m_referencedFromResource);
698 visitor->trace(m_parserContext); 698 visitor->trace(m_parserContext);
699 } 699 }
700 700
701 } // namespace blink 701 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleSet.cpp ('k') | third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698