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

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

Issue 2719373002: [LayoutNG] Move NGConstraintSpaceBuilder off Oilpan and DISALLOW_NEW. (Closed)
Patch Set: rebase Created 3 years, 9 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_units.h" 9 #include "core/layout/ng/ng_units.h"
10 #include "wtf/Allocator.h"
10 #include "wtf/Optional.h" 11 #include "wtf/Optional.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class CORE_EXPORT NGConstraintSpaceBuilder final 15 class CORE_EXPORT NGConstraintSpaceBuilder final {
15 : public GarbageCollectedFinalized<NGConstraintSpaceBuilder> { 16 DISALLOW_NEW();
17
16 public: 18 public:
17 NGConstraintSpaceBuilder(const NGConstraintSpace* parent_space); 19 NGConstraintSpaceBuilder(const NGConstraintSpace* parent_space);
18 20
19 NGConstraintSpaceBuilder(NGWritingMode writing_mode); 21 NGConstraintSpaceBuilder(NGWritingMode writing_mode);
20 22
21 NGConstraintSpaceBuilder& SetAvailableSize(NGLogicalSize available_size); 23 NGConstraintSpaceBuilder& SetAvailableSize(NGLogicalSize available_size);
22 24
23 NGConstraintSpaceBuilder& SetPercentageResolutionSize( 25 NGConstraintSpaceBuilder& SetPercentageResolutionSize(
24 NGLogicalSize percentage_resolution_size); 26 NGLogicalSize percentage_resolution_size);
25 27
(...skipping 30 matching lines...) Expand all
56 // Creates a new constraint space. This may be called multiple times, for 58 // Creates a new constraint space. This may be called multiple times, for
57 // example the constraint space will be different for a child which: 59 // example the constraint space will be different for a child which:
58 // - Establishes a new formatting context. 60 // - Establishes a new formatting context.
59 // - Is within a fragmentation container and needs its fragmentation offset 61 // - Is within a fragmentation container and needs its fragmentation offset
60 // updated. 62 // updated.
61 // - Has its size is determined by its parent layout (flex, abs-pos). 63 // - Has its size is determined by its parent layout (flex, abs-pos).
62 // 64 //
63 // NGWritingMode specifies the writing mode of the generated space. 65 // NGWritingMode specifies the writing mode of the generated space.
64 NGConstraintSpace* ToConstraintSpace(NGWritingMode); 66 NGConstraintSpace* ToConstraintSpace(NGWritingMode);
65 67
66 DEFINE_INLINE_TRACE() {}
67
68 private: 68 private:
69 // Relative to parent_writing_mode_. 69 // Relative to parent_writing_mode_.
70 NGLogicalSize available_size_; 70 NGLogicalSize available_size_;
71 // Relative to parent_writing_mode_. 71 // Relative to parent_writing_mode_.
72 NGLogicalSize percentage_resolution_size_; 72 NGLogicalSize percentage_resolution_size_;
73 NGPhysicalSize initial_containing_block_size_; 73 NGPhysicalSize initial_containing_block_size_;
74 LayoutUnit fragmentainer_space_available_; 74 LayoutUnit fragmentainer_space_available_;
75 75
76 unsigned parent_writing_mode_ : 2; 76 unsigned parent_writing_mode_ : 2;
77 unsigned is_fixed_size_inline_ : 1; 77 unsigned is_fixed_size_inline_ : 1;
78 unsigned is_fixed_size_block_ : 1; 78 unsigned is_fixed_size_block_ : 1;
79 unsigned is_shrink_to_fit_ : 1; 79 unsigned is_shrink_to_fit_ : 1;
80 unsigned is_inline_direction_triggers_scrollbar_ : 1; 80 unsigned is_inline_direction_triggers_scrollbar_ : 1;
81 unsigned is_block_direction_triggers_scrollbar_ : 1; 81 unsigned is_block_direction_triggers_scrollbar_ : 1;
82 unsigned fragmentation_type_ : 2; 82 unsigned fragmentation_type_ : 2;
83 unsigned is_new_fc_ : 1; 83 unsigned is_new_fc_ : 1;
84 unsigned is_anonymous_ : 1; 84 unsigned is_anonymous_ : 1;
85 unsigned text_direction_ : 1; 85 unsigned text_direction_ : 1;
86 86
87 NGMarginStrut margin_strut_; 87 NGMarginStrut margin_strut_;
88 NGLogicalOffset bfc_offset_; 88 NGLogicalOffset bfc_offset_;
89 std::shared_ptr<NGExclusions> exclusions_; 89 std::shared_ptr<NGExclusions> exclusions_;
90 WTF::Optional<LayoutUnit> clearance_offset_; 90 WTF::Optional<LayoutUnit> clearance_offset_;
91 }; 91 };
92 92
93 } // namespace blink 93 } // namespace blink
94 94
95 #endif // NGConstraintSpaceBuilder 95 #endif // NGConstraintSpaceBuilder
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698