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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp

Issue 1492143002: Add support for printing multicol containers, and enable it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
index b316cf8f4c96eb78251cd144fb91ddd1e9d1266e..e49a81260623b834fd042f45c84bdf71153b451f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
@@ -101,8 +101,8 @@ bool LayoutMultiColumnSet::isPageLogicalHeightKnown() const
LayoutUnit LayoutMultiColumnSet::nextLogicalTopForUnbreakableContent(LayoutUnit flowThreadOffset, LayoutUnit contentLogicalHeight) const
{
ASSERT(pageLogicalTopForOffset(flowThreadOffset) == flowThreadOffset);
- LayoutMultiColumnFlowThread* enclosingFlowThread = multiColumnFlowThread()->enclosingFlowThread();
- if (!enclosingFlowThread) {
+ FragmentationContext* enclosingFragmentationContext = multiColumnFlowThread()->enclosingFragmentationContext();
+ if (!enclosingFragmentationContext) {
// If there's no enclosing fragmentation context, there'll ever be only one row, and all
// columns there will have the same height.
return flowThreadOffset;
@@ -119,7 +119,7 @@ LayoutUnit LayoutMultiColumnSet::nextLogicalTopForUnbreakableContent(LayoutUnit
LayoutUnit firstRowLogicalBottomInFlowThread = firstRow.logicalTopInFlowThread() + firstRow.logicalHeight() * usedColumnCount();
if (flowThreadOffset >= firstRowLogicalBottomInFlowThread)
return flowThreadOffset; // We're not in the first row. Give up.
- LayoutUnit newLogicalHeight = enclosingFlowThread->pageLogicalHeightForOffset(firstRowLogicalBottomInFlowThread);
+ LayoutUnit newLogicalHeight = enclosingFragmentationContext->fragmentainerLogicalHeightAt(firstRowLogicalBottomInFlowThread);
if (contentLogicalHeight > newLogicalHeight) {
// The next outer column or page doesn't have enough space either. Give up and stay where
// we are.
@@ -255,7 +255,7 @@ LayoutUnit LayoutMultiColumnSet::pageLogicalTopForOffset(LayoutUnit offset) cons
bool LayoutMultiColumnSet::recalculateColumnHeight()
{
- if (m_oldLogicalTop != logicalTop() && multiColumnFlowThread()->enclosingFlowThread()) {
+ if (m_oldLogicalTop != logicalTop() && multiColumnFlowThread()->enclosingFragmentationContext()) {
// Preceding spanners or column sets have been moved or resized. This means that the
// fragmentainer groups that we have inserted need to be re-inserted. Restart column
// balancing.

Powered by Google App Engine
This is Rietveld 408576698