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 | |
| 14 : public GarbageCollected<NGConstraintSpaceBuilder> { | |
| 15 public: | |
| 16 NGConstraintSpaceBuilder(NGWritingMode writing_mode); | |
| 17 | |
| 18 NGConstraintSpaceBuilder& SetContainerSize(NGLogicalSize container_size); | |
| 19 NGConstraintSpaceBuilder& SetFixedSize(bool fixed_inline, bool fixed_block); | |
|
Gleb Lanbin
2016/10/26 18:22:14
you don't need to do this in this patch but lets s
ikilpatrick
2016/10/26 18:56:35
^ sgtm.
| |
| 20 NGConstraintSpaceBuilder& SetOverflowTriggersScrollbar( | |
| 21 bool inline_direction_triggers_scrollbar, | |
| 22 bool block_direction_triggers_scrollbar); | |
| 23 NGConstraintSpaceBuilder& SetFragmentationType(NGFragmentationType); | |
| 24 NGConstraintSpaceBuilder& SetIsNewFormattingContext(bool is_new_fc); | |
| 25 | |
| 26 // Creates a new constraint space. This may be called multiple times, for | |
| 27 // example the constraint space will be different for a child which: | |
| 28 // - Establishes a new formatting context. | |
| 29 // - Is within a fragmentation container and needs its fragmentation offset | |
| 30 // updated. | |
| 31 // - Has its size is determined by its parent layout (flex, abs-pos). | |
| 32 NGPhysicalConstraintSpace* ToConstraintSpace(); | |
| 33 | |
| 34 DEFINE_INLINE_TRACE() {} | |
| 35 | |
| 36 private: | |
| 37 NGLogicalSize container_size_; | |
| 38 | |
| 39 // const bit fields. | |
| 40 const unsigned writing_mode_ : 2; | |
| 41 | |
| 42 // mutable bit fields. | |
| 43 unsigned fixed_inline_ : 1; | |
| 44 unsigned fixed_block_ : 1; | |
| 45 unsigned inline_direction_triggers_scrollbar_ : 1; | |
| 46 unsigned block_direction_triggers_scrollbar_ : 1; | |
| 47 unsigned fragmentation_type_ : 2; | |
| 48 unsigned is_new_fc_ : 1; | |
| 49 }; | |
| 50 | |
| 51 } // namespace blink | |
| 52 | |
| 53 #endif // NGConstraintSpaceBuilder | |
| OLD | NEW |