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/ng_physical_fragment.h" | 9 #include "core/layout/ng/ng_physical_fragment.h" |
10 #include "core/layout/ng/ng_writing_mode.h" | 10 #include "core/layout/ng/ng_writing_mode.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 LayoutUnit InlineOverflow() const; | 29 LayoutUnit InlineOverflow() const; |
30 LayoutUnit BlockOverflow() const; | 30 LayoutUnit BlockOverflow() 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 | 35 |
36 NGPhysicalFragment::NGFragmentType Type() const; | 36 NGPhysicalFragment::NGFragmentType Type() const; |
37 | 37 |
38 protected: | 38 protected: |
39 NGFragment(NGWritingMode writing_mode, NGPhysicalFragment* physical_fragment) | 39 NGFragment(NGWritingMode writing_mode, |
| 40 const NGPhysicalFragment* physical_fragment) |
40 : physical_fragment_(physical_fragment), writing_mode_(writing_mode) {} | 41 : physical_fragment_(physical_fragment), writing_mode_(writing_mode) {} |
41 | 42 |
42 NGPhysicalFragment* physical_fragment_; | 43 const NGPhysicalFragment* physical_fragment_; |
43 | 44 |
44 unsigned writing_mode_ : 3; | 45 unsigned writing_mode_ : 3; |
45 }; | 46 }; |
46 | 47 |
47 } // namespace blink | 48 } // namespace blink |
48 | 49 |
49 #endif // NGFragment_h | 50 #endif // NGFragment_h |
OLD | NEW |