Bug 1566672 - Handle the {ib}-split reframing in multicol subtree properly. r=dholbert

Delete `return false` at the end of the if-statement block that handling
the multicol subtree reframing, and let it fall though the bottom of
WipeContainingBlock() where there is a complete logic for ib-split
reframing.

Differential Revision: https://phabricator.services.mozilla.com/D38548

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ting-Yu Lin 2019-07-19 19:38:05 +00:00
Родитель eddd2fd9aa
Коммит af311f8f6e
6 изменённых файлов: 97 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,20 @@
<style>
html, body, q, ul { columns: 4 }
.x { height: 600px; }
</style>
<script>
function go() {
c.appendChild(d)
}
</script>
<body onload=go()>
<q id="c" style="word-break: break-all">
<form hidden="hidden">
<output id="d">
<ul class="x">
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
</ul>
</output>
</form>
</q>
</body>

Просмотреть файл

@ -575,3 +575,4 @@ pref(layout.css.resizeobserver.enabled,true) load 1548057.html
pref(layout.css.column-span.enabled,true) load 1549867.html
load 1553874.html
load 1560328.html
pref(layout.css.column-span.enabled,true) load 1566672.html

Просмотреть файл

@ -11632,7 +11632,9 @@ bool nsCSSFrameConstructor::WipeContainingBlock(
return true;
}
return false;
// If we get here, then we need further check for {ib} split to decide
// whether to reframe. For example, appending a block into an empty inline
// that is not part of an {ib} split, but should become an {ib} split.
}
// Now we have several cases involving {ib} splits. Put them all in a

Просмотреть файл

@ -0,0 +1,2 @@
[multicol-dynamic-add-001.html]
prefs: [layout.css.column-span.enabled:true]

Просмотреть файл

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>CSS Multi-column Layout Test: Append a block to an empty inline element</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<style>
#column {
column-count: 3;
column-rule: 6px solid;
width: 400px;
outline: 1px solid black;
}
div {
height: 300px;
background-color: yellow;
}
</style>
<body>
<article id="column">
<span id="span"><div>block</div></span>
</article>
</body>
</html>

Просмотреть файл

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Multi-column Layout Test: Append a block to an empty inline element</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-multicol-1/#cf">
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#anonymous-block-level">
<link rel="match" href="multicol-dynamic-add-001-ref.html">
<meta name="assert" content="This test checks that the block appended into an inline element should perform correct block-in-inline splitting, and balance the block's height into three columns.">
<script>
function runTest() {
document.body.offsetHeight;
/* Append a block to the inline element. */
var block = document.createElement("div");
var text = document.createTextNode("block");
block.appendChild(text);
var span = document.getElementById("span");
span.appendChild(block);
document.documentElement.removeAttribute("class");
}
</script>
<style>
#column {
column-count: 3;
column-rule: 6px solid;
width: 400px;
outline: 1px solid black;
}
div {
height: 300px;
background-color: yellow;
}
</style>
<body onload="runTest();">
<article id="column">
<span id="span"><!-- block will be added here. --></span>
</article>
</body>
</html>