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

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

Issue 2435803005: Initial implementation of LayoutNG's block layout algorithm for floats. (Closed)
Patch Set: fix PositionFragment's doc, added TODO to fix floats with margins and add more test expectations. Created 4 years, 2 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
new file mode 100644
index 0000000000000000000000000000000000000000..b6e87f5611da6b3c75ecfea43dcb0e8745eb866f
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.cc
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/layout/ng/ng_layout_opportunity_tree_node.h"
+
+#include "platform/heap/Handle.h"
+#include "core/layout/ng/ng_constraint_space.h"
+
+namespace blink {
+
+NGLayoutOpportunityTreeNode::NGLayoutOpportunityTreeNode(
+ const NGConstraintSpace* space)
+ : space(space) {
+ exclusion_edge.start = space->Offset().inline_offset;
+ exclusion_edge.end = exclusion_edge.start + space->Size().inline_size;
+}
+
+NGLayoutOpportunityTreeNode::NGLayoutOpportunityTreeNode(
+ NGConstraintSpace* space,
+ NGEdge exclusion_edge)
+ : space(space), exclusion_edge(exclusion_edge) {}
+
+DEFINE_TRACE(NGLayoutOpportunityTreeNode) {
+ visitor->trace(space);
+ visitor->trace(left);
+ visitor->trace(bottom);
+ visitor->trace(right);
+ visitor->trace(exclusion);
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698