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

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

Issue 2389823003: Fix incorrectly calculated content_size for fragments that create new FC (Closed)
Patch Set: Regroup the code to put together the Collapsing Margins logic for NewFormattingContext's fragments Created 4 years, 2 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 NGUnits_h 5 #ifndef NGUnits_h
6 #define NGUnits_h 6 #define NGUnits_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_direction.h" 9 #include "core/layout/ng/ng_direction.h"
10 #include "core/layout/ng/ng_writing_mode.h" 10 #include "core/layout/ng/ng_writing_mode.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 }; 132 };
133 133
134 // This struct is used for the margin collapsing calculation. 134 // This struct is used for the margin collapsing calculation.
135 struct CORE_EXPORT NGMarginStrut { 135 struct CORE_EXPORT NGMarginStrut {
136 LayoutUnit margin_block_start; 136 LayoutUnit margin_block_start;
137 LayoutUnit margin_block_end; 137 LayoutUnit margin_block_end;
138 138
139 LayoutUnit negative_margin_block_start; 139 LayoutUnit negative_margin_block_start;
140 LayoutUnit negative_margin_block_end; 140 LayoutUnit negative_margin_block_end;
141 141
142 LayoutUnit BlockEndSum() const;
143
142 void AppendMarginBlockStart(const LayoutUnit& value); 144 void AppendMarginBlockStart(const LayoutUnit& value);
143 void AppendMarginBlockEnd(const LayoutUnit& value); 145 void AppendMarginBlockEnd(const LayoutUnit& value);
144 void SetMarginBlockStart(const LayoutUnit& value); 146 void SetMarginBlockStart(const LayoutUnit& value);
145 void SetMarginBlockEnd(const LayoutUnit& value); 147 void SetMarginBlockEnd(const LayoutUnit& value);
146 148
149 bool IsEmpty() const;
150
147 String ToString() const; 151 String ToString() const;
148 152
149 bool operator==(const NGMarginStrut& other) const; 153 bool operator==(const NGMarginStrut& other) const;
150 }; 154 };
151 155
152 inline std::ostream& operator<<(std::ostream& stream, 156 inline std::ostream& operator<<(std::ostream& stream,
153 const NGMarginStrut& value) { 157 const NGMarginStrut& value) {
154 return stream << value.ToString(); 158 return stream << value.ToString();
155 } 159 }
156 160
157 } // namespace blink 161 } // namespace blink
158 162
159 #endif // NGUnits_h 163 #endif // NGUnits_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698