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

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

Issue 2562273003: Disable layout optimization when column height may be non-uniform. (Closed)
Patch Set: Created 4 years 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/Source/core/layout/LayoutMultiColumnFlowThread.h ('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 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 calculateColumnCountAndWidth(newWidth, dummyColumnCount); 358 calculateColumnCountAndWidth(newWidth, dummyColumnCount);
359 return newWidth != logicalWidth(); 359 return newWidth != logicalWidth();
360 } 360 }
361 361
362 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const { 362 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const {
363 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) 363 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet())
364 return columnSet->isPageLogicalHeightKnown(); 364 return columnSet->isPageLogicalHeightKnown();
365 return false; 365 return false;
366 } 366 }
367 367
368 bool LayoutMultiColumnFlowThread::mayHaveNonUniformPageLogicalHeight() const {
369 const LayoutMultiColumnSet* columnSet = firstMultiColumnSet();
370 if (!columnSet)
371 return false;
372 if (columnSet->nextSiblingMultiColumnSet())
373 return true;
374 return enclosingFragmentationContext();
375 }
376
368 LayoutSize LayoutMultiColumnFlowThread::flowThreadTranslationAtOffset( 377 LayoutSize LayoutMultiColumnFlowThread::flowThreadTranslationAtOffset(
369 LayoutUnit offsetInFlowThread, 378 LayoutUnit offsetInFlowThread,
370 PageBoundaryRule rule, 379 PageBoundaryRule rule,
371 CoordinateSpaceConversion mode) const { 380 CoordinateSpaceConversion mode) const {
372 if (!hasValidColumnSetInfo()) 381 if (!hasValidColumnSetInfo())
373 return LayoutSize(0, 0); 382 return LayoutSize(0, 0);
374 LayoutMultiColumnSet* columnSet = 383 LayoutMultiColumnSet* columnSet =
375 columnSetAtBlockOffset(offsetInFlowThread, rule); 384 columnSetAtBlockOffset(offsetInFlowThread, rule);
376 if (!columnSet) 385 if (!columnSet)
377 return LayoutSize(0, 0); 386 return LayoutSize(0, 0);
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 const { 1355 const {
1347 return MultiColumnLayoutState(m_lastSetWorkedOn); 1356 return MultiColumnLayoutState(m_lastSetWorkedOn);
1348 } 1357 }
1349 1358
1350 void LayoutMultiColumnFlowThread::restoreMultiColumnLayoutState( 1359 void LayoutMultiColumnFlowThread::restoreMultiColumnLayoutState(
1351 const MultiColumnLayoutState& state) { 1360 const MultiColumnLayoutState& state) {
1352 m_lastSetWorkedOn = state.columnSet(); 1361 m_lastSetWorkedOn = state.columnSet();
1353 } 1362 }
1354 1363
1355 } // namespace blink 1364 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698