blob: d9c87a34a53f17451b0d3ae8c2071971d1df3a94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>CSS Overflow: overflow-clip-margin: invalidation on change</title>
<link rel="help" href="https://www.w3.org/TR/css-overflow-3/#propdef-overflow-clip-margin">
<meta name="assert" content="overflow-clip-margin: toggling should invalidate.">
<link rel="author" title="Scott Violet" href="mailto:sky@chromium.org">
<link rel="match" href="overflow-clip-margin-invalidation-ref.html">
<style>
.container {
display: flex;
}
.parent {
flex: none;
width: 100px;
height: 100px;
flex: none;
overflow: clip;
}
.child {
width: 200px;
height: 200px;
position: relative;
top: -50px;
left: -50px;
background-color: green;
}
.spacer {
flex: none;
height: 100px;
width: 100px;
}
.margin {
overflow-clip-margin: 10px;
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>
</head>
<body>
<div class="spacer"></div>
<div class="container">
<div class="spacer"></div>
<div id="div_with_margin" class="parent margin">
<div class="child"></div>
</div>
<div class="spacer"></div>
<div class="container">
<div class="spacer"></div>
<div id="div_without_margin" class="parent">
<div class="child"></div>
</div>
</body>
<script>
async function runTest() {
document.getElementById('div_with_margin').classList.remove("margin");
document.getElementById('div_without_margin').classList.add("margin");
takeScreenshot();
}
onload = () => {
waitForAtLeastOneFrame().then(() => { runTest() });
}
</script>
</html>
|