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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.cc

Issue 2733133002: Combine 2 exclusions in Layout Opportunity Tree if they shadow each other (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.cc b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.cc
index aa211bf5adf7bf24571ceeb3d842638201717e4c..b737001fb829c76a3479175dce47bdf1b6f29c5c 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.cc
@@ -8,7 +8,7 @@ namespace blink {
NGLayoutOpportunityTreeNode::NGLayoutOpportunityTreeNode(
const NGLogicalRect opportunity)
- : opportunity(opportunity), exclusion(nullptr) {
+ : opportunity(opportunity), combined_exclusion(nullptr) {
exclusion_edge.start = opportunity.offset.inline_offset;
exclusion_edge.end = exclusion_edge.start + opportunity.size.inline_size;
}
@@ -18,7 +18,15 @@ NGLayoutOpportunityTreeNode::NGLayoutOpportunityTreeNode(
NGEdge exclusion_edge)
: opportunity(opportunity),
exclusion_edge(exclusion_edge),
- exclusion(nullptr) {}
+ combined_exclusion(nullptr) {}
+
+String NGLayoutOpportunityTreeNode::ToString() const {
+ return String::format("Opportunity: '%s' Exclusion: '%s'",
+ opportunity.ToString().ascii().data(),
+ combined_exclusion
+ ? combined_exclusion->ToString().ascii().data()
+ : "null");
+}
DEFINE_TRACE(NGLayoutOpportunityTreeNode) {
visitor->trace(left);

Powered by Google App Engine
This is Rietveld 408576698