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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.h

Issue 2731893003: Add ShowLayoutOpportunityTree to NGLayoutOpportunityIterator (Closed)
Patch Set: git rebase v2 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 #ifndef NGLayoutOpportunityTreeNode_h 5 #ifndef NGLayoutOpportunityTreeNode_h
6 #define NGLayoutOpportunityTreeNode_h 6 #define NGLayoutOpportunityTreeNode_h
7 7
8 #include "core/layout/ng/geometry/ng_edge.h" 8 #include "core/layout/ng/geometry/ng_edge.h"
9 #include "core/layout/ng/geometry/ng_logical_rect.h" 9 #include "core/layout/ng/geometry/ng_logical_rect.h"
10 #include "core/layout/ng/ng_exclusion.h" 10 #include "core/layout/ng/ng_exclusion.h"
(...skipping 30 matching lines...) Expand all
41 // Edge that limits this layout opportunity from above. 41 // Edge that limits this layout opportunity from above.
42 NGEdge exclusion_edge; 42 NGEdge exclusion_edge;
43 43
44 // Exclusion that splits apart this layout opportunity. 44 // Exclusion that splits apart this layout opportunity.
45 const NGExclusion* exclusion; // Not owned. 45 const NGExclusion* exclusion; // Not owned.
46 46
47 // Whether this node is a leaf node. 47 // Whether this node is a leaf node.
48 // The node is a leaf if it doesn't have an exclusion that splits it apart. 48 // The node is a leaf if it doesn't have an exclusion that splits it apart.
49 bool IsLeafNode() const { return !exclusion; } 49 bool IsLeafNode() const { return !exclusion; }
50 50
51 String ToString() const;
52
51 DECLARE_TRACE(); 53 DECLARE_TRACE();
52 }; 54 };
53 55
56 inline std::ostream& operator<<(std::ostream& stream,
57 const NGLayoutOpportunityTreeNode& value) {
58 return stream << value.ToString();
59 }
60
61 inline std::ostream& operator<<(std::ostream& out,
62 const NGLayoutOpportunityTreeNode* value) {
63 return out << (value ? value->ToString() : "(null)");
64 }
65
54 } // namespace blink 66 } // namespace blink
55 #endif // NGLayoutOpportunityTreeNode_h 67 #endif // NGLayoutOpportunityTreeNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698