Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_line_builder.h |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_line_builder.h b/third_party/WebKit/Source/core/layout/ng/ng_line_builder.h |
| index f37b180b75c9e38aa1340290121550e48128315e..0a8256eaf31e4a4fffa26219ed9df36613184415 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_line_builder.h |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_line_builder.h |
| @@ -86,7 +86,20 @@ class CORE_EXPORT NGLineBuilder final { |
| // are placed. |
| void CopyFragmentDataToLayoutBlockFlow(); |
| + // Compute inline size of an NGLayoutInlineItem. |
| + // Same as NGLayoutInlineItem::InlineSize(), except that this function can |
| + // compute atomic inlines by laying out them. |
|
ikilpatrick
2017/03/16 18:26:16
.nit
"by layout them out."
or
"by performing layou
kojii
2017/03/16 19:16:33
Done, thank you!
|
| + LayoutUnit InlineSize(const NGLayoutInlineItem&); |
| + |
| private: |
| + bool IsHorizontalWritingMode() const { return is_horizontal_writing_mode_; } |
| + |
| + LayoutUnit InlineSize(const NGLayoutInlineItem&, |
| + unsigned start_offset, |
| + unsigned end_offset); |
| + LayoutUnit InlineSizeFromLayout(const NGLayoutInlineItem&); |
| + const NGLayoutResult* LayoutItem(const NGLayoutInlineItem&); |
| + |
| struct LineItemChunk { |
| unsigned index; |
| unsigned start_offset; |
| @@ -136,6 +149,10 @@ class CORE_EXPORT NGLineBuilder final { |
| void AccumulateUsedFonts(const NGLayoutInlineItem&, |
| const LineItemChunk&, |
| LineBoxData*); |
| + LayoutUnit PlaceAtomicInline(const NGLayoutInlineItem&, |
| + LayoutUnit estimated_baseline, |
| + LineBoxData*, |
| + NGFragmentBuilder*); |
| // Finds the next layout opportunity for the next text fragment. |
| void FindNextLayoutOpportunity(); |
| @@ -143,6 +160,7 @@ class CORE_EXPORT NGLineBuilder final { |
| Persistent<NGInlineNode> inline_box_; |
| NGConstraintSpace* constraint_space_; // Not owned as STACK_ALLOCATED. |
| NGFragmentBuilder* containing_block_builder_; |
| + Vector<RefPtr<NGLayoutResult>, 32> layout_results_; |
| Vector<RefPtr<NGPhysicalFragment>, 32> fragments_; |
| Vector<NGLogicalOffset, 32> offsets_; |
| Vector<LineBoxData, 32> line_box_data_list_; |
| @@ -156,11 +174,12 @@ class CORE_EXPORT NGLineBuilder final { |
| LayoutUnit last_break_opportunity_position_; |
| LayoutUnit content_size_; |
| LayoutUnit max_inline_size_; |
| - FontBaseline baseline_type_; |
| + FontBaseline baseline_type_ = FontBaseline::AlphabeticBaseline; |
| NGLogicalOffset bfc_offset_; |
| NGLogicalRect current_opportunity_; |
| + unsigned is_horizontal_writing_mode_ : 1; |
| #if DCHECK_IS_ON() |
| unsigned is_bidi_reordered_ : 1; |
| #endif |