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

Side by Side Diff: third_party/WebKit/LayoutTests/css3/flexbox/flexbox-overflow-auto-expected.html

Issue 1921553008: Fix scroll origin, overflow rects, and coordinate flipping for flexbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Add docs to Source/core/layout/README.md Created 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 .test-row { 5 .test-row {
6 display: flex; 6 display: flex;
7 margin-bottom: 5px; 7 margin-bottom: 5px;
8 } 8 }
9 .test-row > div { 9 .test-row > div {
10 flex: none; 10 flex: none;
(...skipping 16 matching lines...) Expand all
27 width: 200px; 27 width: 200px;
28 height: 200px; 28 height: 200px;
29 background: -webkit-radial-gradient(center, ellipse cover, rgba(30,87,153,1) 0%,rgba(89,148,202,1) 62%,rgba(95,154,207,0.7) 68%,rgba(125,185,232,0) 100%); 29 background: -webkit-radial-gradient(center, ellipse cover, rgba(30,87,153,1) 0%,rgba(89,148,202,1) 62%,rgba(95,154,207,0.7) 68%,rgba(125,185,232,0) 100%);
30 } 30 }
31 </style> 31 </style>
32 </head> 32 </head>
33 <body> 33 <body>
34 <p>Scrollbars should work in all the flexboxes.</p> 34 <p>Scrollbars should work in all the flexboxes.</p>
35 </body> 35 </body>
36 <script> 36 <script>
37 // The -almost values are cases where we don't scroll all the way because of
38 // https://bugs.webkit.org/show_bug.cgi?id=76129 .
39 var results = [ 37 var results = [
40 'left top', 'left top', 'right top', 'left bottom', 38 'left top', 'left top', 'right top', 'left bottom',
41 'right-almost top', 'right-almost top', 'right-almost bottom', 'left top', 39 'right top', 'right top', 'right bottom', 'left top',
42 'left top', 'left top', 'left bottom', 'right top']; 40 'left top', 'left top', 'left bottom', 'right top'];
43 41
44 var testContents = ''; 42 var testContents = '';
45 for (var i = 0; i < results.length; ++i) { 43 for (var i = 0; i < results.length; ++i) {
46 if (!(i % 4)) 44 if (!(i % 4))
47 testContents += "<div class='test-row'>"; 45 testContents += "<div class='test-row'>";
48 46
49 var containerClass = 'container ' + results[i]; 47 var containerClass = 'container ' + results[i];
50 testContents += 48 testContents +=
51 "<div class='" + containerClass + "'>" + 49 "<div class='" + containerClass + "'>" +
52 "<div class='flexbox'>" + 50 "<div class='flexbox'>" +
53 "<div></div>" + 51 "<div></div>" +
54 "</div>" + 52 "</div>" +
55 "</div>"; 53 "</div>";
56 if (i % 4 == 3) 54 if (i % 4 == 3)
57 testContents += "</div>"; 55 testContents += "</div>";
58 } 56 }
59 57
60 document.body.innerHTML += testContents; 58 document.body.innerHTML += testContents;
61 59
62 Array.prototype.forEach.call(document.querySelectorAll(".right"), function(eleme nt) { 60 Array.prototype.forEach.call(document.querySelectorAll(".right"), function(eleme nt) {
63 element.firstChild.scrollLeft = 1000; 61 element.firstChild.scrollLeft = 1000;
64 }); 62 });
65 63
66 Array.prototype.forEach.call(document.querySelectorAll(".bottom"), function(elem ent) { 64 Array.prototype.forEach.call(document.querySelectorAll(".bottom"), function(elem ent) {
67 element.firstChild.scrollTop = 1000; 65 element.firstChild.scrollTop = 1000;
68 }); 66 });
69 67
70 Array.prototype.forEach.call(document.querySelectorAll(".right-almost"), functio n(element) {
leviw_travelin_and_unemployed 2016/05/10 17:52:42 Squeeee!
71 element.firstChild.scrollLeft = element.firstChild.scrollWidth - element.fir stChild.offsetWidth;
72 });
73
74 Array.prototype.forEach.call(document.querySelectorAll(".bottom-almost"), functi on(element) {
75 element.firstChild.scrollTop = element.firstChild.scrollHeight - element.fir stChild.offsetHeight;
76 });
77
78 </script> 68 </script>
79 </body> 69 </body>
80 </html> 70 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698