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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLDocument.cpp

Issue 2799573003: Migrate WTF::HashCountedSet::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 8 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights
5 * reserved. 5 * reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 f->script() 157 f->script()
158 .windowProxy(DOMWrapperWorld::mainWorld()) 158 .windowProxy(DOMWrapperWorld::mainWorld())
159 ->namedItemAdded(this, name); 159 ->namedItemAdded(this, name);
160 } 160 }
161 } 161 }
162 162
163 void HTMLDocument::removeItemFromMap(HashCountedSet<AtomicString>& map, 163 void HTMLDocument::removeItemFromMap(HashCountedSet<AtomicString>& map,
164 const AtomicString& name) { 164 const AtomicString& name) {
165 if (name.isEmpty()) 165 if (name.isEmpty())
166 return; 166 return;
167 map.remove(name); 167 map.erase(name);
168 if (LocalFrame* f = frame()) { 168 if (LocalFrame* f = frame()) {
169 f->script() 169 f->script()
170 .windowProxy(DOMWrapperWorld::mainWorld()) 170 .windowProxy(DOMWrapperWorld::mainWorld())
171 ->namedItemRemoved(this, name); 171 ->namedItemRemoved(this, name);
172 } 172 }
173 } 173 }
174 174
175 void HTMLDocument::addNamedItem(const AtomicString& name) { 175 void HTMLDocument::addNamedItem(const AtomicString& name) {
176 addItemToMap(m_namedItemCounts, name); 176 addItemToMap(m_namedItemCounts, name);
177 } 177 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 static HashSet<StringImpl*>* htmlCaseInsensitiveAttributesSet = 220 static HashSet<StringImpl*>* htmlCaseInsensitiveAttributesSet =
221 createHtmlCaseInsensitiveAttributesSet(); 221 createHtmlCaseInsensitiveAttributesSet();
222 bool isPossibleHTMLAttr = 222 bool isPossibleHTMLAttr =
223 !attributeName.hasPrefix() && (attributeName.namespaceURI() == nullAtom); 223 !attributeName.hasPrefix() && (attributeName.namespaceURI() == nullAtom);
224 return !isPossibleHTMLAttr || 224 return !isPossibleHTMLAttr ||
225 !htmlCaseInsensitiveAttributesSet->contains( 225 !htmlCaseInsensitiveAttributesSet->contains(
226 attributeName.localName().impl()); 226 attributeName.localName().impl());
227 } 227 }
228 228
229 } // namespace blink 229 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp ('k') | third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698