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

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

Issue 2283233002: [LayoutNG] Construct ConstraintSpace form Physical (Closed)
Patch Set: Created 4 years, 3 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 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 23 matching lines...) Expand all
34 ~NGExclusion() {} 34 ~NGExclusion() {}
35 }; 35 };
36 36
37 // The NGPhysicalConstraintSpace contains the underlying data for the 37 // The NGPhysicalConstraintSpace contains the underlying data for the
38 // NGConstraintSpace. It is not meant to be used directly as all members are in 38 // NGConstraintSpace. It is not meant to be used directly as all members are in
39 // the physical coordinate space. Instead NGConstraintSpace should be used. 39 // the physical coordinate space. Instead NGConstraintSpace should be used.
40 class CORE_EXPORT NGPhysicalConstraintSpace final 40 class CORE_EXPORT NGPhysicalConstraintSpace final
41 : public GarbageCollected<NGPhysicalConstraintSpace> { 41 : public GarbageCollected<NGPhysicalConstraintSpace> {
42 public: 42 public:
43 NGPhysicalConstraintSpace(); 43 NGPhysicalConstraintSpace();
44 NGPhysicalConstraintSpace(NGPhysicalSize);
44 NGPhysicalConstraintSpace(const NGPhysicalConstraintSpace&); 45 NGPhysicalConstraintSpace(const NGPhysicalConstraintSpace&);
45 46
47 NGPhysicalSize ContainerSize() const { return container_size_; }
48
46 void AddExclusion(const NGExclusion, unsigned options = 0); 49 void AddExclusion(const NGExclusion, unsigned options = 0);
47 DoublyLinkedList<const NGExclusion> Exclusions(unsigned options = 0) const; 50 DoublyLinkedList<const NGExclusion> Exclusions(unsigned options = 0) const;
48 51
49 DEFINE_INLINE_TRACE() {} 52 DEFINE_INLINE_TRACE() {}
50 53
51 private: 54 private:
52 friend class NGConstraintSpace; 55 friend class NGConstraintSpace;
53 56
54 NGPhysicalSize container_size_; 57 NGPhysicalSize container_size_;
55 58
56 unsigned fixed_width_ : 1; 59 unsigned fixed_width_ : 1;
57 unsigned fixed_height_ : 1; 60 unsigned fixed_height_ : 1;
58 unsigned width_direction_triggers_scrollbar_ : 1; 61 unsigned width_direction_triggers_scrollbar_ : 1;
59 unsigned height_direction_triggers_scrollbar_ : 1; 62 unsigned height_direction_triggers_scrollbar_ : 1;
60 unsigned width_direction_fragmentation_type_ : 2; 63 unsigned width_direction_fragmentation_type_ : 2;
61 unsigned height_direction_fragmentation_type_ : 2; 64 unsigned height_direction_fragmentation_type_ : 2;
62 65
63 DoublyLinkedList<const NGExclusion> exclusions_; 66 DoublyLinkedList<const NGExclusion> exclusions_;
64 }; 67 };
65 68
66 } // namespace blink 69 } // namespace blink
67 70
68 #endif // NGPhysicalConstraintSpace_h 71 #endif // NGPhysicalConstraintSpace_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698