Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: LayoutTests/compositing/overflow/nested-render-surfaces-with-rotation.html

Issue 22620002: Add layout tests for universal overflow scrolling (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 body {
6 height: 2000px;
7 }
8
9 .container {
10 height: 300px;
11 width: 300px;
12 border: 4px solid black;
13 overflow-y: scroll;
14 resize: both;
15 }
16
17 .contents {
18 height: 1000px;
19 }
20
21 .box {
22 position: relative;
23 z-index: 1;
24 height: 100px;
25 width: 100px;
26 margin: 10px;
27 background-color: blue;
28 }
29
30 .surface {
31 opacity: 0.5;
32 }
33
34 .fixed {
35 position: fixed;
36 z-index: 0;
37 background-color: green;
38 left: 50px;
39 top: 100px;
40 height: 200px;
41 width: 200px;
42 }
43
44 .rotated {
45 -webkit-transform: translateZ(0) rotate(5deg);
46 }
47
48 .counter-rotated {
49 -webkit-transform: translateZ(0) rotate(-9deg);
50 }
51 </style>
52 <script>
53 function setup() {
54 if (!window.internals) {
55 var pre = document.createElement("pre");
56 pre.innerHTML = "This test ensures that clipping works correctly "
57 + "with clip children, even if there are rotations involved.\n"
58 + "if this test is working correctly, all rects should be "
59 + "clipped by their containing overflow scrolling divs (the\n"
60 + "fixed position element will have the outer 'counter "
61 + "rotate' div as its containing block due to the rotation,\n"
62 + "not the viewport, and will therefore get clipped by the "
63 + "outer overflow scrolling div, but not the inner.";
64 document.body.appendChild(pre);
65 }
66 }
67 window.onload = setup;
68 </script>
69 </head>
70 <body>
71 <div class="rotated">
72 <div class="surface">
73 <div class="box"></div>
74 <div class="container">
75 <div class="surface counter-rotated">
76 <div class="box"></div>
77 <div class="container">
78 <div class="fixed"></div>
79 <div class="box"></div>
80 <div class="box"></div>
81 <div class="box"></div>
82 <div class="box"></div>
83 <div class="box"></div>
84 </div>
85 </div>
86 </div>
87 </div>
88 </div>
89 </body>
90 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698