| 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/ng_units.h" | 9 #include "core/layout/ng/ng_units.h" |
| 10 #include "platform/LayoutUnit.h" | 10 #include "platform/LayoutUnit.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 LayoutUnit LeftOffset() const { | 59 LayoutUnit LeftOffset() const { |
| 60 DCHECK(is_placed_); | 60 DCHECK(is_placed_); |
| 61 return offset_.left; | 61 return offset_.left; |
| 62 } | 62 } |
| 63 | 63 |
| 64 LayoutUnit TopOffset() const { | 64 LayoutUnit TopOffset() const { |
| 65 DCHECK(is_placed_); | 65 DCHECK(is_placed_); |
| 66 return offset_.top; | 66 return offset_.top; |
| 67 } | 67 } |
| 68 | 68 |
| 69 NGPhysicalOffset Offset() const { |
| 70 DCHECK(is_placed_); |
| 71 return offset_; |
| 72 } |
| 73 |
| 69 // Should only be used by the parent fragement's layout. | 74 // Should only be used by the parent fragement's layout. |
| 70 void SetOffset(NGPhysicalOffset offset) { | 75 void SetOffset(NGPhysicalOffset offset) { |
| 71 DCHECK(!is_placed_); | 76 DCHECK(!is_placed_); |
| 72 offset_ = offset; | 77 offset_ = offset; |
| 73 is_placed_ = true; | 78 is_placed_ = true; |
| 74 } | 79 } |
| 75 | 80 |
| 76 NGBreakToken* BreakToken() const { return break_token_; } | 81 NGBreakToken* BreakToken() const { return break_token_; } |
| 77 | 82 |
| 78 LayoutObject* GetLayoutObject() const { return layout_object_; } | 83 LayoutObject* GetLayoutObject() const { return layout_object_; } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 unsigned type_ : 1; | 137 unsigned type_ : 1; |
| 133 unsigned is_placed_ : 1; | 138 unsigned is_placed_ : 1; |
| 134 | 139 |
| 135 private: | 140 private: |
| 136 void destroy() const; | 141 void destroy() const; |
| 137 }; | 142 }; |
| 138 | 143 |
| 139 } // namespace blink | 144 } // namespace blink |
| 140 | 145 |
| 141 #endif // NGPhysicalFragment_h | 146 #endif // NGPhysicalFragment_h |
| OLD | NEW |