| Index: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.h
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.h b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1620384aa9d0b4338e5668cc5b3d54f364972ef6
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.h
|
| @@ -0,0 +1,48 @@
|
| +// 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 NGInlineItemResult_h
|
| +#define NGInlineItemResult_h
|
| +
|
| +#include "core/layout/ng/ng_layout_result.h"
|
| +#include "platform/LayoutUnit.h"
|
| +#include "platform/fonts/shaping/ShapeResult.h"
|
| +#include "platform/wtf/Allocator.h"
|
| +
|
| +namespace blink {
|
| +
|
| +// The result of measuring NGInlineItem.
|
| +//
|
| +// This is a transient context object only while building line boxes.
|
| +// Produced while determining the line break points, to keep the data needed
|
| +// to create line boxes.
|
| +struct CORE_EXPORT NGInlineItemResult {
|
| + DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
|
| +
|
| + public:
|
| + // The index of NGInlineItem and its text range.
|
| + unsigned item_index;
|
| + unsigned start_offset;
|
| + unsigned end_offset;
|
| +
|
| + // Inline size of this item.
|
| + LayoutUnit inline_size;
|
| +
|
| + // ShapeResult for text items. Maybe different from NGInlineItem if re-shape
|
| + // is needed in the line breaker.
|
| + RefPtr<ShapeResult> shape_result;
|
| +
|
| + // NGLayoutResult for atomic inline items.
|
| + RefPtr<NGLayoutResult> layout_result;
|
| +
|
| + NGInlineItemResult();
|
| + NGInlineItemResult(unsigned index, unsigned start, unsigned end);
|
| +};
|
| +
|
| +// Represents a set of NGInlineItemResult that forms a line box.
|
| +using NGInlineItemResults = Vector<NGInlineItemResult, 32>;
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // NGInlineItemResult_h
|
|
|