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

Side by Side Diff: LayoutTests/fast/css-grid-layout/implicit-position-dynamic-change.html

Issue 208133003: [CSS Grid Layout] Prevent issues with checkLayout() in grid items (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 <link href="resources/grid.css" rel="stylesheet"> 3 <link href="resources/grid.css" rel="stylesheet">
4 <style> 4 <style>
5 .gridFixedContent { 5 .gridFixedContent {
6 grid-template-columns: 50px minmax(min-content, 50px) minmax(max-content, 50 px) minmax(50px, min-content); 6 grid-template-columns: 50px minmax(min-content, 50px) minmax(max-content, 50 px) minmax(50px, min-content);
7 grid-template-rows: 70px minmax(max-content, 70px) minmax(50px, min-content) minmax(65px, max-content); 7 grid-template-rows: 70px minmax(max-content, 70px) minmax(50px, min-content) minmax(65px, max-content);
8 } 8 }
9 </style> 9 </style>
10 <script src="../../resources/check-layout.js"></script> 10 <script src="../../resources/check-layout.js"></script>
11 <script> 11 <script>
12 function testPosition(gridElementID, position, size) 12 function testPosition(gridElementID, position, size)
13 { 13 {
14 gridItem = document.getElementById(gridElementID).firstChild; 14 gridItem = document.getElementById(gridElementID).firstChild;
15 gridItem.style.gridColumn = position.column; 15 gridItem.style.gridColumn = position.column;
16 gridItem.style.gridRow = position.row; 16 gridItem.style.gridRow = position.row;
17 gridItem.setAttribute("data-expected-width", size.width); 17 gridItem.setAttribute("data-expected-width", size.width);
18 gridItem.setAttribute("data-expected-height", size.height); 18 gridItem.setAttribute("data-expected-height", size.height);
19 checkLayout("#" + gridElementID); 19 checkLayout("#" + gridElementID, document.getElementById("test-output"));
20 } 20 }
21 21
22 function updateImplicitGridColumn() 22 function updateImplicitGridColumn()
23 { 23 {
24 var gridItem = document.getElementById("constrainedGrid").firstChild; 24 var gridItem = document.getElementById("constrainedGrid").firstChild;
25 testPosition("constrainedGrid", { 'column': '1', 'row': '1' }, { 'width': '5 0', 'height': '70' }); 25 testPosition("constrainedGrid", { 'column': '1', 'row': '1' }, { 'width': '5 0', 'height': '70' });
26 testPosition("constrainedGrid", { 'column': '1', 'row': '2' }, { 'width': '5 0', 'height': '30' }); 26 testPosition("constrainedGrid", { 'column': '1', 'row': '2' }, { 'width': '5 0', 'height': '30' });
27 testPosition("constrainedGrid", { 'column': '1', 'row': '3' }, { 'width': '5 0', 'height': '50' }); 27 testPosition("constrainedGrid", { 'column': '1', 'row': '3' }, { 'width': '5 0', 'height': '50' });
28 testPosition("constrainedGrid", { 'column': '1', 'row': '4' }, { 'width': '5 0', 'height': '65' }); 28 testPosition("constrainedGrid", { 'column': '1', 'row': '4' }, { 'width': '5 0', 'height': '65' });
29 testPosition("constrainedGrid", { 'column': '1', 'row': '5' }, { 'width': '5 0', 'height': '30' }); 29 testPosition("constrainedGrid", { 'column': '1', 'row': '5' }, { 'width': '5 0', 'height': '30' });
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 <div class="constrainedContainer"> 115 <div class="constrainedContainer">
116 <div class="grid gridFixedContent" id="constrainedGridUndefinedHeight"><div class="sizedToGridArea">XXXX XXXX XXXX</div></div> 116 <div class="grid gridFixedContent" id="constrainedGridUndefinedHeight"><div class="sizedToGridArea">XXXX XXXX XXXX</div></div>
117 </div> 117 </div>
118 118
119 <!-- Allow the extra logical space distribution to occur. --> 119 <!-- Allow the extra logical space distribution to occur. -->
120 <div style="width: 1000px; height: 1000px"> 120 <div style="width: 1000px; height: 1000px">
121 <div class="grid gridFixedContent" id="unconstrainedGrid"><div class="sizedT oGridArea">XXXXXX XXXXXX</div></div> 121 <div class="grid gridFixedContent" id="unconstrainedGrid"><div class="sizedT oGridArea">XXXXXX XXXXXX</div></div>
122 </div> 122 </div>
123 123
124 <div id="test-output"></div>
125
124 </body> 126 </body>
125 </html> 127 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698