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

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

Issue 2679343002: Fragment that establishes new BFC knows it's BFC offset in parent space (Closed)
Patch Set: Created 3 years, 10 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 "core/layout/ng/ng_writing_mode.h" 10 #include "core/layout/ng/ng_writing_mode.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return BlockFragmentationType() != kFragmentNone; 103 return BlockFragmentationType() != kFragmentNone;
104 } 104 }
105 105
106 // Modifies constraint space to account for a placed fragment. Depending on 106 // Modifies constraint space to account for a placed fragment. Depending on
107 // the shape of the fragment this will either modify the inline or block 107 // the shape of the fragment this will either modify the inline or block
108 // size, or add an exclusion. 108 // size, or add an exclusion.
109 void Subtract(const NGBoxFragment*); 109 void Subtract(const NGBoxFragment*);
110 110
111 NGMarginStrut MarginStrut() const { return margin_strut_; } 111 NGMarginStrut MarginStrut() const { return margin_strut_; }
112 112
113 // TODO(glebl): Rename to Offset() or AbsoluteOffset().
114 NGLogicalOffset BfcOffset() const { return bfc_offset_; } 113 NGLogicalOffset BfcOffset() const { return bfc_offset_; }
115 114
116 DEFINE_INLINE_VIRTUAL_TRACE() {} 115 DEFINE_INLINE_VIRTUAL_TRACE() {}
117 116
118 String ToString() const; 117 String ToString() const;
119 118
120 private: 119 private:
121 friend class NGConstraintSpaceBuilder; 120 friend class NGConstraintSpaceBuilder;
122 // Default constructor. 121 // Default constructor.
123 NGConstraintSpace(NGWritingMode, 122 NGConstraintSpace(NGWritingMode,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 }; 163 };
165 164
166 inline std::ostream& operator<<(std::ostream& stream, 165 inline std::ostream& operator<<(std::ostream& stream,
167 const NGConstraintSpace& value) { 166 const NGConstraintSpace& value) {
168 return stream << value.ToString(); 167 return stream << value.ToString();
169 } 168 }
170 169
171 } // namespace blink 170 } // namespace blink
172 171
173 #endif // NGConstraintSpace_h 172 #endif // NGConstraintSpace_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698