author | Ting-Yu Lin <tlin@mozilla.com> |
Thu, 03 Oct 2019 17:26:06 +0000 | |
changeset 496211 | 5921da6981097a5b1cb16335a0d7d22136239693 |
parent 496210 | 614dba91c0b17f628c5e32021c6cbb768bd2ac94 |
child 496212 | eaa0c1e72e51139f37dd0486c15753b71e33c1fd |
push id | 36647 |
push user | nerli@mozilla.com |
push date | Fri, 04 Oct 2019 04:09:18 +0000 |
treeherder | mozilla-central@678d4d2c3c4d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | dbaron |
bugs | 1579565 |
milestone | 71.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/generic/nsSplittableFrame.cpp +++ b/layout/generic/nsSplittableFrame.cpp @@ -222,36 +222,41 @@ nsIFrame::LogicalSides nsSplittableFrame LogicalSides skip; if (GetPrevContinuation()) { skip |= eLogicalSideBitsBStart; } if (aReflowInput) { // We're in the midst of reflow right now, so it's possible that we haven't - // created a nif yet. If our content height is going to exceed our available - // height, though, then we're going to need a next-in-flow, it just hasn't - // been created yet. - + // created a next-in-flow yet. If our content block-size is going to exceed + // our available block-size, though, then we're going to need a + // next-in-flow, it just hasn't been created yet. if (NS_UNCONSTRAINEDSIZE != aReflowInput->AvailableBSize()) { - nscoord effectiveCH = this->GetEffectiveComputedBSize(*aReflowInput); - if (effectiveCH != NS_UNCONSTRAINEDSIZE && - effectiveCH > aReflowInput->AvailableBSize()) { - // Our content height is going to exceed our available height, so we're - // going to need a next-in-flow. + nscoord effectiveBSize = GetEffectiveComputedBSize(*aReflowInput); + if (effectiveBSize != NS_UNCONSTRAINEDSIZE && + effectiveBSize > aReflowInput->AvailableBSize()) { + // Our computed block-size is going to exceed our available block-size, + // so we're going to need a next-in-flow. skip |= eLogicalSideBitsBEnd; } } } else { nsIFrame* nif = GetNextContinuation(); if (nif && !IS_TRUE_OVERFLOW_CONTAINER(nif)) { skip |= eLogicalSideBitsBEnd; } } + // Always skip block-end side if we have a *later* sibling across column-span + // split. + if (HasColumnSpanSiblings()) { + skip |= eLogicalSideBitsBEnd; + } + return skip; } LogicalSides nsSplittableFrame::PreReflowBlockLevelLogicalSkipSides() const { if (MOZ_UNLIKELY(IS_TRUE_OVERFLOW_CONTAINER(this))) { return LogicalSides(mozilla::eLogicalSideBitsBBoth); } if (MOZ_LIKELY(StyleBorder()->mBoxDecorationBreak !=
new file mode 100644 --- /dev/null +++ b/testing/web-platform/meta/css/css-multicol/multicol-span-all-children-height-008.html.ini @@ -0,0 +1,2 @@ +[multicol-span-all-children-height-008.html] + prefs: [layout.css.column-span.enabled:true]
new file mode 100644 --- /dev/null +++ b/testing/web-platform/tests/css/css-multicol/multicol-span-all-children-height-008-ref.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<html> + <meta charset="utf-8"> + <title>CSS Multi-column Layout Test Reference: Test the borders drawing for a block split by column-span</title> + <link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> + + <style> + article { + column-count: 1; + column-fill: auto; + width: 200px; + background-color: lightgreen; + } + div.container { + height: auto; + background-color: pink; + border: 20px solid purple; + } + div.block { + width: 100px; + height: 100px; + background-color: yellow; + } + div.column-span { + width: 200px; + height: 50px; + background-color: lightblue; + } + </style> + + <article> + <div class="container" style="border-bottom: 0;"> + <div class="block">block1</div> + </div> + </article> + <div class="column-span">column-span1</div> + <article> + <div class="container" style="border-top: 0; border-bottom: 0;"> + <div class="block">block2</div> + </div> + </article> + <div class="column-span">column-span2</div> + <article> + <div class="container" style="border-top: 0;"> + <div class="block">block3</div> + </div> + </article> +</html>
new file mode 100644 --- /dev/null +++ b/testing/web-platform/tests/css/css-multicol/multicol-span-all-children-height-008.html @@ -0,0 +1,46 @@ +<!DOCTYPE html> +<html> + <meta charset="utf-8"> + <title>CSS Multi-column Layout Test: Test the borders drawing for a block split by column-span</title> + <link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> + <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span"> + <link rel="match" href="multicol-span-all-children-height-008-ref.html"> + <meta name="assert" content="This test verifies that the borders of block container with an auto block-size, split by column-span, are skipped on the sides adjacent to column-span."> + + <!-- This test is adapted from multicol-span-all-children-height-005. --> + + <style> + article { + column-count: 1; + column-fill: auto; + width: 200px; + background-color: lightgreen; + } + div.container { + height: auto; + border: 20px solid purple; + background-color: pink; + } + div.block { + width: 100px; + height: 100px; + background-color: yellow; + } + div.column-span { + column-span: all; + height: 50px; + background-color: lightblue; + } + </style> + + <article> + <div class="container"> + <div class="block">block1</div> + <div class="column-span">column-span1</div> + <div class="block">block2</div> + <div class="column-span">column-span2</div> + <div class="block">block3</div> + </div> + </article> +</html>