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

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

Issue 2966863002: [LayoutNG] Add floats_bfc_offset to constraint space. (Closed)
Patch Set: Created 3 years, 5 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 2016 The Chromium Authors. All rights reserved. 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 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 NGConstraintSpaceBuilder_h 5 #ifndef NGConstraintSpaceBuilder_h
6 #define NGConstraintSpaceBuilder_h 6 #define NGConstraintSpaceBuilder_h
7 7
8 #include "core/layout/ng/ng_constraint_space.h" 8 #include "core/layout/ng/ng_constraint_space.h"
9 #include "core/layout/ng/ng_unpositioned_float.h" 9 #include "core/layout/ng/ng_unpositioned_float.h"
10 #include "platform/wtf/Allocator.h" 10 #include "platform/wtf/Allocator.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 NGConstraintSpaceBuilder& SetFragmentationType(NGFragmentationType); 47 NGConstraintSpaceBuilder& SetFragmentationType(NGFragmentationType);
48 NGConstraintSpaceBuilder& SetIsNewFormattingContext(bool is_new_fc); 48 NGConstraintSpaceBuilder& SetIsNewFormattingContext(bool is_new_fc);
49 NGConstraintSpaceBuilder& SetIsAnonymous(bool is_anonymous); 49 NGConstraintSpaceBuilder& SetIsAnonymous(bool is_anonymous);
50 50
51 NGConstraintSpaceBuilder& SetUnpositionedFloats( 51 NGConstraintSpaceBuilder& SetUnpositionedFloats(
52 Vector<RefPtr<NGUnpositionedFloat>>& unpositioned_floats); 52 Vector<RefPtr<NGUnpositionedFloat>>& unpositioned_floats);
53 53
54 NGConstraintSpaceBuilder& SetMarginStrut(const NGMarginStrut& margin_strut); 54 NGConstraintSpaceBuilder& SetMarginStrut(const NGMarginStrut& margin_strut);
55 55
56 NGConstraintSpaceBuilder& SetBfcOffset(const NGLogicalOffset& offset); 56 NGConstraintSpaceBuilder& SetBfcOffset(const NGLogicalOffset& bfc_offset);
57 NGConstraintSpaceBuilder& SetFloatsBfcOffset(
58 const WTF::Optional<NGLogicalOffset>& floats_bfc_offset);
57 59
58 NGConstraintSpaceBuilder& SetClearanceOffset( 60 NGConstraintSpaceBuilder& SetClearanceOffset(
59 const WTF::Optional<LayoutUnit>& clearance_offset); 61 const WTF::Optional<LayoutUnit>& clearance_offset);
60 62
61 // Creates a new constraint space. This may be called multiple times, for 63 // Creates a new constraint space. This may be called multiple times, for
62 // example the constraint space will be different for a child which: 64 // example the constraint space will be different for a child which:
63 // - Establishes a new formatting context. 65 // - Establishes a new formatting context.
64 // - Is within a fragmentation container and needs its fragmentation offset 66 // - Is within a fragmentation container and needs its fragmentation offset
65 // updated. 67 // updated.
66 // - Has its size is determined by its parent layout (flex, abs-pos). 68 // - Has its size is determined by its parent layout (flex, abs-pos).
(...skipping 15 matching lines...) Expand all
82 unsigned is_shrink_to_fit_ : 1; 84 unsigned is_shrink_to_fit_ : 1;
83 unsigned is_inline_direction_triggers_scrollbar_ : 1; 85 unsigned is_inline_direction_triggers_scrollbar_ : 1;
84 unsigned is_block_direction_triggers_scrollbar_ : 1; 86 unsigned is_block_direction_triggers_scrollbar_ : 1;
85 unsigned fragmentation_type_ : 2; 87 unsigned fragmentation_type_ : 2;
86 unsigned is_new_fc_ : 1; 88 unsigned is_new_fc_ : 1;
87 unsigned is_anonymous_ : 1; 89 unsigned is_anonymous_ : 1;
88 unsigned text_direction_ : 1; 90 unsigned text_direction_ : 1;
89 91
90 NGMarginStrut margin_strut_; 92 NGMarginStrut margin_strut_;
91 NGLogicalOffset bfc_offset_; 93 NGLogicalOffset bfc_offset_;
94 WTF::Optional<NGLogicalOffset> floats_bfc_offset_;
92 std::shared_ptr<NGExclusions> exclusions_; 95 std::shared_ptr<NGExclusions> exclusions_;
93 WTF::Optional<LayoutUnit> clearance_offset_; 96 WTF::Optional<LayoutUnit> clearance_offset_;
94 Vector<RefPtr<NGUnpositionedFloat>> unpositioned_floats_; 97 Vector<RefPtr<NGUnpositionedFloat>> unpositioned_floats_;
95 }; 98 };
96 99
97 } // namespace blink 100 } // namespace blink
98 101
99 #endif // NGConstraintSpaceBuilder 102 #endif // NGConstraintSpaceBuilder
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698