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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp

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 #include "core/paint/PaintPropertyTreePrinter.h" 5 #include "core/paint/PaintPropertyTreePrinter.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/layout/LayoutPart.h" 9 #include "core/layout/LayoutPart.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 collectPropertyNodes(*child); 82 collectPropertyNodes(*child);
83 } 83 }
84 84
85 void addAllPropertyNodes(StringBuilder& stringBuilder, 85 void addAllPropertyNodes(StringBuilder& stringBuilder,
86 const PropertyTreeNode* node, 86 const PropertyTreeNode* node,
87 unsigned indent = 0) { 87 unsigned indent = 0) {
88 DCHECK(node); 88 DCHECK(node);
89 for (unsigned i = 0; i < indent; i++) 89 for (unsigned i = 0; i < indent; i++)
90 stringBuilder.append(' '); 90 stringBuilder.append(' ');
91 if (m_nodeToDebugString.contains(node)) 91 if (m_nodeToDebugString.contains(node))
92 stringBuilder.append(m_nodeToDebugString.get(node)); 92 stringBuilder.append(m_nodeToDebugString.at(node));
93 stringBuilder.append(String::format(" %p ", node)); 93 stringBuilder.append(String::format(" %p ", node));
94 stringBuilder.append(node->toString()); 94 stringBuilder.append(node->toString());
95 stringBuilder.append("\n"); 95 stringBuilder.append("\n");
96 96
97 for (const auto* childNode : m_nodeToDebugString.keys()) { 97 for (const auto* childNode : m_nodeToDebugString.keys()) {
98 if (childNode->parent() == node) 98 if (childNode->parent() == node)
99 addAllPropertyNodes(stringBuilder, childNode, indent + 2); 99 addAllPropertyNodes(stringBuilder, childNode, indent + 2);
100 } 100 }
101 } 101 }
102 102
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 } 579 }
580 580
581 String paintPropertyTreeGraph(const blink::FrameView& frameView) { 581 String paintPropertyTreeGraph(const blink::FrameView& frameView) {
582 blink::PaintPropertyTreeGraphBuilder builder; 582 blink::PaintPropertyTreeGraphBuilder builder;
583 StringBuilder stringBuilder; 583 StringBuilder stringBuilder;
584 builder.generateTreeGraph(frameView, stringBuilder); 584 builder.generateTreeGraph(frameView, stringBuilder);
585 return stringBuilder.toString(); 585 return stringBuilder.toString();
586 } 586 }
587 587
588 #endif // DCHECK_IS_ON() 588 #endif // DCHECK_IS_ON()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698