OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NGInlineLayoutAlgorithm_h | 5 #ifndef NGInlineLayoutAlgorithm_h |
6 #define NGInlineLayoutAlgorithm_h | 6 #define NGInlineLayoutAlgorithm_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/geometry/ng_logical_offset.h" | 9 #include "core/layout/ng/geometry/ng_logical_offset.h" |
10 #include "core/layout/ng/inline/ng_inline_box_state.h" | 10 #include "core/layout/ng/inline/ng_inline_box_state.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 RefPtr<NGLayoutResult> Layout() override; | 48 RefPtr<NGLayoutResult> Layout() override; |
49 | 49 |
50 private: | 50 private: |
51 bool IsHorizontalWritingMode() const { return is_horizontal_writing_mode_; } | 51 bool IsHorizontalWritingMode() const { return is_horizontal_writing_mode_; } |
52 | 52 |
53 void BidiReorder(NGInlineItemResults*); | 53 void BidiReorder(NGInlineItemResults*); |
54 | 54 |
55 bool PlaceItems(NGLineInfo*, RefPtr<NGInlineBreakToken>); | 55 bool PlaceItems(NGLineInfo*, RefPtr<NGInlineBreakToken>); |
56 NGInlineBoxState* PlaceAtomicInline(const NGInlineItem&, | 56 NGInlineBoxState* PlaceAtomicInline(const NGInlineItem&, |
57 NGInlineItemResult*, | 57 NGInlineItemResult*, |
58 bool is_first_line, | 58 const NGLineInfo&, |
59 LayoutUnit position, | 59 LayoutUnit position, |
60 NGLineBoxFragmentBuilder*, | 60 NGLineBoxFragmentBuilder*, |
61 NGTextFragmentBuilder*); | 61 NGTextFragmentBuilder*); |
62 | 62 |
63 void ApplyTextAlign(ETextAlign, | 63 void ApplyTextAlign(ETextAlign, |
64 LayoutUnit* line_left, | 64 LayoutUnit* line_left, |
65 LayoutUnit inline_size, | 65 LayoutUnit inline_size, |
66 LayoutUnit available_width); | 66 LayoutUnit available_width); |
67 | 67 |
68 LayoutUnit ComputeContentSize(const NGLineInfo&, LayoutUnit line_bottom); | 68 LayoutUnit ComputeContentSize(const NGLineInfo&, LayoutUnit line_bottom); |
69 | 69 |
70 NGInlineLayoutStateStack box_states_; | 70 NGInlineLayoutStateStack box_states_; |
71 LayoutUnit content_size_; | 71 LayoutUnit content_size_; |
72 LayoutUnit max_inline_size_; | 72 LayoutUnit max_inline_size_; |
73 FontBaseline baseline_type_ = FontBaseline::kAlphabeticBaseline; | 73 FontBaseline baseline_type_ = FontBaseline::kAlphabeticBaseline; |
74 | 74 |
75 NGLogicalOffset bfc_offset_; | 75 NGLogicalOffset bfc_offset_; |
76 NGLogicalRect current_opportunity_; | 76 NGLogicalRect current_opportunity_; |
77 | 77 |
78 unsigned is_horizontal_writing_mode_ : 1; | 78 unsigned is_horizontal_writing_mode_ : 1; |
79 | 79 |
80 NGConstraintSpaceBuilder space_builder_; | 80 NGConstraintSpaceBuilder space_builder_; |
81 NGBoxStrut border_and_padding_; | 81 NGBoxStrut border_and_padding_; |
82 }; | 82 }; |
83 | 83 |
84 } // namespace blink | 84 } // namespace blink |
85 | 85 |
86 #endif // NGInlineLayoutAlgorithm_h | 86 #endif // NGInlineLayoutAlgorithm_h |
OLD | NEW |