OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NGMarginStrut_h | |
6 #define NGMarginStrut_h | |
7 | |
8 #include "core/CoreExport.h" | |
9 #include "platform/LayoutUnit.h" | |
10 | |
11 namespace blink { | |
12 | |
13 #define NGSizeIndefinite LayoutUnit(-1) | |
mstensho (USE GERRIT)
2017/02/28 12:19:47
Also #defined in ng_logical_size.h
eae
2017/02/28 12:26:34
Opps, good catch!
| |
14 | |
15 // This struct is used for the margin collapsing calculation. | |
16 struct CORE_EXPORT NGMarginStrut { | |
17 LayoutUnit margin; | |
18 LayoutUnit negative_margin; | |
19 | |
20 // Appends negative or positive value to the current margin strut. | |
21 void Append(const LayoutUnit& value); | |
22 | |
23 // Sum up negative and positive margins of this strut. | |
24 LayoutUnit Sum() const; | |
25 | |
26 bool operator==(const NGMarginStrut& other) const; | |
27 | |
28 String ToString() const; | |
29 }; | |
30 | |
31 CORE_EXPORT std::ostream& operator<<(std::ostream&, const NGMarginStrut&); | |
32 | |
33 } // namespace blink | |
34 | |
35 #endif // NGMarginStrut_h | |
OLD | NEW |