fune/testing/web-platform/tests/css/css-tables/width-distribution/td-with-subpixel-padding-vertical-rl.html
Xianzhu Wang af62bf9f45 Bug 1447876 [wpt PR 10132] - [PE] Add ToInt() for logical padding top and bottom for LayoutTableCell, a=testonly
Automatic update from web-platform-tests[PE] Add ToInt() for logical padding top and bottom for LayoutTableCell

This reverts the logic for logical top/bottom paddings to be the same
as before https://chromium-review.googlesource.com/619603. The logical
top/bottom paddings are truncated like what we do for other table
layouts.

We still keep subpixels for logical left/right paddings to ensure
correct logical width calculation. This is still the same as before
https://chromium-review.googlesource.com/619603.

Bug: 823824
Change-Id: Icb617bf5771d1726f767207853f4adc8275731dc
Reviewed-on: https://chromium-review.googlesource.com/974315
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: David Grogan <dgrogan@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545225}

wpt-commits: 4e1bb5100b7de0d9373bccf5fd09e8476801d3cd
wpt-pr: 10132
wpt-commits: 4e1bb5100b7de0d9373bccf5fd09e8476801d3cd
wpt-pr: 10132
2018-04-15 08:35:14 +01:00

55 lines
1.5 KiB
HTML

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://drafts.csswg.org/css-tables/#width-distribution" />
<style>
td div {
display: inline-block;
width: 20px;
height: 20px;
background: blue;
}
</style>
Passes if each column (logical row) has two blue squares.
<div style="writing-mode: vertical-rl">
<table>
<tr>
<td class='target' style="padding: 0.8px 0"><div></div> <div></div></td>
<td style="padding: 0.8px 0; width: 30px"></td>
</tr>
</table>
<table>
<tr>
<td class='target' style="padding: 1px 0"><div></div> <div></div></td>
<td style="padding: 1px 0; width: 30px"></td>
</tr>
</table>
<table>
<tr>
<td class='target' style="padding: 1.3px 0"><div></div> <div></div></td>
<td style="padding: 1.3px 0; width: 30px"></td>
</tr>
</table>
<table>
<tr>
<td class='target' style="padding: 1.5px 0"><div></div> <div></div></td>
<td style="padding: 1.5px 0; width: 30px"></td>
</tr>
</table>
<table>
<tr>
<td class='target' style="padding: 1.7px 0"><div></div> <div></div></td>
<td style="padding: 1.7px 0; width: 30px"></td>
</tr>
</table>
</div>
<script>
test(() => {
var targets = document.getElementsByClassName('target');
for (var i = 0; i < targets.length; ++i) {
var divs = targets[i].getElementsByTagName('div');
assert_equals(divs.length, 2);
assert_equals(divs[0].offsetLeft, divs[1].offsetLeft, 'Contents of td.target[' + i + '] should not wrap');
}
});
</script>