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) {
// regardless of 'text-indent'.
position_ = line_info->TextIndent();
overflow_item_index_ = 0;
ResetRewindLoopDetector();
}
......@@ -1543,8 +1542,6 @@ bool NGLineBreaker::ShouldHangTraillingSpaces(const NGInlineItem& item) {
// At this point, item_results does not fit into the current line, and there
// are no break opportunities in item_results.back().
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,
// items can fit within the line.
LayoutUnit available_width = AvailableWidthToFit();
......@@ -1645,7 +1642,6 @@ void NGLineBreaker::HandleOverflow(NGLineInfo* line_info) {
if (!item_results->IsEmpty())
Rewind(0, line_info);
state_ = LineBreakState::kContinue;
overflow_item_index_ = 0;
ResetRewindLoopDetector();
return;
}
......
......@@ -281,9 +281,6 @@ class CORE_EXPORT NGLineBreaker {
};
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().
const NGPositionedFloatVector& leading_floats_;
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