OLD | NEW |
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 NGLogicalOffset_h | 5 #ifndef NGLogicalOffset_h |
6 #define NGLogicalOffset_h | 6 #define NGLogicalOffset_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_writing_mode.h" | 9 #include "core/layout/ng/ng_writing_mode.h" |
10 #include "platform/LayoutUnit.h" | 10 #include "platform/LayoutUnit.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 // described by offset + inner_size. Setting inner_size to 0,0 will return | 31 // described by offset + inner_size. Setting inner_size to 0,0 will return |
32 // the same point. | 32 // the same point. |
33 // @param outer_size the size of the rect (typically a fragment). | 33 // @param outer_size the size of the rect (typically a fragment). |
34 // @param inner_size the size of the inner rect (typically a child fragment). | 34 // @param inner_size the size of the inner rect (typically a child fragment). |
35 NGPhysicalOffset ConvertToPhysical(NGWritingMode, | 35 NGPhysicalOffset ConvertToPhysical(NGWritingMode, |
36 TextDirection, | 36 TextDirection, |
37 NGPhysicalSize outer_size, | 37 NGPhysicalSize outer_size, |
38 NGPhysicalSize inner_size) const; | 38 NGPhysicalSize inner_size) const; |
39 | 39 |
40 bool operator==(const NGLogicalOffset& other) const; | 40 bool operator==(const NGLogicalOffset& other) const; |
| 41 bool operator!=(const NGLogicalOffset& other) const; |
41 | 42 |
42 NGLogicalOffset operator+(const NGLogicalOffset& other) const; | 43 NGLogicalOffset operator+(const NGLogicalOffset& other) const; |
43 NGLogicalOffset& operator+=(const NGLogicalOffset& other); | 44 NGLogicalOffset& operator+=(const NGLogicalOffset& other); |
44 | 45 |
45 NGLogicalOffset operator-(const NGLogicalOffset& other) const; | 46 NGLogicalOffset operator-(const NGLogicalOffset& other) const; |
46 NGLogicalOffset& operator-=(const NGLogicalOffset& other); | 47 NGLogicalOffset& operator-=(const NGLogicalOffset& other); |
47 | 48 |
48 bool operator>(const NGLogicalOffset& other) const; | 49 bool operator>(const NGLogicalOffset& other) const; |
49 bool operator>=(const NGLogicalOffset& other) const; | 50 bool operator>=(const NGLogicalOffset& other) const; |
50 | 51 |
51 bool operator<(const NGLogicalOffset& other) const; | 52 bool operator<(const NGLogicalOffset& other) const; |
52 bool operator<=(const NGLogicalOffset& other) const; | 53 bool operator<=(const NGLogicalOffset& other) const; |
53 | 54 |
54 String ToString() const; | 55 String ToString() const; |
55 }; | 56 }; |
56 | 57 |
57 CORE_EXPORT std::ostream& operator<<(std::ostream&, const NGLogicalOffset&); | 58 CORE_EXPORT std::ostream& operator<<(std::ostream&, const NGLogicalOffset&); |
58 | 59 |
59 } // namespace blink | 60 } // namespace blink |
60 | 61 |
61 #endif // NGLogicalOffset_h | 62 #endif // NGLogicalOffset_h |
OLD | NEW |