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

Side by Side Diff: LayoutTests/fast/table/resize-table-width-using-multiple-col-span.html

Issue 151993004: Col width is not honored when dynamically updated and it would not make table narrower (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added new test cases as per suggestion. 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 #thecol {
6 width: 200px;
7 }
8 #thecol2 {
9 width: 300px;
10 }
11 td {
12 height: 25px;
13 }
14 </style>
15 <script type="text/javascript">
16 function runTest() {
17 var col = document.getElementById('thecol');
18 var col2 = document.getElementById('thecol2');
19 col.offsetTop;
20 col.style.width="100px";
21 col2.style.width="200px";
22 window.checkLayout("#td1", document.getElementById("test-output" ));
23 window.checkLayout("#td2", document.getElementById("test-output" ));
24 window.checkLayout("#td3", document.getElementById("test-output" ));
25 window.checkLayout("#td4", document.getElementById("test-output" ));
26 window.checkLayout("#td5", document.getElementById("test-output" ));
27 window.checkLayout("#td6", document.getElementById("test-output" ));
28 window.checkLayout("#td7", document.getElementById("test-output" ));
29 window.checkLayout("#td8", document.getElementById("test-output" ));
30 window.checkLayout("#td9", document.getElementById("test-output" ));
31 }
32 </script>
33 <script src="../../resources/check-layout.js"></script>
34 </head>
35 <body onload="runTest()">
36 Tests that the width of table cell changes on changing the colgroup widt h to new width.
37 <table>
38 <colgroup>
39 <col id="thecol" span="2" style="background-color:red">
40 <col id="thecol2" span="1" style="background-color:blue">
41 </colgroup>
42 <thead>
43 <tr>
44 <td id="td1" data-expected-width="100"></td>
45 <td id="td2" data-expected-width="100"></td>
46 <td id="td3" data-expected-width="200"></td>
47 </tr>
48 </thead>
49 <tfoot>
50 <tr>
51 <td id="td4" data-expected-width="100"></td>
52 <td id="td5" data-expected-width="100"></td>
53 <td id="td6" data-expected-width="200"></td>
54 </tr>
55 </tfoot>
56 <tbody>
57 <tr>
58 <td id="td7" data-expected-width="100"></td>
59 <td id="td8" data-expected-width="100"></td>
60 <td id="td9" data-expected-width="200"></td>
61 </tr>
62 </tbody>
63 </table>
64 <div id="test-output"></div>
65 </body>
66 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698