OLD | NEW |
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/layout/ng/ng_layout_opportunity_iterator.h" | 5 #include "core/layout/ng/ng_layout_opportunity_iterator.h" |
6 #include "core/layout/ng/ng_constraint_space.h" | 6 #include "core/layout/ng/ng_constraint_space.h" |
7 #include "core/layout/ng/ng_exclusion.h" | 7 #include "core/layout/ng/ng_exclusion.h" |
8 #include "wtf/NonCopyingSort.h" | 8 #include "platform/wtf/NonCopyingSort.h" |
9 #include "wtf/text/StringBuilder.h" | 9 #include "platform/wtf/text/StringBuilder.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 namespace { | 12 namespace { |
13 | 13 |
14 void AppendNodeToString(const NGLayoutOpportunityTreeNode* node, | 14 void AppendNodeToString(const NGLayoutOpportunityTreeNode* node, |
15 StringBuilder* string_builder, | 15 StringBuilder* string_builder, |
16 unsigned indent = 0) { | 16 unsigned indent = 0) { |
17 DCHECK(string_builder); | 17 DCHECK(string_builder); |
18 if (!node) { | 18 if (!node) { |
19 string_builder->Append("'null'\n"); | 19 string_builder->Append("'null'\n"); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 #ifndef NDEBUG | 319 #ifndef NDEBUG |
320 void NGLayoutOpportunityIterator::ShowLayoutOpportunityTree() const { | 320 void NGLayoutOpportunityIterator::ShowLayoutOpportunityTree() const { |
321 StringBuilder string_builder; | 321 StringBuilder string_builder; |
322 string_builder.Append("\n.:: LayoutOpportunity Tree ::.\n\nRoot Node: "); | 322 string_builder.Append("\n.:: LayoutOpportunity Tree ::.\n\nRoot Node: "); |
323 AppendNodeToString(opportunity_tree_root_.get(), &string_builder); | 323 AppendNodeToString(opportunity_tree_root_.get(), &string_builder); |
324 fprintf(stderr, "%s\n", string_builder.ToString().Utf8().Data()); | 324 fprintf(stderr, "%s\n", string_builder.ToString().Utf8().Data()); |
325 } | 325 } |
326 #endif | 326 #endif |
327 | 327 |
328 } // namespace blink | 328 } // namespace blink |
OLD | NEW |