| Index: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f24de23128046f93648c51952588fac1d429ded2
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h
|
| @@ -0,0 +1,46 @@
|
| +// 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 NGInlineBoxState_h
|
| +#define NGInlineBoxState_h
|
| +
|
| +#include "core/CoreExport.h"
|
| +#include "core/layout/ng/inline/ng_line_height_metrics.h"
|
| +#include "core/style/ComputedStyleConstants.h"
|
| +#include "platform/LayoutUnit.h"
|
| +#include "platform/fonts/FontBaseline.h"
|
| +#include "platform/wtf/Vector.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class NGLayoutInlineItem;
|
| +
|
| +// Fragments that require the layout position/size of ancestor are packed in
|
| +// this struct.
|
| +struct NGPendingPositions {
|
| + unsigned fragment_start;
|
| + unsigned fragment_end;
|
| + NGLineHeightMetrics metrics;
|
| + EVerticalAlign vertical_align;
|
| +};
|
| +
|
| +// Represents the current box while NGInlineLayoutAlgorithm performs layout.
|
| +// Used 1) to cache common values for a box, and 2) to layout children that
|
| +// require ancestor position or size.
|
| +struct NGInlineBoxState {
|
| + unsigned fragment_start;
|
| + const ComputedStyle* style;
|
| + NGLineHeightMetrics metrics;
|
| + NGLineHeightMetrics text_metrics;
|
| + LayoutUnit text_top;
|
| + Vector<NGPendingPositions> pending_descendants;
|
| + bool include_used_fonts = false;
|
| +
|
| + void ComputeTextMetrics(const NGLayoutInlineItem&, FontBaseline);
|
| +};
|
| +using NGInlineLayoutStateStack = Vector<NGInlineBoxState, 4>;
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // NGInlineBoxState_h
|
|
|