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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase 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 // 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 #ifndef PropertyTreeState_h 5 #ifndef PropertyTreeState_h
6 #define PropertyTreeState_h 6 #define PropertyTreeState_h
7 7
8 #include "platform/graphics/paint/ClipPaintPropertyNode.h" 8 #include "platform/graphics/paint/ClipPaintPropertyNode.h"
9 #include "platform/graphics/paint/EffectPaintPropertyNode.h" 9 #include "platform/graphics/paint/EffectPaintPropertyNode.h"
10 #include "platform/graphics/paint/TransformPaintPropertyNode.h" 10 #include "platform/graphics/paint/TransformPaintPropertyNode.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 m_nodeToDebugString.set(node, debugInfo); 157 m_nodeToDebugString.set(node, debugInfo);
158 } 158 }
159 159
160 void addAllPropertyNodes(StringBuilder& stringBuilder, 160 void addAllPropertyNodes(StringBuilder& stringBuilder,
161 const PropertyTreeNode* node, 161 const PropertyTreeNode* node,
162 unsigned indent = 0) { 162 unsigned indent = 0) {
163 DCHECK(node); 163 DCHECK(node);
164 for (unsigned i = 0; i < indent; i++) 164 for (unsigned i = 0; i < indent; i++)
165 stringBuilder.append(' '); 165 stringBuilder.append(' ');
166 if (m_nodeToDebugString.contains(node)) 166 if (m_nodeToDebugString.contains(node))
167 stringBuilder.append(m_nodeToDebugString.get(node)); 167 stringBuilder.append(m_nodeToDebugString.at(node));
168 stringBuilder.append(String::format(" %p ", node)); 168 stringBuilder.append(String::format(" %p ", node));
169 stringBuilder.append(node->toString()); 169 stringBuilder.append(node->toString());
170 stringBuilder.append("\n"); 170 stringBuilder.append("\n");
171 171
172 for (const auto* childNode : m_nodeToDebugString.keys()) { 172 for (const auto* childNode : m_nodeToDebugString.keys()) {
173 if (childNode->parent() == node) 173 if (childNode->parent() == node)
174 addAllPropertyNodes(stringBuilder, childNode, indent + 2); 174 addAllPropertyNodes(stringBuilder, childNode, indent + 2);
175 } 175 }
176 } 176 }
177 177
178 HashMap<const PropertyTreeNode*, String> m_nodeToDebugString; 178 HashMap<const PropertyTreeNode*, String> m_nodeToDebugString;
179 }; 179 };
180 180
181 #endif 181 #endif
182 182
183 } // namespace blink 183 } // namespace blink
184 184
185 #endif // PropertyTreeState_h 185 #endif // PropertyTreeState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698