summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-anchor-position/anchor-scroll-composited-scrolling-001-crash.html
blob: 4dd9bad60eae27737e7b69739dc8f6629204c8bb (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
<!DOCTYPE html>
<title>Tests that scrolling doesn't crash renderer when anchor is in a scroller whose content doesn't overflow</title>
<link rel="author" href="mailto:xiaochengh@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
<style>
#container {
  position: relative;
}

#scroller {
  overflow: scroll;
  width: 400px;
  height: 400px;
}

#anchor {
  anchor-name: --a;
  margin: 100px;
  width: 100px;
  height: 100px;
  background: green;
}

#anchored {
  position: absolute;
  position-anchor: --a;
  left: anchor(--a left);
  bottom: anchor(--a top);
  width: 100px;
  height: 100px;
  background: orange;
}

</style>

<div id="container">
  <div id="scroller">
    <div id="anchor">anchor</div>
  </div>
  <div id="anchored">anchored</div>
</div>