Bug 1467656 [wpt PR 11392] - Correctly detect when a multicol descendant becomes or ceases to be a containing block., a=testonly

Automatic update from web-platform-testsCorrectly detect when a multicol descendant becomes or ceases to be a containing block.

When a descendant of a multicol container becomes a containing block for
out-of-flow positioned objects, or ceases to be one, out-of-flow
positioned children may become or cease to be a part of the
fragmentation context.

We didn't detect this correctly. We only checked for transforms (in
addition to position:relative). Make sure we check for filters too, now
that those also establish containing blocks.

Bug: 847328
Change-Id: I7ab47860bb8d9f8d9b0256b25e1123c34f73e8f4
Reviewed-on: https://chromium-review.googlesource.com/1089336
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565210}

--

wpt-commits: bc87c81f9e1cf32934c69921aaa37104a850ed5c
wpt-pr: 11392
This commit is contained in:
Morten Stenshorne 2018-06-26 03:01:05 +00:00
Родитель f2f7f99172
Коммит 09464414b6
2 изменённых файлов: 37 добавлений и 0 удалений

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

@ -318330,6 +318330,12 @@
{}
]
],
"css/css-multicol/filter-with-abspos.html": [
[
"/css/css-multicol/filter-with-abspos.html",
{}
]
],
"css/css-multicol/going-out-of-flow-after-spanner.html": [
[
"/css/css-multicol/going-out-of-flow-after-spanner.html",
@ -519297,6 +519303,10 @@
"43a6f9e055b908a42b5811d6ce5e48acf8c9ed08",
"testharness"
],
"css/css-multicol/filter-with-abspos.html": [
"099f4ae1562f9ba2908bfb8dfcb0a5c9afc8b423",
"testharness"
],
"css/css-multicol/float-and-block.html": [
"435614e6d5dcdbd8325687f70014bea0e3dea5f7",
"reftest"

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

@ -0,0 +1,27 @@
<!DOCTYPE html>
<title>Filtered block becomes containing block of absolutely positioned child</title>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-1/#FilterProperty" title="5. Graphic filters: the filter property">
<meta name="assert" content="A filtered block will be a containing block for absolutely positioned descendants. If all this takes place inside a multicol container, this means that the absolutely positioned box also has the multicol container in its containing block, which means that it should be fragmented.">
<div id="multicol" style="columns:2;">
<div id="container" style="height:100px;">
<!-- The spanner is here to trigger the crash in crbug.com/847328 -->
<div style="column-span:all;"></div>
<div id="abspos" style="position:absolute; height:100px;"></div>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
let container = document.getElementById("container");
let abspos = document.getElementById("abspos");
document.body.offsetTop;
assert_equals(abspos.getBoundingClientRect().height, 100);
container.style.filter = "opacity(0.5)";
assert_equals(abspos.getBoundingClientRect().height, 50);
// The last step will cause a crash if crbug.com/847328 is present
document.body.offsetTop;
abspos.style.display = "none";
}, "Making a container filtered, and then removing an abspos child");
</script>