OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NGFloatingObject_h | |
6 #define NGFloatingObject_h | |
7 | |
8 #include "core/layout/ng/ng_block_node.h" | |
9 #include "core/layout/ng/ng_constraint_space.h" | |
10 #include "core/layout/ng/ng_units.h" | |
11 #include "core/style/ComputedStyle.h" | |
12 #include "core/style/ComputedStyleConstants.h" | |
13 #include "platform/heap/Handle.h" | |
14 | |
15 namespace blink { | |
16 | |
17 class NGPhysicalFragment; | |
18 | |
19 // Struct that keeps all information needed to position floats in LayoutNG. | |
20 struct CORE_EXPORT NGFloatingObject | |
21 : public GarbageCollected<NGFloatingObject> { | |
22 NGFloatingObject(NGPhysicalFragment* fragment, | |
23 const NGConstraintSpace* space, | |
24 NGBlockNode* node, | |
25 const ComputedStyle& style) | |
26 : fragment(fragment), space(space), node(node) { | |
27 exclusion_type = NGExclusion::kFloatLeft; | |
28 if (style.floating() == EFloat::kRight) | |
29 exclusion_type = NGExclusion::kFloatRight; | |
30 clear_type = style.clear(); | |
31 } | |
32 | |
33 Member<NGPhysicalFragment> fragment; | |
34 Member<const NGConstraintSpace> space; | |
35 // TODO(ikilpatrick): remove this. | |
36 Member<NGBlockNode> node; | |
ikilpatrick
2017/01/20 18:11:14
I think this should be a WeakMember?
NGBlockNode
Gleb Lanbin
2017/01/20 21:21:59
according to Oilpan documentation it's better to u
| |
37 NGExclusion::Type exclusion_type; | |
38 EClear clear_type; | |
39 | |
40 DEFINE_INLINE_TRACE() { | |
41 visitor->trace(fragment); | |
42 visitor->trace(space); | |
43 visitor->trace(node); | |
44 } | |
45 }; | |
46 | |
47 } // namespace blink | |
48 | |
49 #endif // NGFloatingObject_h | |
OLD | NEW |