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

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

Issue 2729903003: Isolate strictly unbreakable multicol containers that are nested. (Closed)
Patch Set: Created 3 years, 9 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/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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 // fragmentation contexts. They are to be treated as unbreakable content. 605 // fragmentation contexts. They are to be treated as unbreakable content.
606 return nullptr; 606 return nullptr;
607 } 607 }
608 if (multiColumnBlockFlow()->isInsideFlowThread()) 608 if (multiColumnBlockFlow()->isInsideFlowThread())
609 return toLayoutMultiColumnFlowThread( 609 return toLayoutMultiColumnFlowThread(
610 locateFlowThreadContainingBlockOf(*multiColumnBlockFlow())); 610 locateFlowThreadContainingBlockOf(*multiColumnBlockFlow()));
611 return nullptr; 611 return nullptr;
612 } 612 }
613 613
614 FragmentationContext* 614 FragmentationContext*
615 LayoutMultiColumnFlowThread::enclosingFragmentationContext() const { 615 LayoutMultiColumnFlowThread::enclosingFragmentationContext(
616 if (LayoutMultiColumnFlowThread* enclosingFlowThread = 616 AncestorSearchConstraint constraint) const {
617 this->enclosingFlowThread()) 617 // If this multicol container is strictly unbreakable (due to having
618 // scrollbars, for instance), it's also strictly unbreakable in any outer
619 // fragmentation context. As such, what kind of fragmentation that goes on
620 // inside this multicol container is completely opaque to the ancestors.
621 if (constraint == IsolateUnbreakableContainers &&
622 multiColumnBlockFlow()->getPaginationBreakability() == ForbidBreaks)
623 return nullptr;
624 if (auto* enclosingFlowThread = this->enclosingFlowThread())
618 return enclosingFlowThread; 625 return enclosingFlowThread;
619 return view()->fragmentationContext(); 626 return view()->fragmentationContext();
620 } 627 }
621 628
622 void LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded( 629 void LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded(
623 LayoutUnit offsetInFlowThread, 630 LayoutUnit offsetInFlowThread,
624 PageBoundaryRule pageBoundaryRule) { 631 PageBoundaryRule pageBoundaryRule) {
625 LayoutMultiColumnSet* columnSet = 632 LayoutMultiColumnSet* columnSet =
626 columnSetAtBlockOffset(offsetInFlowThread, pageBoundaryRule); 633 columnSetAtBlockOffset(offsetInFlowThread, pageBoundaryRule);
627 if (!columnSet->newFragmentainerGroupsAllowed()) 634 if (!columnSet->newFragmentainerGroupsAllowed())
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 const { 1377 const {
1371 return MultiColumnLayoutState(m_lastSetWorkedOn); 1378 return MultiColumnLayoutState(m_lastSetWorkedOn);
1372 } 1379 }
1373 1380
1374 void LayoutMultiColumnFlowThread::restoreMultiColumnLayoutState( 1381 void LayoutMultiColumnFlowThread::restoreMultiColumnLayoutState(
1375 const MultiColumnLayoutState& state) { 1382 const MultiColumnLayoutState& state) {
1376 m_lastSetWorkedOn = state.columnSet(); 1383 m_lastSetWorkedOn = state.columnSet();
1377 } 1384 }
1378 1385
1379 } // namespace blink 1386 } // 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