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

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

Issue 2725943003: Respect constrained height on nested multicol containers. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
index 393400ad54a903deb368a1e189c1de27e40b098c..b084e94fd6606814597542618160dbb150e46873 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -627,19 +627,18 @@ void LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded(
if (!columnSet->newFragmentainerGroupsAllowed())
return;
- if (!columnSet->hasFragmentainerGroupForColumnAt(offsetInFlowThread,
- pageBoundaryRule)) {
- FragmentationContext* enclosingFragmentationContext =
- this->enclosingFragmentationContext();
- // Not nested. We'll never need more rows than the one we already have then.
- if (!enclosingFragmentationContext)
- return;
- ASSERT(!isLayoutPagedFlowThread());
+ if (columnSet->needsNewFragmentainerGroupAt(offsetInFlowThread,
+ pageBoundaryRule)) {
+ // We should never create additional fragmentainer groups unless we're in a
+ // nested fragmentation context.
+ DCHECK(enclosingFragmentationContext());
+
+ DCHECK(!isLayoutPagedFlowThread());
// We have run out of columns here, so we need to add at least one more row
// to hold more columns.
LayoutMultiColumnFlowThread* enclosingFlowThread =
- enclosingFragmentationContext->associatedFlowThread();
+ enclosingFragmentationContext()->associatedFlowThread();
do {
if (enclosingFlowThread) {
// When we add a new row here, it implicitly means that we're inserting
@@ -667,8 +666,8 @@ void LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded(
ASSERT(newRow.logicalHeight() > 0);
if (newRow.logicalHeight() <= 0)
break;
- } while (!columnSet->hasFragmentainerGroupForColumnAt(offsetInFlowThread,
- pageBoundaryRule));
+ } while (columnSet->needsNewFragmentainerGroupAt(offsetInFlowThread,
+ pageBoundaryRule));
}
}

Powered by Google App Engine
This is Rietveld 408576698