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

Side by Side Diff: third_party/WebKit/Source/core/layout/ColumnBalancer.cpp

Issue 2797313003: Remove DCHECK in column balancer that failed because of flexbox bugs. (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/multicol/nested-with-wrapped-flexbox-crash.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ColumnBalancer.h" 5 #include "core/layout/ColumnBalancer.h"
6 6
7 #include "core/layout/LayoutMultiColumnFlowThread.h" 7 #include "core/layout/LayoutMultiColumnFlowThread.h"
8 #include "core/layout/LayoutMultiColumnSet.h" 8 #include "core/layout/LayoutMultiColumnSet.h"
9 #include "core/layout/api/LineLayoutBlockFlow.h" 9 #include "core/layout/api/LineLayoutBlockFlow.h"
10 10
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 void InitialColumnHeightFinder::examineLine(const RootInlineBox& line) { 237 void InitialColumnHeightFinder::examineLine(const RootInlineBox& line) {
238 LayoutUnit lineTop = line.lineTopWithLeading(); 238 LayoutUnit lineTop = line.lineTopWithLeading();
239 LayoutUnit lineTopInFlowThread = flowThreadOffset() + lineTop; 239 LayoutUnit lineTopInFlowThread = flowThreadOffset() + lineTop;
240 LayoutUnit minimumLogialHeight = 240 LayoutUnit minimumLogialHeight =
241 columnLogicalHeightRequirementForLine(line.block().styleRef(), line); 241 columnLogicalHeightRequirementForLine(line.block().styleRef(), line);
242 if (lineTopInFlowThread < LayoutUnit()) 242 if (lineTopInFlowThread < LayoutUnit())
243 minimumLogialHeight += lineTopInFlowThread; 243 minimumLogialHeight += lineTopInFlowThread;
244 m_tallestUnbreakableLogicalHeight = 244 m_tallestUnbreakableLogicalHeight =
245 std::max(m_tallestUnbreakableLogicalHeight, minimumLogialHeight); 245 std::max(m_tallestUnbreakableLogicalHeight, minimumLogialHeight);
246 DCHECK(
247 isFirstAfterBreak(lineTopInFlowThread) || !line.paginationStrut() ||
248 !isLogicalTopWithinBounds(lineTopInFlowThread - line.paginationStrut()));
249 if (isFirstAfterBreak(lineTopInFlowThread) && 246 if (isFirstAfterBreak(lineTopInFlowThread) &&
250 m_lastBreakSeen != lineTopInFlowThread) { 247 m_lastBreakSeen != lineTopInFlowThread) {
251 m_lastBreakSeen = lineTopInFlowThread; 248 m_lastBreakSeen = lineTopInFlowThread;
252 recordStrutBeforeOffset(lineTopInFlowThread, line.paginationStrut()); 249 recordStrutBeforeOffset(lineTopInFlowThread, line.paginationStrut());
253 } 250 }
254 } 251 }
255 252
256 void InitialColumnHeightFinder::recordStrutBeforeOffset( 253 void InitialColumnHeightFinder::recordStrutBeforeOffset(
257 LayoutUnit offsetInFlowThread, 254 LayoutUnit offsetInFlowThread,
258 LayoutUnit strut) { 255 LayoutUnit strut) {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 if (group.columnLogicalTopForOffset(lineTopInFlowThread) != 487 if (group.columnLogicalTopForOffset(lineTopInFlowThread) !=
491 group.columnLogicalTopForOffset(lineBottomWithOverflow)) { 488 group.columnLogicalTopForOffset(lineBottomWithOverflow)) {
492 LayoutUnit shortage = 489 LayoutUnit shortage =
493 lineBottomWithOverflow - 490 lineBottomWithOverflow -
494 group.columnLogicalTopForOffset(lineBottomWithOverflow); 491 group.columnLogicalTopForOffset(lineBottomWithOverflow);
495 recordSpaceShortage(shortage); 492 recordSpaceShortage(shortage);
496 } 493 }
497 } 494 }
498 495
499 } // namespace blink 496 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/multicol/nested-with-wrapped-flexbox-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698