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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGElementProxy.cpp

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 years, 9 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/svg/SVGElementProxy.h" 5 #include "core/svg/SVGElementProxy.h"
6 6
7 #include "core/dom/IdTargetObserver.h" 7 #include "core/dom/IdTargetObserver.h"
8 #include "core/svg/SVGElement.h" 8 #include "core/svg/SVGElement.h"
9 #include "core/svg/SVGResourceClient.h" 9 #include "core/svg/SVGResourceClient.h"
10 #include "platform/loader/fetch/FetchInitiatorTypeNames.h" 10 #include "platform/loader/fetch/FetchInitiatorTypeNames.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 : nullptr; 162 : nullptr;
163 if (proxySet) { 163 if (proxySet) {
164 proxySet->add(*this); 164 proxySet->add(*this);
165 return toSVGElement(targetElement); 165 return toSVGElement(targetElement);
166 } 166 }
167 } 167 }
168 return nullptr; 168 return nullptr;
169 } 169 }
170 170
171 void SVGElementProxy::contentChanged(TreeScope& treeScope) { 171 void SVGElementProxy::contentChanged(TreeScope& treeScope) {
172 if (auto* observer = m_observers.get(&treeScope)) 172 if (auto* observer = m_observers.at(&treeScope))
173 observer->contentChanged(); 173 observer->contentChanged();
174 } 174 }
175 175
176 DEFINE_TRACE(SVGElementProxy) { 176 DEFINE_TRACE(SVGElementProxy) {
177 visitor->trace(m_clients); 177 visitor->trace(m_clients);
178 visitor->trace(m_observers); 178 visitor->trace(m_observers);
179 visitor->trace(m_document); 179 visitor->trace(m_document);
180 } 180 }
181 181
182 void SVGElementProxySet::add(SVGElementProxy& elementProxy) { 182 void SVGElementProxySet::add(SVGElementProxy& elementProxy) {
183 m_elementProxies.insert(&elementProxy); 183 m_elementProxies.insert(&elementProxy);
184 } 184 }
185 185
186 bool SVGElementProxySet::isEmpty() const { 186 bool SVGElementProxySet::isEmpty() const {
187 return m_elementProxies.isEmpty(); 187 return m_elementProxies.isEmpty();
188 } 188 }
189 189
190 void SVGElementProxySet::notifyContentChanged(TreeScope& treeScope) { 190 void SVGElementProxySet::notifyContentChanged(TreeScope& treeScope) {
191 for (SVGElementProxy* proxy : m_elementProxies) 191 for (SVGElementProxy* proxy : m_elementProxies)
192 proxy->contentChanged(treeScope); 192 proxy->contentChanged(treeScope);
193 } 193 }
194 194
195 DEFINE_TRACE(SVGElementProxySet) { 195 DEFINE_TRACE(SVGElementProxySet) {
196 visitor->trace(m_elementProxies); 196 visitor->trace(m_elementProxies);
197 } 197 }
198 198
199 } // namespace blink 199 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698