blob: 6ec403a808e0fb409cda78bd7a0f22f42bd11349 [file] [log] [blame]
[email protected]7b245b32010-06-16 19:16:171<!DOCTYPE html>
2
3<html>
4<head>
5 <style type="text/css" media="screen">
6
7 .box {
8 position: absolute;
9 width: 100px;
10 height: 100px;
11 top: 20px;
12 left: 20px;
13 background-color: gray;
14 clip: rect(-5px, 105px, 105px, -5px);
15 }
16
17 .inner {
18 position: relative;
19 width: 120px;
20 height: 120px;
21 top: -10px;
22 left: -10px;
23 background-color: rgba(0, 0, 0, 0.2);
24 }
25
26 .composited {
[email protected]8448b5ae2014-10-18 08:49:3827 transform: translateZ(1px);
[email protected]7b245b32010-06-16 19:16:1728 }
29
30 p {
31 margin-top: 140px;
32 }
33 </style>
34 <script type="text/javascript" charset="utf-8">
[email protected]b71a8c42012-06-11 18:29:2235 if (window.testRunner) {
36 testRunner.dumpAsText();
37 testRunner.waitUntilDone();
[email protected]7b245b32010-06-16 19:16:1738 }
39
40 function doTest() {
[email protected]b71a8c42012-06-11 18:29:2241 if (window.testRunner) {
Xianzhu Wangaf4fa412018-05-14 21:26:5242 document.getElementById('layers').innerText = internals.layerTreeAsText(document);
[email protected]b71a8c42012-06-11 18:29:2243 testRunner.notifyDone();
[email protected]42b020a72010-07-09 05:10:5444 }
[email protected]7b245b32010-06-16 19:16:1745 }
46 window.addEventListener('load', doTest, false);
47 </script>
48</head>
49<body>
50
51 <div class="composited box">
52 <div class="inner">
53 </div>
54 </div>
55
56 <div class="box" style="left: 220px;">
57 <div class="composited inner">
58 </div>
59 </div>
60
61 <p>Test CSS clip with composited layers. Left and right sides should look the same.</p>
62<pre id="layers">
63 In DRT, layer tree goes here.
64</pre>
65</body>
66</html>