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 NGConstraintSpaceBuilder_h | |
| 6 #define NGConstraintSpaceBuilder_h | |
| 7 | |
| 8 #include "core/layout/ng/ng_fragment.h" | |
| 9 #include "core/layout/ng/ng_units.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class CORE_EXPORT NGConstraintSpaceBuilder final | |
|
eae
2016/10/25 17:26:27
Should this be PhysicalConstraintSpaceBuilder? Als
ikilpatrick
2016/10/25 23:20:42
Can rename to that; was following ng_fragment_buil
ikilpatrick
2016/10/25 23:20:42
Right, yeah there are more cases than I originally
| |
| 14 : public GarbageCollectedFinalized<NGConstraintSpaceBuilder> { | |
|
Gleb Lanbin
2016/10/25 17:37:27
.nit you don't have anything that needs to be fina
ikilpatrick
2016/10/25 23:20:42
Done.
| |
| 15 public: | |
| 16 NGConstraintSpaceBuilder(NGWritingMode writing_mode); | |
| 17 | |
| 18 NGConstraintSpaceBuilder& SetContainerSize(NGLogicalSize container_size); | |
| 19 NGConstraintSpaceBuilder& SetFixedSize(bool fixed_inline, bool fixed_block); | |
| 20 NGConstraintSpaceBuilder& SetOverflowTriggersScrollbar( | |
| 21 bool inline_direction_triggers_scrollbar, | |
| 22 bool block_direction_triggers_scrollbar); | |
| 23 NGConstraintSpaceBuilder& SetFragmentationType(NGFragmentationType); | |
|
Gleb Lanbin
2016/10/25 17:37:27
Can we use SetFragmentType here and have a TODO to
ikilpatrick
2016/10/25 23:20:42
FragmentationType and FragmentType are different,
| |
| 24 NGConstraintSpaceBuilder& SetIsNewFormattingContext(bool is_new_fc); | |
| 25 | |
| 26 // Creates a new constraint space. Can be called multiple times. | |
|
Gleb Lanbin
2016/10/25 17:37:27
can you provide a bit more details here about why
ikilpatrick
2016/10/25 23:20:42
Done.
| |
| 27 NGPhysicalConstraintSpace* ToConstraintSpace(); | |
| 28 | |
| 29 DEFINE_INLINE_TRACE() {} | |
| 30 | |
| 31 private: | |
| 32 NGLogicalSize container_size_; | |
| 33 | |
| 34 unsigned writing_mode_ : 2; | |
|
Gleb Lanbin
2016/10/25 17:37:27
should we separate mutable fields from const field
ikilpatrick
2016/10/25 23:20:42
Done.
| |
| 35 unsigned fixed_inline_ : 1; | |
| 36 unsigned fixed_block_ : 1; | |
| 37 unsigned inline_direction_triggers_scrollbar_ : 1; | |
| 38 unsigned block_direction_triggers_scrollbar_ : 1; | |
| 39 unsigned fragmentation_type_ : 2; | |
|
Gleb Lanbin
2016/10/25 17:37:27
.nit fragment_type_ ?
ikilpatrick
2016/10/25 23:20:42
See above.
| |
| 40 unsigned is_new_fc_ : 1; | |
| 41 }; | |
| 42 | |
| 43 } // namespace blink | |
| 44 | |
| 45 #endif // NGConstraintSpaceBuilder | |
| OLD | NEW |