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

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

Issue 1503003002: Paginated containers are opaque to enclosing fragmentation contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ColumnBalancer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e073f78a84b14ccc67814990d484ab39f2a8d492..b99ee7b7d3b7379ca7611512823a823f7dd33423 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -436,6 +436,11 @@ bool LayoutMultiColumnFlowThread::removeSpannerPlaceholderIfNoLongerValid(Layout
LayoutMultiColumnFlowThread* LayoutMultiColumnFlowThread::enclosingFlowThread() const
{
+ if (isLayoutPagedFlowThread()) {
+ // Paged overflow containers should never be fragmented by enclosing fragmentation
+ // contexts. They are to be treated as unbreakable content.
+ return nullptr;
+ }
if (multiColumnBlockFlow()->isInsideFlowThread())
return toLayoutMultiColumnFlowThread(locateFlowThreadContainingBlockOf(*multiColumnBlockFlow()));
return nullptr;
@@ -470,7 +475,7 @@ void LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded(LayoutUnit
FragmentationContext* enclosingFragmentationContext = this->enclosingFragmentationContext();
if (!enclosingFragmentationContext)
return; // Not nested. We'll never need more rows than the one we already have then.
-
+ ASSERT(!isLayoutPagedFlowThread());
// We have run out of columns here, so we add another row to hold more columns. When we add
// a new row, it implicitly means that we're inserting another column in our enclosing
// multicol container. That in turn may mean that we've run out of columns there too.
« no previous file with comments | « third_party/WebKit/Source/core/layout/ColumnBalancer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698