Skip to content

Commit d7554a0

Browse files
[GridNG] Disable first tier OOF cache for grid
Grid allows for out-of-flow items to be placed in grid areas, which will impact their size and position. This doesn't work well with the first tier OOF cache, as any changes to the grid can will be out of sync with the first tier OOF cache. The fix here is to disable the first tier OOF cache for grid. Bug: 1247052 Change-Id: I6aa61df23c62de66849c87f7204e598804f99a50 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3150665 Commit-Queue: Kurt Catti-Schmidt <[email protected]> Reviewed-by: Ian Kilpatrick <[email protected]> Cr-Commit-Position: refs/heads/main@{#920037}
1 parent 5060914 commit d7554a0

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang=en>
3+
<meta charset="utf-8">
4+
<title>CSS Grid Layout Test: Grid positioned item dynamic change.</title>
5+
<link rel="help" href="https://drafts.csswg.org/css-grid-2/#abspos">
6+
<style>
7+
.reference {
8+
display: grid;
9+
background: green;
10+
width: 100px;
11+
height: 100px;
12+
}
13+
</style>
14+
<body>
15+
<p>Test passes if it matches the reference.</p>
16+
<div class="reference">
17+
</div>
18+
</body>
19+
</html>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html lang=en>
3+
<meta charset="utf-8">
4+
<title>CSS Grid Layout Test: Grid positioned item dynamic change.</title>
5+
<link rel="help" href="https://drafts.csswg.org/css-grid-2/#abspos">
6+
<link rel="match" href="grid-positioned-item-dynamic-change-006-ref.html">
7+
<meta name="assert" content="This test checks that positioned items update upon dynamic changes.">
8+
<style>
9+
.absolute {
10+
background: green;
11+
position: absolute;
12+
grid-row: 2 / 3;
13+
grid-column: 1 / 2;
14+
top: 0;
15+
bottom: 0;
16+
right: 0;
17+
left: 0;
18+
}
19+
</style>
20+
<body>
21+
<p>Test passes if it matches the reference.</p>
22+
<div style="display: grid; position: relative; width: 100px;">
23+
<div style="background: green;">
24+
<div id="target"></div>
25+
</div>
26+
<div style="background: red; height: 25px;"></div>
27+
<div class="absolute"></div>
28+
</div>
29+
<script>
30+
document.body.offsetTop;
31+
document.getElementById('target').style.height = '75px';
32+
document.documentElement.classList.remove('reftest-wait');
33+
</script>
34+
</body>
35+
</html>

0 commit comments

Comments
 (0)