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 NGPhysicalFragmentBase_h | 5 #ifndef NGPhysicalFragmentBase_h |
6 #define NGPhysicalFragmentBase_h | 6 #define NGPhysicalFragmentBase_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_constraint_space.h" | 9 #include "core/layout/ng/ng_constraint_space.h" |
10 #include "core/layout/ng/ng_units.h" | 10 #include "core/layout/ng/ng_units.h" |
(...skipping 20 matching lines...) Expand all Loading... | |
31 // The accessors in this class shouldn't be used by layout code directly, | 31 // The accessors in this class shouldn't be used by layout code directly, |
32 // instead should be accessed by the NGFragmentBase classes. These accessors | 32 // instead should be accessed by the NGFragmentBase classes. These accessors |
33 // exist for paint, hit-testing, etc. | 33 // exist for paint, hit-testing, etc. |
34 | 34 |
35 // Returns the border-box size. | 35 // Returns the border-box size. |
36 NGPhysicalSize Size() const { return size_; } | 36 NGPhysicalSize Size() const { return size_; } |
37 LayoutUnit Width() const { return size_.width; } | 37 LayoutUnit Width() const { return size_.width; } |
38 LayoutUnit Height() const { return size_.height; } | 38 LayoutUnit Height() const { return size_.height; } |
39 | 39 |
40 // Returns the total size, including the contents outside of the border-box. | 40 // Returns the total size, including the contents outside of the border-box. |
41 NGPhysicalSize OverflowSize() { return overflow_; } | |
Gleb Lanbin
2016/10/31 19:52:47
shouldn't a getter function name for variable have
cbiesinger
2016/11/01 19:10:04
It turns out I no longer need this function, so I
| |
41 LayoutUnit WidthOverflow() const { return overflow_.width; } | 42 LayoutUnit WidthOverflow() const { return overflow_.width; } |
42 LayoutUnit HeightOverflow() const { return overflow_.height; } | 43 LayoutUnit HeightOverflow() const { return overflow_.height; } |
43 | 44 |
44 // Returns the offset relative to the parent fragement's content-box. | 45 // Returns the offset relative to the parent fragement's content-box. |
45 LayoutUnit LeftOffset() const { | 46 LayoutUnit LeftOffset() const { |
46 DCHECK(has_been_placed_); | 47 DCHECK(has_been_placed_); |
47 return offset_.left; | 48 return offset_.left; |
48 } | 49 } |
49 | 50 |
50 LayoutUnit TopOffset() const { | 51 LayoutUnit TopOffset() const { |
(...skipping 24 matching lines...) Expand all Loading... | |
75 NGPhysicalSize overflow_; | 76 NGPhysicalSize overflow_; |
76 NGPhysicalOffset offset_; | 77 NGPhysicalOffset offset_; |
77 | 78 |
78 unsigned type_ : 1; | 79 unsigned type_ : 1; |
79 unsigned has_been_placed_ : 1; | 80 unsigned has_been_placed_ : 1; |
80 }; | 81 }; |
81 | 82 |
82 } // namespace blink | 83 } // namespace blink |
83 | 84 |
84 #endif // NGFragmentBase_h | 85 #endif // NGFragmentBase_h |
OLD | NEW |