summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/overflow/rtl-overflow.html
blob: c7d09f5773d791e09c76d402aee8dbe99e8c8933 (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
<!DOCTYPE html>
<html>
<head>
  <title>Composited overflow scrolling for RTL</title>
  <style>
    .container {
      width: 400px;
      height: 150px;
      overflow: scroll;
      direction: rtl;
    }
    .container::-webkit-scrollbar {
      width: 0;
      height: 0;
    }
    .overflow {
      display: inline-block;
      width: 1000px;
      position: relative;
    }
    .right {
      width: 100px;
      height: 100px;
      position: absolute;
      right: 0;
      background-color: red;
    }
    .left {
      width: 100px;
      height: 100px;
      position: absolute;
      left: 0;
      background-color: blue;
    }
  </style>
</head>
<body>
  <div style="-webkit-transform:translateZ(0);">
    This test succeeds if the two blocks correctly show content scrolled to the rightmost and leftmost respectively.
  </div>
  <div class="container">
    <div class="overflow">
      <div class="left"></div>
      <div class="right"></div>
    </div>
  </div>
  <div class="container" id="second">
    <div class="overflow">
      <div class="left"></div>
      <div class="right"></div>
    </div>
  </div>
  <script>
    document.getElementById('second').scrollLeft = 0;
  </script>
</body>
</html>