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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc

Issue 2805283003: Inline algorithm should take into account the wrapper's clearance line. (Closed)
Patch Set: git rebase-update 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
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 #include "core/layout/ng/inline/ng_inline_layout_algorithm.h" 5 #include "core/layout/ng/inline/ng_inline_layout_algorithm.h"
6 6
7 #include "core/layout/BidiRun.h" 7 #include "core/layout/BidiRun.h"
8 #include "core/layout/LayoutBlockFlow.h" 8 #include "core/layout/LayoutBlockFlow.h"
9 #include "core/layout/line/LineInfo.h" 9 #include "core/layout/line/LineInfo.h"
10 #include "core/layout/line/RootInlineBox.h" 10 #include "core/layout/line/RootInlineBox.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 #endif 71 #endif
72 { 72 {
73 if (!is_horizontal_writing_mode_) 73 if (!is_horizontal_writing_mode_)
74 baseline_type_ = FontBaseline::kIdeographicBaseline; 74 baseline_type_ = FontBaseline::kIdeographicBaseline;
75 if (break_token) 75 if (break_token)
76 Initialize(break_token->ItemIndex(), break_token->TextOffset()); 76 Initialize(break_token->ItemIndex(), break_token->TextOffset());
77 else 77 else
78 Initialize(0, 0); 78 Initialize(0, 0);
79 79
80 // BFC offset is known for inline fragments. 80 // BFC offset is known for inline fragments.
81 container_builder_.SetBfcOffset(space->BfcOffset()); 81 MaybeUpdateFragmentBfcOffset(ConstraintSpace(), ConstraintSpace().BfcOffset(),
82 &container_builder_);
82 } 83 }
83 84
84 bool NGInlineLayoutAlgorithm::IsFirstLine() const { 85 bool NGInlineLayoutAlgorithm::IsFirstLine() const {
85 return !disallow_first_line_rules_ && container_builder_.Children().IsEmpty(); 86 return !disallow_first_line_rules_ && container_builder_.Children().IsEmpty();
86 } 87 }
87 88
88 const ComputedStyle& NGInlineLayoutAlgorithm::FirstLineStyle() const { 89 const ComputedStyle& NGInlineLayoutAlgorithm::FirstLineStyle() const {
89 return Node()->GetLayoutObject()->FirstLineStyleRef(); 90 return Node()->GetLayoutObject()->FirstLineStyleRef();
90 } 91 }
91 92
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 root_line_box->SetLineTopBottomPositions( 656 root_line_box->SetLineTopBottomPositions(
656 line_top, baseline + line_metrics.descent, 657 line_top, baseline + line_metrics.descent,
657 baseline - max_with_leading.ascent, 658 baseline - max_with_leading.ascent,
658 baseline + max_with_leading.descent); 659 baseline + max_with_leading.descent);
659 660
660 bidi_runs.DeleteRuns(); 661 bidi_runs.DeleteRuns();
661 fragments_for_bidi_runs.Clear(); 662 fragments_for_bidi_runs.Clear();
662 } 663 }
663 } 664 }
664 } // namespace blink 665 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698