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

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

Issue 2336353002: Collapse bottom margins of a last child and its parent if parent's height=auto (Closed)
Patch Set: add CORE_EXPORT 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 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 NGBoxStrut operator+(const NGBoxStrut& other) { 113 NGBoxStrut operator+(const NGBoxStrut& other) {
114 NGBoxStrut result(*this); 114 NGBoxStrut result(*this);
115 result += other; 115 result += other;
116 return result; 116 return result;
117 } 117 }
118 }; 118 };
119 119
120 // This struct is used for the margin collapsing calculation. 120 // This struct is used for the margin collapsing calculation.
121 struct NGMarginStrut { 121 struct CORE_EXPORT NGMarginStrut {
122 LayoutUnit margin_block_start; 122 LayoutUnit margin_block_start;
123 LayoutUnit margin_block_end; 123 LayoutUnit margin_block_end;
124 124
125 LayoutUnit negative_margin_block_start; 125 LayoutUnit negative_margin_block_start;
126 LayoutUnit negative_margin_block_end; 126 LayoutUnit negative_margin_block_end;
127 127
128 void AppendMarginBlockStart(const LayoutUnit& value); 128 void AppendMarginBlockStart(const LayoutUnit& value);
129 void AppendMarginBlockEnd(const LayoutUnit& value); 129 void AppendMarginBlockEnd(const LayoutUnit& value);
130 void SetMarginBlockEnd(const LayoutUnit& value);
130 131
131 String ToString() const; 132 String ToString() const;
133
134 bool operator==(const NGMarginStrut& other) const;
132 }; 135 };
133 136
134 inline std::ostream& operator<<(std::ostream& stream, 137 inline std::ostream& operator<<(std::ostream& stream,
135 const NGMarginStrut& value) { 138 const NGMarginStrut& value) {
136 return stream << value.ToString(); 139 return stream << value.ToString();
137 } 140 }
138 141
139 } // namespace blink 142 } // namespace blink
140 143
141 #endif // NGUnits_h 144 #endif // NGUnits_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698