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

Side by Side Diff: LayoutTests/compositing/overflow/scrolls-with-respect-to.html

Issue 268813005: Fix bug in RenderLayer::scrollsWithRespectTo. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | LayoutTests/compositing/overflow/scrolls-with-respect-to-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html id='root'> 1 <html id='root'>
2 <head> 2 <head>
3 <style> 3 <style>
4 .container { 4 .container {
5 width: 400px; 5 width: 400px;
6 height: 400px; 6 height: 400px;
7 overflow: scroll; 7 overflow: scroll;
8 margin: 20px; 8 margin: 20px;
9 border: 1px solid black; 9 border: 1px solid black;
10 position: relative; 10 position: relative;
(...skipping 25 matching lines...) Expand all
36 #successor { 36 #successor {
37 left: 160px; 37 left: 160px;
38 top: 1000px; 38 top: 1000px;
39 position: relative; 39 position: relative;
40 } 40 }
41 41
42 .descendant { 42 .descendant {
43 height: 100px; 43 height: 100px;
44 width: 100px; 44 width: 100px;
45 background-color: black; 45 background-color: black;
46 position: relative;
46 } 47 }
47 </style> 48 </style>
48 49
49 <script> 50 <script>
50 if (window.testRunner) { 51 if (window.testRunner) {
51 testRunner.waitUntilDone(); 52 testRunner.waitUntilDone();
52 testRunner.dumpAsText(); 53 testRunner.dumpAsText();
53 } 54 }
54 55
55 // We always want to print the iframe output last, and then let the 56 // We always want to print the iframe output last, and then let the
(...skipping 24 matching lines...) Expand all
80 'always returns the correct answer on relative ly ' + 81 'always returns the correct answer on relative ly ' +
81 '"basic" elements as well as fixed- and absolu te-' + 82 '"basic" elements as well as fixed- and absolu te-' +
82 'positioned elements (ie, those with non-obvio us ' + 83 'positioned elements (ie, those with non-obvio us ' +
83 'containing blocks), and iframes.\n\n'; 84 'containing blocks), and iframes.\n\n';
84 var text = document.createTextNode(testDescription); 85 var text = document.createTextNode(testDescription);
85 pre.appendChild(text); 86 pre.appendChild(text);
86 87
87 if(!window.internals) 88 if(!window.internals)
88 return; 89 return;
89 90
90 var divs = ['predecessor', 'container', 'scrolled1', 'scrolled2', 's crolled3', 'fixed-descendant', 'successor', 'root']; 91 var divs = ['predecessor', 'container', 'scrolled1', 'scrolled2', 's crolled3', 'fixed-descendant', 'successor', 'root', 'descendant'];
91 for (var i = 0; i < divs.length; i++) { 92 for (var i = 0; i < divs.length; i++) {
92 var div1 = document.getElementById(divs[i]); 93 var div1 = document.getElementById(divs[i]);
93 for (var j = 0; j < divs.length; j++) { 94 for (var j = 0; j < divs.length; j++) {
94 var div2 = document.getElementById(divs[j]); 95 var div2 = document.getElementById(divs[j]);
95 var scrollsWithRespectTo = window.internals.scrollsWithRespe ctTo(div1, div2); 96 var scrollsWithRespectTo = window.internals.scrollsWithRespe ctTo(div1, div2);
96 97
97 var successText = scrollsWithRespectTo ? 'scrolls with respe ct to' : 'does not scroll with respect to'; 98 var successText = scrollsWithRespectTo ? 'scrolls with respe ct to' : 'does not scroll with respect to';
98 var messageText = div1.id + ' ' + successText + ' ' + div2.i d; 99 var messageText = div1.id + ' ' + successText + ' ' + div2.i d;
99 text = document.createTextNode(messageText + '\n'); 100 text = document.createTextNode(messageText + '\n');
100 pre.appendChild(text); 101 pre.appendChild(text);
(...skipping 14 matching lines...) Expand all
115 116
116 window.onload = doTest; 117 window.onload = doTest;
117 window.onmessage = receiveIframeOutput; 118 window.onmessage = receiveIframeOutput;
118 </script> 119 </script>
119 </head> 120 </head>
120 121
121 <body> 122 <body>
122 <div class='positioned' id='predecessor'></div> 123 <div class='positioned' id='predecessor'></div>
123 <div class='container' id='container'> 124 <div class='container' id='container'>
124 <div class='scrolled' id='scrolled1'> 125 <div class='scrolled' id='scrolled1'>
125 <div class='descendant'></div> 126 <div id='descendant' class='descendant'></div>
126 </div> 127 </div>
127 <div class='scrolled' style='z-index:2;' id='scrolled2'> 128 <div class='scrolled' style='z-index:2;' id='scrolled2'>
128 <div class='descendant'></div> 129 <div class='descendant'></div>
129 <div class='descendant' style='position:fixed' id='fixed-descendant' ></div> 130 <div class='descendant' style='position:fixed' id='fixed-descendant' ></div>
130 </div> 131 </div>
131 <div class='scrolled' style='background-color: blue; position: absolute' id='scrolled3'> 132 <div class='scrolled' style='background-color: blue; position: absolute' id='scrolled3'>
132 <div class='descendant'></div> 133 <div class='descendant'></div>
133 </div> 134 </div>
134 </div> 135 </div>
135 <iframe id='inner-iframe' src='resources/scrolls-with-respect-to-iframe.html ' style='width: 500px; height: 500px; position: relative; top: 500px;'></iframe> 136 <iframe id='inner-iframe' src='resources/scrolls-with-respect-to-iframe.html ' style='width: 500px; height: 500px; position: relative; top: 500px;'></iframe>
136 <div class='positioned' id='successor'></div> 137 <div class='positioned' id='successor'></div>
137 <pre id='console'></pre> 138 <pre id='console'></pre>
138 </body> 139 </body>
139 </html> 140 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/compositing/overflow/scrolls-with-respect-to-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698