| Index: third_party/WebKit/Source/core/layout/ng/ng_positioned_float.h
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_positioned_float.h b/third_party/WebKit/Source/core/layout/ng/ng_positioned_float.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8443fa0746a60bcad997ae98c663004f8015e4dd
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_positioned_float.h
|
| @@ -0,0 +1,35 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef NGPositionedFloat_h
|
| +#define NGPositionedFloat_h
|
| +
|
| +#include "core/CoreExport.h"
|
| +#include "core/layout/ng/ng_physical_fragment.h"
|
| +
|
| +namespace blink {
|
| +
|
| +// Contains the information necessary for copying back data to a FloatingObject.
|
| +struct CORE_EXPORT NGPositionedFloat {
|
| + NGPositionedFloat(RefPtr<NGPhysicalFragment> fragment,
|
| + NGLogicalOffset offset,
|
| + LayoutUnit left_offset)
|
| + : fragment(fragment), offset(offset), left_offset(left_offset) {}
|
| +
|
| + RefPtr<NGPhysicalFragment> fragment;
|
| + NGLogicalOffset offset;
|
| +
|
| + // In the case where a legacy FloatingObject is attached to not its own
|
| + // parent, e.g. a float surrounded by a bunch of nested empty divs,
|
| + // NG float fragment's LeftOffset() cannot be used as legacy FloatingObject's
|
| + // left offset because that offset should be relative to the original float
|
| + // parent.
|
| + // {@code left_offset} is calculated when we know to which parent this float
|
| + // would be attached.
|
| + LayoutUnit left_offset;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // NGPositionedFloat_h
|
|
|