Index: third_party/WebKit/Source/core/layout/ng/ng_floating_object.h |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_floating_object.h b/third_party/WebKit/Source/core/layout/ng/ng_floating_object.h |
index bfe7c0d32c8334da3991b55c59808b9469691065..26a21fac9d3954d9b53d9049712b5f8dccbf70d8 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_floating_object.h |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_floating_object.h |
@@ -19,35 +19,34 @@ class NGPhysicalFragment; |
// Struct that keeps all information needed to position floats in LayoutNG. |
struct CORE_EXPORT NGFloatingObject |
: public GarbageCollectedFinalized<NGFloatingObject> { |
- NGFloatingObject(NGPhysicalFragment* fragment, |
- NGConstraintSpace* space, |
+ NGFloatingObject(const NGConstraintSpace* space, |
const NGConstraintSpace* parent_space, |
- NGBlockNode* node, |
const ComputedStyle& style, |
- const NGBoxStrut& margins) |
- : fragment(fragment), |
- space(space), |
+ const NGBoxStrut& margins, |
+ NGPhysicalFragment* fragment) |
+ : space(space), |
original_parent_space(parent_space), |
- node(node), |
- margins(margins) { |
+ margins(margins), |
+ fragment(fragment) { |
exclusion_type = NGExclusion::kFloatLeft; |
if (style.floating() == EFloat::kRight) |
exclusion_type = NGExclusion::kFloatRight; |
clear_type = style.clear(); |
} |
- RefPtr<NGPhysicalFragment> fragment; |
- // TODO(glebl): Constraint space should be const here. |
- RefPtr<NGConstraintSpace> space; |
+ // Original constraint space of the float. |
+ RefPtr<const NGConstraintSpace> space; |
// Parent space is used so we can calculate the inline offset relative to |
// the original parent of this float. |
RefPtr<const NGConstraintSpace> original_parent_space; |
- Member<NGBlockNode> node; |
+ |
NGExclusion::Type exclusion_type; |
EClear clear_type; |
NGBoxStrut margins; |
+ RefPtr<NGPhysicalFragment> fragment; |
+ |
// In the case where a legacy FloatingObject is attached to not its own |
// parent, e.g. a float surrounded by a bunch of nested empty divs, |
// NG float fragment's LeftOffset() cannot be used as legacy FloatingObject's |
@@ -58,7 +57,6 @@ struct CORE_EXPORT NGFloatingObject |
LayoutUnit left_offset; |
DEFINE_INLINE_TRACE() { |
- visitor->trace(node); |
} |
}; |