Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(521)

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h

Issue 2803433002: [LayoutNG] Initial support for the 'vertical-align' property (Closed)
Patch Set: Move NGInlineBoxState to its own file Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 NGInlineBoxState_h
6 #define NGInlineBoxState_h
7
8 #include "core/CoreExport.h"
9 #include "core/layout/ng/inline/ng_line_height_metrics.h"
10 #include "core/style/ComputedStyleConstants.h"
11 #include "platform/LayoutUnit.h"
12 #include "platform/fonts/FontBaseline.h"
13 #include "platform/wtf/Vector.h"
14
15 namespace blink {
16
17 class NGLayoutInlineItem;
18
19 // Fragments that require the layout position/size of ancestor are packed in
20 // this struct.
21 struct NGPendingPositions {
22 unsigned fragment_start;
23 unsigned fragment_end;
24 NGLineHeightMetrics metrics;
25 EVerticalAlign vertical_align;
26 };
27
28 // Represents the current box while NGInlineLayoutAlgorithm performs layout.
29 // Used 1) to cache common values for a box, and 2) to layout children that
30 // require ancestor position or size.
31 struct NGInlineBoxState {
32 unsigned fragment_start;
33 const ComputedStyle* style;
34 NGLineHeightMetrics metrics;
35 NGLineHeightMetrics text_metrics;
36 LayoutUnit text_top;
37 Vector<NGPendingPositions> pending_descendants;
38 bool include_used_fonts = false;
39
40 void ComputeTextMetrics(const NGLayoutInlineItem&, FontBaseline);
41 };
42 using NGInlineLayoutStateStack = Vector<NGInlineBoxState, 4>;
43
44 } // namespace blink
45
46 #endif // NGInlineBoxState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698