Commit 1c1a8088 authored by Morten Stenshorne's avatar Morten Stenshorne Committed by Commit Bot

Remove a couple of pesky DCHECKs in legacy multicol code.

These DCHECKs were there to assert correct layout, and over the years
they have served us well in finding and fixing bugs that (more often
than not) caused bad layout.

While there are still bugs that would trigger these DCHECKs, the
problematic legacy multicol design (the flowthread idea, and the
assumption that it should be possible to 1:1-map any flowthread
coordinate to column rows (fragmentainer groups)) makes it practically
impossible to avoid problems with these DCHECKs. We're not aware that
these DCHECKs would fail on real websites (only with tests generated by
the fuzzers), and, given that the multicol implementation will
eventually be replaced by LayoutNG, it's time to accept the remaining
and mostly unfixable flaws in the current multicol implementation.

Bug: 950308, 958671
Change-Id: I0210e073d177bc8fcd02dbf1f1ed5aabb8ccbcf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1598817Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657384}
parent b16c354b
...@@ -489,10 +489,6 @@ void MinimumSpaceShortageFinder::ExamineLine(const RootInlineBox& line) { ...@@ -489,10 +489,6 @@ void MinimumSpaceShortageFinder::ExamineLine(const RootInlineBox& line) {
pending_strut_ = LayoutUnit::Min(); pending_strut_ = LayoutUnit::Min();
return; return;
} }
DCHECK(IsFirstAfterBreak(line_top_in_flow_thread) ||
!line.PaginationStrut() ||
!IsLogicalTopWithinBounds(line_top_in_flow_thread -
line.PaginationStrut()));
if (IsFirstAfterBreak(line_top_in_flow_thread)) if (IsFirstAfterBreak(line_top_in_flow_thread))
RecordSpaceShortage(line_height - line.PaginationStrut()); RecordSpaceShortage(line_height - line.PaginationStrut());
......
...@@ -185,8 +185,6 @@ bool LayoutMultiColumnSet::NewFragmentainerGroupsAllowed() const { ...@@ -185,8 +185,6 @@ bool LayoutMultiColumnSet::NewFragmentainerGroupsAllowed() const {
LayoutUnit LayoutMultiColumnSet::NextLogicalTopForUnbreakableContent( LayoutUnit LayoutMultiColumnSet::NextLogicalTopForUnbreakableContent(
LayoutUnit flow_thread_offset, LayoutUnit flow_thread_offset,
LayoutUnit content_logical_height) const { LayoutUnit content_logical_height) const {
DCHECK(flow_thread_offset.MightBeSaturated() ||
PageLogicalTopForOffset(flow_thread_offset) == flow_thread_offset);
if (!MultiColumnFlowThread()->EnclosingFragmentationContext()) { if (!MultiColumnFlowThread()->EnclosingFragmentationContext()) {
// If there's no enclosing fragmentation context, there'll ever be only one // If there's no enclosing fragmentation context, there'll ever be only one
// row, and all columns there will have the same height. // row, and all columns there will have the same height.
......
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