OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NGFloatsUtils_h | 5 #ifndef NGFloatsUtils_h |
6 #define NGFloatsUtils_h | 6 #define NGFloatsUtils_h |
7 | 7 |
8 #include "core/layout/ng/geometry/ng_logical_offset.h" | 8 #include "core/layout/ng/geometry/ng_logical_offset.h" |
9 #include "core/layout/ng/ng_constraint_space.h" | 9 #include "core/layout/ng/ng_constraint_space.h" |
10 #include "core/layout/ng/ng_floating_object.h" | 10 #include "core/layout/ng/ng_floating_object.h" |
11 #include "core/layout/ng/ng_fragment_builder.h" | 11 #include "core/layout/ng/ng_fragment_builder.h" |
12 #include "core/layout/ng/ng_positioned_float.h" | |
12 | 13 |
13 namespace blink { | 14 namespace blink { |
14 | 15 |
15 // Positions {@code floating_object} into {@code new_parent_space}. | 16 // Positions {@code floating_object} into {@code new_parent_space}. |
16 // @returns Logical offset of the positioned float. | 17 // @returns A positioned float. |
17 CORE_EXPORT NGLogicalOffset PositionFloat(NGFloatingObject*, | 18 CORE_EXPORT NGPositionedFloat |
18 NGConstraintSpace* new_parent_space); | 19 PositionFloat(NGFloatingObject*, NGConstraintSpace* new_parent_space); |
19 | 20 |
20 // Positions the list of floats by updating their {@code logical_offset}. | 21 // Positions the a list of floats. Adds them as exclusions to {@code space} and |
21 void PositionFloats(LayoutUnit origin_block_offset, | 22 // if given appends them to {@code positioned_floats}. |
22 LayoutUnit from_block_offset, | 23 CORE_EXPORT void PositionFloats(LayoutUnit origin_block_offset, |
23 const Vector<RefPtr<NGFloatingObject>>&, | 24 LayoutUnit from_block_offset, |
24 NGConstraintSpace*); | 25 const Vector<RefPtr<NGFloatingObject>>&, |
26 Vector<NGPositionedFloat>* positioned_floats, | |
Gleb Lanbin
2017/05/08 19:03:38
please change the API to return the positioned_flo
ikilpatrick
2017/05/08 19:18:19
Done.
| |
27 NGConstraintSpace* space); | |
25 } // namespace blink | 28 } // namespace blink |
26 | 29 |
27 #endif // NGFloatsUtils_h | 30 #endif // NGFloatsUtils_h |
OLD | NEW |