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

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

Issue 2266313002: [layoutng] Create a more correct constraint space for children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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 NGConstraintSpace_h 5 #ifndef NGConstraintSpace_h
6 #define NGConstraintSpace_h 6 #define NGConstraintSpace_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 "wtf/DoublyLinkedList.h" 10 #include "wtf/DoublyLinkedList.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 public: 46 public:
47 NGExclusion(); 47 NGExclusion();
48 ~NGExclusion() {} 48 ~NGExclusion() {}
49 }; 49 };
50 50
51 class CORE_EXPORT NGConstraintSpace { 51 class CORE_EXPORT NGConstraintSpace {
52 public: 52 public:
53 NGConstraintSpace(NGLogicalSize container_size); 53 NGConstraintSpace(NGLogicalSize container_size);
54 virtual ~NGConstraintSpace() {} 54 virtual ~NGConstraintSpace() {}
55 55
56 // Constructs a new constraint space based on an old one with a new size but
57 // the same exclusions.
58 NGConstraintSpace(const NGConstraintSpace&, NGLogicalSize container_size);
59
56 // Constructs Layout NG constraint space from legacy layout object. 60 // Constructs Layout NG constraint space from legacy layout object.
57 static NGConstraintSpace fromLayoutObject(const LayoutBox&); 61 static NGConstraintSpace fromLayoutObject(const LayoutBox&);
58 62
59 void addExclusion(const NGExclusion, unsigned options = 0); 63 void addExclusion(const NGExclusion, unsigned options = 0);
60 void setOverflowTriggersScrollbar(bool inlineTriggers, bool blockTriggers); 64 void setOverflowTriggersScrollbar(bool inlineTriggers, bool blockTriggers);
61 void setFixedSize(bool inlineFixed, bool blockFixed); 65 void setFixedSize(bool inlineFixed, bool blockFixed);
62 void setFragmentationType(NGFragmentationType); 66 void setFragmentationType(NGFragmentationType);
63 67
64 // Size of the container. Used for the following three cases: 68 // Size of the container. Used for the following three cases:
65 // 1) Percentage resolution. 69 // 1) Percentage resolution.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 135
132 private: 136 private:
133 const NGConstraintSpace* constraint_space_; 137 const NGConstraintSpace* constraint_space_;
134 unsigned clear_; 138 unsigned clear_;
135 bool for_inline_or_bfc_; 139 bool for_inline_or_bfc_;
136 }; 140 };
137 141
138 } // namespace blink 142 } // namespace blink
139 143
140 #endif // NGConstraintSpace_h 144 #endif // NGConstraintSpace_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698