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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_floats_utils.h

Issue 2872593003: [LayoutNG] Introduce NGPositionedFloat. (Closed)
Patch Set: address comments. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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 list of {@code floating_objects}. Adds them as exclusions to
21 void PositionFloats(LayoutUnit origin_block_offset, 22 // {@code space}.
22 LayoutUnit from_block_offset, 23 CORE_EXPORT const Vector<NGPositionedFloat> PositionFloats(
23 const Vector<RefPtr<NGFloatingObject>>&, 24 LayoutUnit origin_block_offset,
24 NGConstraintSpace*); 25 LayoutUnit from_block_offset,
26 const Vector<RefPtr<NGFloatingObject>>& floating_objects,
27 NGConstraintSpace* space);
28
25 } // namespace blink 29 } // namespace blink
26 30
27 #endif // NGFloatsUtils_h 31 #endif // NGFloatsUtils_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698