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

Unified Diff: third_party/WebKit/LayoutTests/fragmentation/table-row-with-specified-height.html

Issue 2434543004: Specified row height should be applied during initial section layout. (Closed)
Patch Set: Code review. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fragmentation/table-row-with-specified-height.html
diff --git a/third_party/WebKit/LayoutTests/fragmentation/table-row-with-specified-height.html b/third_party/WebKit/LayoutTests/fragmentation/table-row-with-specified-height.html
new file mode 100644
index 0000000000000000000000000000000000000000..05c84ffed3d82fa5dcfd1f549406b85555c941e6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fragmentation/table-row-with-specified-height.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<div id="multicol" style="columns:3; column-fill:auto; column-gap:0; height:90px; line-height:20px;">
+ <br>
+ <br>
+ <table cellspacing="0" cellpadding="0">
+ <tr style="height:50px;">
+ <td><br></td>
+ </tr>
+ <tr id="secondRow" style="height:61px; background:blue;">
+ <td id="secondCell"><div style="width:61px;"><br></div></td>
+ </tr>
+ <tr>
+ <td><br></td>
+ </tr>
+ </table>
+</div>
+
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+ var multicol = document.getElementById("multicol");
+ var row = document.getElementById("secondRow");
+ var cell = document.getElementById("secondCell");
+
+ // Check the height of the second row and its cell a few times, with a
+ // layout pass between each check, to verify that it's stable.
+
+ test(() => {
+ assert_equals(cell.offsetTop, 50);
+ assert_equals(cell.offsetHeight, 61);
+ assert_equals(row.offsetTop, 50);
+ assert_equals(row.offsetHeight, 61);
+ }, "Row height should be as specified.");
+
+ test(() => {
+ // Change width and verify that layout remains the same, block direction-wise.
+ multicol.style.width = "500px";
+
+ assert_equals(cell.offsetTop, 50);
+ assert_equals(cell.offsetHeight, 61);
+ assert_equals(row.offsetTop, 50);
+ assert_equals(row.offsetHeight, 61);
+
+ }, "Row height should be as specified after relayout.");
+
+ test(() => {
+ // Change width and verify that layout remains the same, block direction-wise.
+ multicol.style.width = "550px";
+
+ assert_equals(cell.offsetTop, 50);
+ assert_equals(cell.offsetHeight, 61);
+ assert_equals(row.offsetTop, 50);
+ assert_equals(row.offsetHeight, 61);
+
+ }, "Row height should be as specified after another relayout.");
+
+ test(() => {
+ // Change width and verify that layout remains the same, block direction-wise.
+ multicol.style.width = "600px";
+
+ assert_equals(cell.offsetTop, 50);
+ assert_equals(cell.offsetHeight, 61);
+ assert_equals(row.offsetTop, 50);
+ assert_equals(row.offsetHeight, 61);
+
+ }, "Row height should be as specified after yet another relayout.");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698