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 NGPhysicalFragment_h | 5 #ifndef NGPhysicalFragment_h |
6 #define NGPhysicalFragment_h | 6 #define NGPhysicalFragment_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/geometry/ng_physical_offset.h" | 9 #include "core/layout/ng/geometry/ng_physical_offset.h" |
10 #include "core/layout/ng/geometry/ng_physical_size.h" | 10 #include "core/layout/ng/geometry/ng_physical_size.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 NGBreakToken* BreakToken() const { return break_token_.get(); } | 84 NGBreakToken* BreakToken() const { return break_token_.get(); } |
85 | 85 |
86 const ComputedStyle& Style() const; | 86 const ComputedStyle& Style() const; |
87 | 87 |
88 // GetLayoutObject should only be used when necessary for compatibility | 88 // GetLayoutObject should only be used when necessary for compatibility |
89 // with LegacyLayout. | 89 // with LegacyLayout. |
90 LayoutObject* GetLayoutObject() const { return layout_object_; } | 90 LayoutObject* GetLayoutObject() const { return layout_object_; } |
91 | 91 |
92 bool IsPlaced() const { return is_placed_; } | 92 bool IsPlaced() const { return is_placed_; } |
93 | 93 |
| 94 String ToString() const; |
| 95 |
94 protected: | 96 protected: |
95 NGPhysicalFragment(LayoutObject* layout_object, | 97 NGPhysicalFragment(LayoutObject* layout_object, |
96 NGPhysicalSize size, | 98 NGPhysicalSize size, |
97 NGPhysicalSize overflow, | 99 NGPhysicalSize overflow, |
98 NGFragmentType type, | 100 NGFragmentType type, |
99 RefPtr<NGBreakToken> break_token = nullptr); | 101 RefPtr<NGBreakToken> break_token = nullptr); |
100 | 102 |
101 LayoutObject* layout_object_; | 103 LayoutObject* layout_object_; |
102 NGPhysicalSize size_; | 104 NGPhysicalSize size_; |
103 NGPhysicalSize overflow_; | 105 NGPhysicalSize overflow_; |
104 NGPhysicalOffset offset_; | 106 NGPhysicalOffset offset_; |
105 RefPtr<NGBreakToken> break_token_; | 107 RefPtr<NGBreakToken> break_token_; |
106 | 108 |
107 unsigned type_ : 1; | 109 unsigned type_ : 1; |
108 unsigned is_placed_ : 1; | 110 unsigned is_placed_ : 1; |
109 | 111 |
110 private: | 112 private: |
111 void destroy() const; | 113 void destroy() const; |
112 }; | 114 }; |
113 | 115 |
114 } // namespace blink | 116 } // namespace blink |
115 | 117 |
116 #endif // NGPhysicalFragment_h | 118 #endif // NGPhysicalFragment_h |
OLD | NEW |