#include "third_party/blink/renderer/core/layout/column_layout_algorithm.h"
#include "third_party/blink/renderer/core/layout/base_layout_algorithm_test.h"
#include "third_party/blink/renderer/core/layout/block_layout_algorithm.h"
#include "third_party/blink/renderer/core/layout/length_utils.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
namespace blink {
namespace {
class ColumnLayoutAlgorithmTest : public BaseLayoutAlgorithmTest { … };
TEST_F(ColumnLayoutAlgorithmTest, EmptyEditable) { … }
TEST_F(ColumnLayoutAlgorithmTest, EmptyEditableWithFloat) { … }
TEST_F(ColumnLayoutAlgorithmTest, EmptyMulticol) { … }
TEST_F(ColumnLayoutAlgorithmTest, EmptyBlock) { … }
TEST_F(ColumnLayoutAlgorithmTest, BlockInOneColumn) { … }
TEST_F(ColumnLayoutAlgorithmTest, ZeroHeightBlockAtFragmentainerBoundary) { … }
TEST_F(ColumnLayoutAlgorithmTest, BlockInTwoColumns) { … }
TEST_F(ColumnLayoutAlgorithmTest, BlockInThreeColumns) { … }
TEST_F(ColumnLayoutAlgorithmTest, ActualColumnCountGreaterThanSpecified) { … }
TEST_F(ColumnLayoutAlgorithmTest, TwoBlocksInTwoColumns) { … }
TEST_F(ColumnLayoutAlgorithmTest, ZeroHeight) { … }
TEST_F(ColumnLayoutAlgorithmTest, ZeroHeightWithContent) { … }
TEST_F(ColumnLayoutAlgorithmTest, OverflowedBlock) { … }
TEST_F(ColumnLayoutAlgorithmTest, OverflowedBlock2) { … }
TEST_F(ColumnLayoutAlgorithmTest, OverflowedBlock3) { … }
TEST_F(ColumnLayoutAlgorithmTest, UnusedSpaceInBlock) { … }
TEST_F(ColumnLayoutAlgorithmTest, FloatInOneColumn) { … }
TEST_F(ColumnLayoutAlgorithmTest, TwoFloatsInOneColumn) { … }
TEST_F(ColumnLayoutAlgorithmTest, TwoFloatsInTwoColumns) { … }
TEST_F(ColumnLayoutAlgorithmTest, FloatWithForcedBreak) { … }
TEST_F(ColumnLayoutAlgorithmTest, FloatWithMargin) { … }
TEST_F(ColumnLayoutAlgorithmTest, FloatWithMarginBelowFloat) { … }
TEST_F(ColumnLayoutAlgorithmTest, FloatWithLastResortBreak) { … }
TEST_F(ColumnLayoutAlgorithmTest, FloatWithAvoidBreak) { … }
TEST_F(ColumnLayoutAlgorithmTest, FloatWithMarginAndAvoidBreak) { … }
TEST_F(ColumnLayoutAlgorithmTest, UnbreakableFloatBeforeBreakable) { … }
TEST_F(ColumnLayoutAlgorithmTest, BlockWithTopMarginInThreeColumns) { … }
TEST_F(ColumnLayoutAlgorithmTest, BlockStartAtColumnBoundary) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedBlockAfterBlock) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakInsideAvoid) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakInsideAvoidColumn) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakInsideAvoidPage) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakInsideAvoidTallBlock) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedBreakInsideAvoid) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedBreakInsideAvoidTall) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakInsideAvoidAtColumnBoundary) { … }
TEST_F(ColumnLayoutAlgorithmTest, MarginTopPastEndOfFragmentainer) { … }
TEST_F(ColumnLayoutAlgorithmTest, MarginBottomPastEndOfFragmentainer) { … }
TEST_F(ColumnLayoutAlgorithmTest, MarginTopAtEndOfFragmentainer) { … }
TEST_F(ColumnLayoutAlgorithmTest, MarginBottomAtEndOfFragmentainer) { … }
TEST_F(ColumnLayoutAlgorithmTest, LinesInMulticolExtraSpace) { … }
TEST_F(ColumnLayoutAlgorithmTest, LinesInMulticolExactFit) { … }
TEST_F(ColumnLayoutAlgorithmTest, LinesInMulticolChildExtraSpace) { … }
TEST_F(ColumnLayoutAlgorithmTest, LinesInMulticolChildExactFit) { … }
TEST_F(ColumnLayoutAlgorithmTest, LinesInMulticolChildNoSpaceForFirst) { … }
TEST_F(ColumnLayoutAlgorithmTest,
LinesInMulticolChildInsufficientSpaceForFirst) { … }
TEST_F(ColumnLayoutAlgorithmTest, LineAtColumnBoundaryInFirstBlock) { … }
TEST_F(ColumnLayoutAlgorithmTest, LinesAndFloatsMulticol) { … }
TEST_F(ColumnLayoutAlgorithmTest, FloatBelowLastLineInColumn) { … }
TEST_F(ColumnLayoutAlgorithmTest, Orphans) { … }
TEST_F(ColumnLayoutAlgorithmTest, OrphansUnsatisfiable) { … }
TEST_F(ColumnLayoutAlgorithmTest, Widows) { … }
TEST_F(ColumnLayoutAlgorithmTest, WidowsUnsatisfiable) { … }
TEST_F(ColumnLayoutAlgorithmTest, OrphansAndUnsatisfiableWidows) { … }
TEST_F(ColumnLayoutAlgorithmTest, UnsatisfiableOrphansAndWidows) { … }
TEST_F(ColumnLayoutAlgorithmTest, WidowsAndAbspos) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakBetweenLinesNotBefore) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakBetweenLinesNotBefore2) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakBetweenLinesNotBefore3) { … }
TEST_F(ColumnLayoutAlgorithmTest, FloatInBlockMovedByOrphans) { … }
TEST_F(ColumnLayoutAlgorithmTest, FloatMovedWithWidows) { … }
TEST_F(ColumnLayoutAlgorithmTest, BorderAndPadding) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakInsideWithBorder) { … }
TEST_F(ColumnLayoutAlgorithmTest, ForcedBreaks) { … }
TEST_F(ColumnLayoutAlgorithmTest, ForcedBreakInSecondChild) { … }
TEST_F(ColumnLayoutAlgorithmTest, ForcedAndUnforcedBreaksAtSameBoundary) { … }
TEST_F(ColumnLayoutAlgorithmTest, ResumeInsideFormattingContextRoot) { … }
TEST_F(ColumnLayoutAlgorithmTest, NewFcAtColumnBoundary) { … }
TEST_F(ColumnLayoutAlgorithmTest, NewFcWithMargin) { … }
TEST_F(ColumnLayoutAlgorithmTest, NewFcBelowFloat) { … }
TEST_F(ColumnLayoutAlgorithmTest, NewFcWithMarginPastColumnBoundary) { … }
TEST_F(ColumnLayoutAlgorithmTest, MinMax) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancing) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingFixedHeightExactMatch) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingFixedHeightLessContent) { … }
TEST_F(ColumnLayoutAlgorithmTest,
ColumnBalancingFixedHeightOverflowingContent) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingMinHeight) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingMaxHeight) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingMinHeightLargerThanMaxHeight) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingFixedHeightMinHeight) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancing100By3) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingEmpty) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingEmptyBlock) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingSingleLine) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingSingleLineInNested) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingSingleLineInNestedSpanner) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingOverflow) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingLines) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingLinesOrphans) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingLinesForcedBreak) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingLinesForcedBreak2) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingLinesForcedBreak3) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingLinesAvoidBreakInside) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingLinesAvoidBreakInside2) { … }
TEST_F(ColumnLayoutAlgorithmTest, ColumnBalancingUnderflow) { … }
TEST_F(ColumnLayoutAlgorithmTest, ClassCBreakPointBeforeBfc) { … }
TEST_F(ColumnLayoutAlgorithmTest, NoClassCBreakPointBeforeBfc) { … }
TEST_F(ColumnLayoutAlgorithmTest, ClassCBreakPointBeforeBfcWithClearance) { … }
TEST_F(ColumnLayoutAlgorithmTest, ClassCBreakPointBeforeBfcWithMargin) { … }
TEST_F(ColumnLayoutAlgorithmTest, ClassCBreakPointBeforeBlockMarginCollapsing) { … }
TEST_F(ColumnLayoutAlgorithmTest,
NoClassCBreakPointBeforeBlockMarginCollapsing) { … }
TEST_F(ColumnLayoutAlgorithmTest, ClassCBreakPointBeforeLine) { … }
TEST_F(ColumnLayoutAlgorithmTest, ForcedBreakAtClassCBreakPoint) { … }
TEST_F(ColumnLayoutAlgorithmTest, Nested) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedWithEdibleMargin) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedNoInnerContent) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedSomeInnerContent) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedLimitedHeight) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedLimitedHeightWithPadding) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedUnbalancedInnerAutoHeight) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedAtOuterBoundary) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedZeroHeightAtOuterBoundary) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedWithMarginAtOuterBoundary) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedWithTallBorder) { … }
TEST_F(ColumnLayoutAlgorithmTest, NestedWithTallSpanner) { … }
TEST_F(ColumnLayoutAlgorithmTest, AbsposFitsInOneColumn) { … }
TEST_F(ColumnLayoutAlgorithmTest, Spanner) { … }
TEST_F(ColumnLayoutAlgorithmTest, SpannerWithContent) { … }
TEST_F(ColumnLayoutAlgorithmTest, TwoSpannersPercentWidth) { … }
TEST_F(ColumnLayoutAlgorithmTest, SpannerNoBalancing) { … }
TEST_F(ColumnLayoutAlgorithmTest, SpannerAtStart) { … }
TEST_F(ColumnLayoutAlgorithmTest, SpannerAtEnd) { … }
TEST_F(ColumnLayoutAlgorithmTest, SpannerAlone) { … }
TEST_F(ColumnLayoutAlgorithmTest, SpannerInBlock) { … }
TEST_F(ColumnLayoutAlgorithmTest, SpannerWithSiblingsInBlock) { … }
TEST_F(ColumnLayoutAlgorithmTest, SpannerInBlockWithSiblings) { … }
TEST_F(ColumnLayoutAlgorithmTest, SpannerMargins) { … }
TEST_F(ColumnLayoutAlgorithmTest, SpannerMarginsRtl) { … }
TEST_F(ColumnLayoutAlgorithmTest, FixedSizeMulticolWithSpanner) { … }
TEST_F(ColumnLayoutAlgorithmTest, MarginAndBorderTopWithSpanner) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakInsideSpannerWithMargins) { … }
TEST_F(ColumnLayoutAlgorithmTest, InvalidSpanners) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakInsideSpanner) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakInsideSpannerTwice) { … }
TEST_F(ColumnLayoutAlgorithmTest, BreakInsideSpannerWithContent) { … }
TEST_F(ColumnLayoutAlgorithmTest, ForcedBreakBetweenSpanners) { … }
TEST_F(ColumnLayoutAlgorithmTest, ForcedBreakBetweenSpanners2) { … }
TEST_F(ColumnLayoutAlgorithmTest, ForcedBreakBetweenSpanners3) { … }
TEST_F(ColumnLayoutAlgorithmTest, ForcedBreakBetweenSpanners4) { … }
TEST_F(ColumnLayoutAlgorithmTest, ForcedBreakBetweenSpanners5) { … }
TEST_F(ColumnLayoutAlgorithmTest, SoftBreakBetweenSpanners) { … }
TEST_F(ColumnLayoutAlgorithmTest, SoftBreakBetweenSpanners2) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidSoftBreakBetweenSpanners) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidSoftBreakBetweenSpanners2) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidSoftBreakBetweenSpanners3) { … }
TEST_F(ColumnLayoutAlgorithmTest, SoftBreakBetweenRowAndSpanner) { … }
TEST_F(ColumnLayoutAlgorithmTest, SpannerAsMulticol) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetween) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidAndForceBreakBetween) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenInFloat) { … }
TEST_F(ColumnLayoutAlgorithmTest,
IgnoreBreakInsideAvoidBecauseBreakBetweenAvoid) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenAndInsideIgnoreInside) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenAndInside) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenInsideBreakableParent) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenAfterBreakableSibling) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenBreakInsidePreviousSibling) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenHonorOrphansWidows) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenHonorOrphansWidows2) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenHonorOrphansWidows3) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenIgnoreOrphansWidows) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenLinesInsideBreakAvoid) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBetweenBreakAtEarlyClassC) { … }
TEST_F(ColumnLayoutAlgorithmTest, AvoidBreakBeforeBlockReplacedContent) { … }
TEST_F(ColumnLayoutAlgorithmTest, TallReplacedContent) { … }
}
}