mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 14:20:14 +02:00
The major change in this patch is ::-moz-column-span-wrapper blocks are no longer linked into the continuation chains when they're created in CreateColumnSpanSiblings(). We can do that because ::-moz-column-span-wrapper is an non-inheriting anon box, which doesn't need to be restyled. This prevents RestyleManager::ProcessPostTraversal or nsIFrame::UpdateStyleOfOwnedChildFrame, which set the same style on all continuations of the frame they are working with, from overriding the ::-moz-column-span-wrapper style. GetNextContinuationWithSameStyle was deleted in bug 1447367. Delete the comment in nsInlineFrame::UpdateStyleOfOwnedAnonBoxesForIBSplit() to avoid confusion. This patch also adds another condition to reframe the multi-column container in MaybeRecreateContainerForFrameRemoval(). That condition is when an element has a "column-span:all" descendant, i.e. the element's frame has "column-span:all" siblings (which is created by CreateColumnSpanSiblings). The added test multicol-span-all-dynamic-remove-006.html will fail without this patch. Depends on D5212 Differential Revision: https://phabricator.services.mozilla.com/D9988 --HG-- extra : moz-landing-system : lando
44 lines
1.2 KiB
HTML
44 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<meta charset="utf-8">
|
|
<title>CSS Multi-column Layout Test: Remove the parent of a column-spanner</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/#column-span">
|
|
<link rel="match" href="multicol-span-all-dynamic-remove-001-ref.html">
|
|
<meta name="assert" content="This test checks removing the parent of a column-spanner should be rendered correctly.">
|
|
|
|
<script>
|
|
function runTest() {
|
|
document.body.offsetHeight;
|
|
|
|
document.getElementById("block").remove();
|
|
|
|
document.documentElement.removeAttribute("class");
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
#column {
|
|
column-count: 3;
|
|
column-rule: 6px solid;
|
|
width: 400px;
|
|
outline: 1px solid black;
|
|
}
|
|
h3 {
|
|
column-span: all;
|
|
outline: 1px solid blue;
|
|
}
|
|
</style>
|
|
|
|
<body onload="runTest();">
|
|
<article id="column">
|
|
<div>block1</div>
|
|
<div id="block">
|
|
<h3>inner spanner</h3>
|
|
<div>inner block</div>
|
|
</div>
|
|
<div>block2</div>
|
|
</article>
|
|
</body>
|
|
</html>
|