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 NGFragment_h | 5 #ifndef NGFragment_h |
6 #define NGFragment_h | 6 #define NGFragment_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/geometry/ng_logical_offset.h" | 9 #include "core/layout/ng/geometry/ng_logical_offset.h" |
10 #include "core/layout/ng/ng_physical_fragment.h" | 10 #include "core/layout/ng/ng_physical_fragment.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 // Returns the border-box size. | 27 // Returns the border-box size. |
28 LayoutUnit InlineSize() const; | 28 LayoutUnit InlineSize() const; |
29 LayoutUnit BlockSize() const; | 29 LayoutUnit BlockSize() const; |
30 NGLogicalSize Size() const; | 30 NGLogicalSize Size() const; |
31 | 31 |
32 // Returns the offset relative to the parent fragment's content-box. | 32 // Returns the offset relative to the parent fragment's content-box. |
33 LayoutUnit InlineOffset() const; | 33 LayoutUnit InlineOffset() const; |
34 LayoutUnit BlockOffset() const; | 34 LayoutUnit BlockOffset() const; |
35 NGLogicalOffset Offset() const; | 35 NGLogicalOffset Offset() const; |
36 | 36 |
37 NGBorderEdges::Logical BorderEdges() const; | 37 NGBorderEdges BorderEdges() const; |
38 | 38 |
39 NGPhysicalFragment::NGFragmentType Type() const; | 39 NGPhysicalFragment::NGFragmentType Type() const; |
40 | 40 |
41 protected: | 41 protected: |
42 NGFragment(NGWritingMode writing_mode, | 42 NGFragment(NGWritingMode writing_mode, |
43 const NGPhysicalFragment* physical_fragment) | 43 const NGPhysicalFragment* physical_fragment) |
44 : physical_fragment_(physical_fragment), writing_mode_(writing_mode) {} | 44 : physical_fragment_(physical_fragment), writing_mode_(writing_mode) {} |
45 | 45 |
46 const NGPhysicalFragment* physical_fragment_; | 46 const NGPhysicalFragment* physical_fragment_; |
47 | 47 |
48 unsigned writing_mode_ : 3; | 48 unsigned writing_mode_ : 3; |
49 }; | 49 }; |
50 | 50 |
51 } // namespace blink | 51 } // namespace blink |
52 | 52 |
53 #endif // NGFragment_h | 53 #endif // NGFragment_h |
OLD | NEW |