OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NGPositionedFloat_h |
| 6 #define NGPositionedFloat_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "core/layout/ng/ng_physical_fragment.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 // Contains the information necessary for copying back data to a FloatingObject. |
| 14 struct CORE_EXPORT NGPositionedFloat { |
| 15 NGPositionedFloat(RefPtr<NGPhysicalFragment> fragment, |
| 16 NGLogicalOffset offset, |
| 17 LayoutUnit left_offset) |
| 18 : fragment(fragment), offset(offset), left_offset(left_offset) {} |
| 19 |
| 20 RefPtr<NGPhysicalFragment> fragment; |
| 21 NGLogicalOffset offset; |
| 22 |
| 23 // In the case where a legacy FloatingObject is attached to not its own |
| 24 // parent, e.g. a float surrounded by a bunch of nested empty divs, |
| 25 // NG float fragment's LeftOffset() cannot be used as legacy FloatingObject's |
| 26 // left offset because that offset should be relative to the original float |
| 27 // parent. |
| 28 // {@code left_offset} is calculated when we know to which parent this float |
| 29 // would be attached. |
| 30 LayoutUnit left_offset; |
| 31 }; |
| 32 |
| 33 } // namespace blink |
| 34 |
| 35 #endif // NGPositionedFloat_h |
OLD | NEW |