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

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

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.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.h b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.h
index e3947244818cd5d27deb316034b61d55fa5e3552..a939933081f7e1cb93f786100d134de5b6136321 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.h
@@ -5,30 +5,29 @@
#ifndef NGLayoutOpportunityTreeNode_h
#define NGLayoutOpportunityTreeNode_h
-#include "platform/heap/Handle.h"
#include "core/layout/ng/ng_units.h"
+#include "platform/heap/Handle.h"
namespace blink {
+class NGConstraintSpace;
+struct NGExclusion;
+
// 3 node R-Tree that represents available space(left, bottom, right) or
// layout opportunity after the parent spatial rectangle is split by the
// exclusion rectangle.
-struct NGLayoutOpportunityTreeNode
+struct CORE_EXPORT NGLayoutOpportunityTreeNode
: public GarbageCollected<NGLayoutOpportunityTreeNode> {
// Default constructor.
// Creates a Layout Opportunity tree node that is limited by it's own edge
// from above.
// @param space Constraint space associated with this node.
- NGLayoutOpportunityTreeNode(const NGConstraintSpace* space) : space(space) {
- exclusion_edge.start = space->Offset().inline_offset;
- exclusion_edge.end = exclusion_edge.start + space->Size().inline_size;
- }
+ NGLayoutOpportunityTreeNode(const NGConstraintSpace* space);
// Constructor that creates a node with explicitly set exclusion edge.
// @param space Constraint space associated with this node.
// @param exclusion_edge Edge that limits this node's space from above.
- NGLayoutOpportunityTreeNode(NGConstraintSpace* space, NGEdge exclusion_edge)
- : space(space), exclusion_edge(exclusion_edge) {}
+ NGLayoutOpportunityTreeNode(NGConstraintSpace* space, NGEdge exclusion_edge);
// Constraint space that is associated with this node.
Member<const NGConstraintSpace> space;
@@ -48,13 +47,7 @@ struct NGLayoutOpportunityTreeNode
// The node is a leaf if it doen't have an exclusion that splits it apart.
bool IsLeafNode() const { return !exclusion; }
- DEFINE_INLINE_TRACE() {
- visitor->trace(space);
- visitor->trace(left);
- visitor->trace(bottom);
- visitor->trace(right);
- visitor->trace(exclusion);
- }
+ DECLARE_TRACE();
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698