зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1569701 Part 2 - Use ColumnSetWrapper's effective computed content block-size to impose constraint for ColumnSet. r=dbaron
Run broken-column-rule-1.html with column-span enabled because it was regressed by Bug 1548100 Part 2, but fixed by this patch. Differential Revision: https://phabricator.services.mozilla.com/D41907 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0bc5f5330e
Коммит
206960605d
|
@ -575,4 +575,4 @@ pref(layout.css.resizeobserver.enabled,true) load 1548057.html
|
||||||
pref(layout.css.column-span.enabled,true) load 1549867.html
|
pref(layout.css.column-span.enabled,true) load 1549867.html
|
||||||
load 1553874.html
|
load 1553874.html
|
||||||
load 1560328.html
|
load 1560328.html
|
||||||
pref(layout.css.column-span.enabled,true) load 1566672.html
|
asserts(1-1) pref(layout.css.column-span.enabled,true) load 1566672.html # bug 1573759
|
||||||
|
|
|
@ -3580,14 +3580,16 @@ void nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
|
||||||
availSize.BSize(wm) -= aState.BorderPadding().BEnd(wm);
|
availSize.BSize(wm) -= aState.BorderPadding().BEnd(wm);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bug 1569701: We need to use GetEffectiveComputedBSize() to get
|
|
||||||
// correct block-size if ColumnSetWrapper is fragmented.
|
|
||||||
nscoord contentBSize = aState.mReflowInput.ComputedBSize();
|
nscoord contentBSize = aState.mReflowInput.ComputedBSize();
|
||||||
if (aState.mReflowInput.ComputedMaxBSize() != NS_UNCONSTRAINEDSIZE) {
|
if (aState.mReflowInput.ComputedMaxBSize() != NS_UNCONSTRAINEDSIZE) {
|
||||||
contentBSize =
|
contentBSize =
|
||||||
std::min(contentBSize, aState.mReflowInput.ComputedMaxBSize());
|
std::min(contentBSize, aState.mReflowInput.ComputedMaxBSize());
|
||||||
}
|
}
|
||||||
if (contentBSize != NS_UNCONSTRAINEDSIZE) {
|
if (contentBSize != NS_UNCONSTRAINEDSIZE) {
|
||||||
|
// To get the remaining content block-size, subtract the content
|
||||||
|
// block-size consumed by our previous continuations.
|
||||||
|
contentBSize -= aState.mConsumedBSize;
|
||||||
|
|
||||||
// ColumnSet is not the outermost frame in the column container, so it
|
// ColumnSet is not the outermost frame in the column container, so it
|
||||||
// cannot have any margin. We don't need to consider any margin that
|
// cannot have any margin. We don't need to consider any margin that
|
||||||
// can be generated by "box-decoration-break: clone" as we do in
|
// can be generated by "box-decoration-break: clone" as we do in
|
||||||
|
|
|
@ -938,15 +938,6 @@ nsColumnSetFrame::ColumnBalanceData nsColumnSetFrame::ReflowChildren(
|
||||||
// edge of the multicol container.
|
// edge of the multicol container.
|
||||||
contentSize.BSize(wm) =
|
contentSize.BSize(wm) =
|
||||||
std::max(contentSize.BSize(wm), aReflowInput.AvailableBSize());
|
std::max(contentSize.BSize(wm), aReflowInput.AvailableBSize());
|
||||||
|
|
||||||
// But don't consume more block-size than what is left in the
|
|
||||||
// ColumnSetWrapper.
|
|
||||||
//
|
|
||||||
// Bug 1569701: If we use the effective computed block-size of
|
|
||||||
// ColumnSetWrapper when creating BlockReflowInput for ColumnSet, the
|
|
||||||
// available block-size should always less than or equal to the effective
|
|
||||||
// computed block-size. This std::min() won't be needed.
|
|
||||||
contentSize.BSize(wm) = std::min(contentSize.BSize(wm), computedBSize);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Apply computed and min/max values
|
// Apply computed and min/max values
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
== broken-column-rule-1.html broken-column-rule-1-ref.html
|
== broken-column-rule-1.html broken-column-rule-1-ref.html
|
||||||
== moz-multicol3-column-balancing-break-inside-avoid-1.html moz-multicol3-column-balancing-break-inside-avoid-1-ref.html
|
== moz-multicol3-column-balancing-break-inside-avoid-1.html moz-multicol3-column-balancing-break-inside-avoid-1-ref.html
|
||||||
== multicol-height-002.xht reference/multicol-height-002.xht
|
== multicol-height-002.xht reference/multicol-height-002.xht
|
||||||
|
|
||||||
|
# The following lines are duplicates of other lines from further up in this
|
||||||
|
# manifest. They're listed again here so we can re-run these tests with
|
||||||
|
# column-span enabled. These lines can be removed once the pref becomes
|
||||||
|
# default-enabled (Bug 1426010).
|
||||||
|
pref(layout.css.column-span.enabled,true) == broken-column-rule-1.html broken-column-rule-1-ref.html
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[multicol-rule-nested-balancing-003.html]
|
||||||
|
prefs: [layout.css.column-span.enabled:true]
|
|
@ -0,0 +1,41 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Multi-column Layout Test Reference: Test the column rules' block-size with nested balancing multicol container</title>
|
||||||
|
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
|
||||||
|
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.outer {
|
||||||
|
column-count: 2;
|
||||||
|
column-rule: 6px solid black;
|
||||||
|
column-fill: auto;
|
||||||
|
width: 400px;
|
||||||
|
height: 250px;
|
||||||
|
}
|
||||||
|
.inner {
|
||||||
|
column-count: 2;
|
||||||
|
column-rule: 3px solid gray;
|
||||||
|
column-fill: auto;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
.inner-block {
|
||||||
|
background-color: lightblue;
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
.space {
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<article class="outer">
|
||||||
|
<article class="inner">
|
||||||
|
<div class="inner-block"></div>
|
||||||
|
</article>
|
||||||
|
<div class="space"></div>
|
||||||
|
<article class="inner">
|
||||||
|
<div class="inner-block"></div>
|
||||||
|
</article>
|
||||||
|
<div class="space"></div>
|
||||||
|
</article>
|
||||||
|
</html>
|
|
@ -0,0 +1,36 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Multi-column Layout Test: Test the column rules' block-size with nested balancing multicol container</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/#cf">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-gaps-and-rules">
|
||||||
|
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/2309">
|
||||||
|
<link rel="match" href="multicol-rule-nested-balancing-003-ref.html">
|
||||||
|
<meta name="assert" content="This test verifies that the column-rules are extended to the content block-end edges of their corresponding inner and outer multicol container.">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.outer {
|
||||||
|
column-count: 2;
|
||||||
|
column-rule: 6px solid black;
|
||||||
|
width: 400px;
|
||||||
|
height: 250px;
|
||||||
|
}
|
||||||
|
.inner {
|
||||||
|
column-count: 2;
|
||||||
|
column-rule: 3px solid gray;
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
.inner-block {
|
||||||
|
background-color: lightblue;
|
||||||
|
height: 800px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<article class="outer">
|
||||||
|
<article class="inner">
|
||||||
|
<div class="inner-block"></div>
|
||||||
|
</article>
|
||||||
|
</article>
|
||||||
|
</html>
|
Загрузка…
Ссылка в новой задаче