Chromium Code Reviews| 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 | |
|
ikilpatrick
2017/01/20 00:03:17
NGFloatingNode a better name?
(assuming a future
Gleb Lanbin
2017/01/20 00:45:27
I wanted to keep this name to be consistent with l
| |
| 21 : public GarbageCollected<NGFloatingObject> { | |
| 22 NGFloatingObject(NGPhysicalFragment* fragment, | |
| 23 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; | |
|
ikilpatrick
2017/01/20 00:03:17
Maybe add a note we have to layout after we know t
Gleb Lanbin
2017/01/20 00:45:27
Acknowledged.
| |
| 34 Member<NGConstraintSpace> space; | |
|
ikilpatrick
2017/01/20 00:03:17
const NGConstraintSpace
Gleb Lanbin
2017/01/20 00:45:27
Done.
| |
| 35 Member<NGBlockNode> node; | |
|
ikilpatrick
2017/01/20 00:03:17
TODO(ikilpatrick): remove this.
Gleb Lanbin
2017/01/20 00:45:27
Done.
| |
| 36 NGExclusion::Type exclusion_type; | |
| 37 EClear clear_type; | |
| 38 | |
| 39 DEFINE_INLINE_TRACE() { | |
| 40 visitor->trace(fragment); | |
| 41 visitor->trace(space); | |
| 42 visitor->trace(node); | |
| 43 } | |
| 44 }; | |
| 45 | |
| 46 } // namespace blink | |
| 47 | |
| 48 #endif // NGFloatingObject_h | |
| OLD | NEW |