Commit b3b77f46 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

[LayoutNG] Remove NGLineBreaker::overflow_item_index_

r701601 (crrev.com/c/1826063) removed the last use of the
field, but it did not remove the code to set it up.

This patch removes the never-used field.

Change-Id: I291bafccbb0c827213e3b4c890d7589ec5dd3fa7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838806Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702808}
parent 7a8201c4
...@@ -299,7 +299,6 @@ void NGLineBreaker::PrepareNextLine(NGLineInfo* line_info) { ...@@ -299,7 +299,6 @@ void NGLineBreaker::PrepareNextLine(NGLineInfo* line_info) {
// regardless of 'text-indent'. // regardless of 'text-indent'.
position_ = line_info->TextIndent(); position_ = line_info->TextIndent();
overflow_item_index_ = 0;
ResetRewindLoopDetector(); ResetRewindLoopDetector();
} }
...@@ -1543,8 +1542,6 @@ bool NGLineBreaker::ShouldHangTraillingSpaces(const NGInlineItem& item) { ...@@ -1543,8 +1542,6 @@ bool NGLineBreaker::ShouldHangTraillingSpaces(const NGInlineItem& item) {
// At this point, item_results does not fit into the current line, and there // At this point, item_results does not fit into the current line, and there
// are no break opportunities in item_results.back(). // are no break opportunities in item_results.back().
void NGLineBreaker::HandleOverflow(NGLineInfo* line_info) { void NGLineBreaker::HandleOverflow(NGLineInfo* line_info) {
overflow_item_index_ = std::max(overflow_item_index_, item_index_);
// Compute the width needing to rewind. When |width_to_rewind| goes negative, // Compute the width needing to rewind. When |width_to_rewind| goes negative,
// items can fit within the line. // items can fit within the line.
LayoutUnit available_width = AvailableWidthToFit(); LayoutUnit available_width = AvailableWidthToFit();
...@@ -1645,7 +1642,6 @@ void NGLineBreaker::HandleOverflow(NGLineInfo* line_info) { ...@@ -1645,7 +1642,6 @@ void NGLineBreaker::HandleOverflow(NGLineInfo* line_info) {
if (!item_results->IsEmpty()) if (!item_results->IsEmpty())
Rewind(0, line_info); Rewind(0, line_info);
state_ = LineBreakState::kContinue; state_ = LineBreakState::kContinue;
overflow_item_index_ = 0;
ResetRewindLoopDetector(); ResetRewindLoopDetector();
return; return;
} }
......
...@@ -281,9 +281,6 @@ class CORE_EXPORT NGLineBreaker { ...@@ -281,9 +281,6 @@ class CORE_EXPORT NGLineBreaker {
}; };
base::Optional<TrailingCollapsibleSpace> trailing_collapsible_space_; base::Optional<TrailingCollapsibleSpace> trailing_collapsible_space_;
// Keep track of item index where overflow occurrred.
unsigned overflow_item_index_;
// Keep track of handled float items. See HandleFloat(). // Keep track of handled float items. See HandleFloat().
const NGPositionedFloatVector& leading_floats_; const NGPositionedFloatVector& leading_floats_;
unsigned leading_floats_index_ = 0u; unsigned leading_floats_index_ = 0u;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment