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

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

Issue 2483683003: [LayoutNG] Split apart storage for AvailableSize and PercentageSize. (Closed)
Patch Set: rebase. Created 4 years, 1 month 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 NGPhysicalConstraintSpace_h 5 #ifndef NGPhysicalConstraintSpace_h
6 #define NGPhysicalConstraintSpace_h 6 #define NGPhysicalConstraintSpace_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_units.h" 9 #include "core/layout/ng/ng_units.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 16 matching lines...) Expand all
27 FragmentRegion 27 FragmentRegion
28 }; 28 };
29 29
30 // The NGPhysicalConstraintSpace contains the underlying data for the 30 // The NGPhysicalConstraintSpace contains the underlying data for the
31 // NGConstraintSpace. It is not meant to be used directly as all members are in 31 // NGConstraintSpace. It is not meant to be used directly as all members are in
32 // the physical coordinate space. Instead NGConstraintSpace should be used. 32 // the physical coordinate space. Instead NGConstraintSpace should be used.
33 class CORE_EXPORT NGPhysicalConstraintSpace final 33 class CORE_EXPORT NGPhysicalConstraintSpace final
34 : public GarbageCollectedFinalized<NGPhysicalConstraintSpace> { 34 : public GarbageCollectedFinalized<NGPhysicalConstraintSpace> {
35 public: 35 public:
36 NGPhysicalConstraintSpace( 36 NGPhysicalConstraintSpace(
37 NGPhysicalSize container_size, 37 NGPhysicalSize available_size,
38 NGPhysicalSize percentage_resolution_size,
38 bool fixed_width, 39 bool fixed_width,
39 bool fixed_height, 40 bool fixed_height,
40 bool width_direction_triggers_scrollbar, 41 bool width_direction_triggers_scrollbar,
41 bool height_direction_triggers_scrollbar, 42 bool height_direction_triggers_scrollbar,
42 NGFragmentationType width_direction_fragmentation_type, 43 NGFragmentationType width_direction_fragmentation_type,
43 NGFragmentationType height_direction_fragmentation_type, 44 NGFragmentationType height_direction_fragmentation_type,
44 bool is_new_fc); 45 bool is_new_fc);
45 46
46 NGPhysicalSize ContainerSize() const { return container_size_; }
47
48 void AddExclusion(const NGLogicalRect&, unsigned options = 0); 47 void AddExclusion(const NGLogicalRect&, unsigned options = 0);
49 const Vector<std::unique_ptr<const NGLogicalRect>>& Exclusions( 48 const Vector<std::unique_ptr<const NGLogicalRect>>& Exclusions(
50 unsigned options = 0) const; 49 unsigned options = 0) const;
51 50
52 DEFINE_INLINE_TRACE() {} 51 DEFINE_INLINE_TRACE() {}
53 52
54 private: 53 private:
55 friend class NGConstraintSpace; 54 friend class NGConstraintSpace;
56 55
57 NGPhysicalSize container_size_; 56 NGPhysicalSize available_size_;
57 NGPhysicalSize percentage_resolution_size_;
58 58
59 unsigned fixed_width_ : 1; 59 unsigned fixed_width_ : 1;
60 unsigned fixed_height_ : 1; 60 unsigned fixed_height_ : 1;
61 unsigned width_direction_triggers_scrollbar_ : 1; 61 unsigned width_direction_triggers_scrollbar_ : 1;
62 unsigned height_direction_triggers_scrollbar_ : 1; 62 unsigned height_direction_triggers_scrollbar_ : 1;
63 unsigned width_direction_fragmentation_type_ : 2; 63 unsigned width_direction_fragmentation_type_ : 2;
64 unsigned height_direction_fragmentation_type_ : 2; 64 unsigned height_direction_fragmentation_type_ : 2;
65 65
66 // Whether the current constraint space is for the newly established 66 // Whether the current constraint space is for the newly established
67 // formatting Context 67 // formatting Context
68 unsigned is_new_fc_ : 1; 68 unsigned is_new_fc_ : 1;
69 69
70 Vector<std::unique_ptr<const NGLogicalRect>> exclusions_; 70 Vector<std::unique_ptr<const NGLogicalRect>> exclusions_;
71 }; 71 };
72 72
73 } // namespace blink 73 } // namespace blink
74 74
75 #endif // NGPhysicalConstraintSpace_h 75 #endif // NGPhysicalConstraintSpace_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698