Commit 14350ac7 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[PE] Don't truncate table cell's padding

Truncation caused inadequate logical width when padding is like 1.7px.

Bug: 817342
Change-Id: Ibdb76cc528cc7e04801fe65409bb8f60e5ac69a5
Reviewed-on: https://chromium-review.googlesource.com/943827
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540991}
parent d0c9d916
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
div {
display: inline-block;
width: 20px;
height: 20px;
background: blue;
}
</style>
Passes if each row has two blue squares.
<table>
<tr>
<td class='target' style="padding: 0 0.8px"><div></div> <div></div></td>
<td style="padding: 0 0.8px; width: 30px"></td>
</tr>
</table>
<table>
<tr>
<td class='target' style="padding: 0 1px"><div></div> <div></div></td>
<td style="padding: 0 1px; width: 30px"></td>
</tr>
</table>
<table>
<tr>
<td class='target' style="padding: 0 1.3px"><div></div> <div></div></td>
<td style="padding: 0 1.3px; width: 30px"></td>
</tr>
</table>
<table>
<tr>
<td class='target' style="padding: 0 1.5px"><div></div> <div></div></td>
<td style="padding: 0 1.5px; width: 30px"></td>
</tr>
</table>
<table>
<tr>
<td class='target' style="padding: 0 1.7px"><div></div> <div></div></td>
<td style="padding: 0 1.7px; width: 30px"></td>
</tr>
</table>
<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].offsetTop, divs[1].offsetTop, 'Contents of td.target[' + i + '] should not wrap');
}
});
</script>
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x199
LayoutBlockFlow {html} at (0,0) size 800x199.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x188
LayoutTable {table} at (143.45,0) size 502x188
LayoutTableSection (anonymous) at (0,0) size 502x188
LayoutTableRow {tr} at (0,0) size 502x188
LayoutTableCell {td} at (0,0) size 502x188 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (6,6) size 490x176
LayoutTableSection (anonymous) at (0,0) size 490x176
LayoutTableRow {tr} at (0,1) size 490x66
LayoutTableCell {td} at (1,1) size 488x65.75 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5,19.88) size 478x26
LayoutText {#text} at (0,0) size 478x25
text run at (0,0) width 478: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,68) size 490x24
LayoutTableCell {td} at (1,68) size 243x24 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (94,5) size 55x14
text run at (94,5) width 55: "SVG Image"
LayoutTableCell {td} at (245,68) size 244x24 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (95,5) size 54x14
text run at (95,5) width 54: "PNG Image"
LayoutTableRow {tr} at (0,93) size 490x82
LayoutTableCell {td} at (1,93) size 243x82.44 [r=2 c=0 rs=1 cs=1]
layer at (0,0) size 800x205
LayoutBlockFlow {html} at (0,0) size 800x205.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x194
LayoutTable {table} at (141.45,0) size 506x194
LayoutTableSection (anonymous) at (0,0) size 506x194
LayoutTableRow {tr} at (0,0) size 506x194
LayoutTableCell {td} at (0,0) size 506x193.88 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (7,6.94) size 492x180
LayoutTableSection (anonymous) at (0,0) size 492x180
LayoutTableRow {tr} at (0,1) size 492x67
LayoutTableCell {td} at (1,1) size 490x66.84 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5.55,20.42) size 478.91x26
LayoutText {#text} at (0,0) size 479x25
text run at (0,0) width 479: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,69) size 492x25
LayoutTableCell {td} at (1,69) size 244x25.09 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (95,5) size 54x15
text run at (95,5) width 54: "SVG Image"
LayoutTableCell {td} at (246,69) size 245x25.09 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (95,5) size 55x15
text run at (95,5) width 55: "PNG Image"
LayoutTableRow {tr} at (0,95) size 492x84
LayoutTableCell {td} at (1,95) size 244x83.53 [r=2 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 0x0
LayoutTableCell {td} at (245,93) size 244x82.44 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5,5) size 138.88x69.44
LayoutTableCell {td} at (246,95) size 245x83.53 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5.55,5.55) size 138.88x69.44
LayoutText {#text} at (0,0) size 0x0
layer at (255,110) size 139x69
LayoutEmbeddedObject {object} at (99.13,5) size 138.88x69.44
layer at (255,113) size 138x69
LayoutEmbeddedObject {object} at (99.58,5.55) size 138.88x69.44
layer at (0,0) size 139x69
LayoutView at (0,0) size 139x69
layer at (0,0) size 139x69
......
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x199
LayoutBlockFlow {html} at (0,0) size 800x199.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x188
LayoutTable {table} at (143.45,0) size 502x188
LayoutTableSection (anonymous) at (0,0) size 502x188
LayoutTableRow {tr} at (0,0) size 502x188
LayoutTableCell {td} at (0,0) size 502x188 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (6,6) size 490x176
LayoutTableSection (anonymous) at (0,0) size 490x176
LayoutTableRow {tr} at (0,1) size 490x66
LayoutTableCell {td} at (1,1) size 488x65.75 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5,19.88) size 478x26
LayoutText {#text} at (0,0) size 478x25
text run at (0,0) width 478: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,68) size 490x24
LayoutTableCell {td} at (1,68) size 243x24 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (94,5) size 55x14
text run at (94,5) width 55: "SVG Image"
LayoutTableCell {td} at (245,68) size 244x24 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (95,5) size 54x14
text run at (95,5) width 54: "PNG Image"
LayoutTableRow {tr} at (0,93) size 490x82
LayoutTableCell {td} at (1,93) size 243x82.44 [r=2 c=0 rs=1 cs=1]
layer at (0,0) size 800x205
LayoutBlockFlow {html} at (0,0) size 800x205.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x194
LayoutTable {table} at (141.45,0) size 506x194
LayoutTableSection (anonymous) at (0,0) size 506x194
LayoutTableRow {tr} at (0,0) size 506x194
LayoutTableCell {td} at (0,0) size 506x193.88 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (7,6.94) size 492x180
LayoutTableSection (anonymous) at (0,0) size 492x180
LayoutTableRow {tr} at (0,1) size 492x67
LayoutTableCell {td} at (1,1) size 490x66.84 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5.55,20.42) size 478.91x26
LayoutText {#text} at (0,0) size 479x25
text run at (0,0) width 479: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,69) size 492x25
LayoutTableCell {td} at (1,69) size 244x25.09 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (95,5) size 54x15
text run at (95,5) width 54: "SVG Image"
LayoutTableCell {td} at (246,69) size 245x25.09 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (95,5) size 55x15
text run at (95,5) width 55: "PNG Image"
LayoutTableRow {tr} at (0,95) size 492x84
LayoutTableCell {td} at (1,95) size 244x83.53 [r=2 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 0x0
LayoutTableCell {td} at (245,93) size 244x82.44 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5,5) size 138.88x69.44
LayoutTableCell {td} at (246,95) size 245x83.53 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5.55,5.55) size 138.88x69.44
LayoutText {#text} at (0,0) size 0x0
layer at (255,110) size 139x69
LayoutEmbeddedObject {object} at (99.13,5) size 138.88x69.44
layer at (255,113) size 138x69
LayoutEmbeddedObject {object} at (99.58,5.55) size 138.88x69.44
layer at (0,0) size 139x69
LayoutView at (0,0) size 139x69
layer at (0,0) size 139x69
......
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x380
LayoutBlockFlow {html} at (0,0) size 800x380.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x369
LayoutTable {table} at (42.95,0) size 703x369
LayoutTableSection (anonymous) at (0,0) size 703x369
LayoutTableRow {tr} at (0,0) size 703x369
LayoutTableCell {td} at (0,0) size 703x369 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (6,6) size 691x357
LayoutTableSection (anonymous) at (0,0) size 691x357
LayoutTableRow {tr} at (0,1) size 691x66
LayoutTableCell {td} at (1,1) size 689x65.75 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5,19.88) size 679x26
layer at (0,0) size 800x385
LayoutBlockFlow {html} at (0,0) size 800x385.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x374
LayoutTable {table} at (40.95,0) size 707x374
LayoutTableSection (anonymous) at (0,0) size 707x374
LayoutTableRow {tr} at (0,0) size 707x374
LayoutTableCell {td} at (0,0) size 707x373.88 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (7,6.94) size 693x360
LayoutTableSection (anonymous) at (0,0) size 693x360
LayoutTableRow {tr} at (0,1) size 693x67
LayoutTableCell {td} at (1,1) size 691x66.84 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5.55,20.42) size 679.91x26
LayoutText {#text} at (100,0) size 479x25
text run at (100,0) width 479: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,68) size 691x24
LayoutTableCell {td} at (1,68) size 344x24 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (145,5) size 54x14
text run at (145,5) width 54: "SVG Image"
LayoutTableCell {td} at (346,68) size 344x24 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (145,5) size 54x14
text run at (145,5) width 54: "PNG Image"
LayoutTableRow {tr} at (0,93) size 691x263
LayoutTableCell {td} at (1,93) size 344x262.98 [r=2 c=0 rs=1 cs=1]
LayoutTableRow {tr} at (0,69) size 693x25
LayoutTableCell {td} at (1,69) size 345x25.09 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (145,5) size 55x15
text run at (145,5) width 55: "SVG Image"
LayoutTableCell {td} at (347,69) size 345x25.09 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (145,5) size 55x15
text run at (145,5) width 55: "PNG Image"
LayoutTableRow {tr} at (0,95) size 693x264
LayoutTableCell {td} at (1,95) size 345x264.08 [r=2 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 0x0
LayoutTableCell {td} at (346,93) size 344x262.97 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5,5) size 333.33x249.97
LayoutTableCell {td} at (347,95) size 345x264.06 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5.55,5.55) size 333.33x249.97
LayoutText {#text} at (0,0) size 0x0
layer at (61,110) size 333x250
LayoutEmbeddedObject {object} at (5.67,5) size 333.33x249.98
layer at (61,113) size 333x250
LayoutEmbeddedObject {object} at (6.13,5.55) size 333.33x249.98
layer at (0,0) size 333x250
LayoutView at (0,0) size 333x250
layer at (0,0) size 333x250
......
......@@ -9,15 +9,15 @@ layer at (0,0) size 800x600
LayoutBR {BR} at (301,13) size 1x0
LayoutText {#text} at (0,17) size 176x16
text run at (0,17) width 176: "There should be no red visible."
LayoutTable {TABLE} at (0,48.39) size 785x19
LayoutTableSection {TBODY} at (0,0) size 785x19
LayoutTableRow {TR} at (0,1) size 785x17
LayoutTableCell {TD} at (1,1) size 181x17 [r=0 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 145x16
text run at (0,0) width 145: "getClientBoundingRect():"
LayoutTableCell {TD} at (183,1) size 601x17 [r=0 c=1 rs=1 cs=1]
LayoutText {#text} at (0,0) size 95x16
text run at (0,0) width 95: "getClientRects():"
LayoutTable {TABLE} at (0,48.39) size 785x21
LayoutTableSection {TBODY} at (0,0) size 785x21
LayoutTableRow {TR} at (0,1) size 785x19
LayoutTableCell {TD} at (1,1) size 181x18.78 [r=0 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 146x17
text run at (0,0) width 146: "getClientBoundingRect():"
LayoutTableCell {TD} at (183,1) size 601x18.78 [r=0 c=1 rs=1 cs=1]
LayoutText {#text} at (0,0) size 96x17
text run at (0,0) width 96: "getClientRects():"
layer at (90,90) size 90x90
LayoutBlockFlow (positioned) {DIV} at (90,90) size 90x90 [bgcolor=#FF0000]
layer at (90,90) size 90x90
......
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x198
LayoutBlockFlow {html} at (0,0) size 800x198.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x187
LayoutTable {table} at (142.45,0) size 504x187
LayoutTableSection (anonymous) at (0,0) size 504x187
LayoutTableRow {tr} at (0,0) size 504x187
LayoutTableCell {td} at (0,0) size 504x187 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (6,6) size 492x175
LayoutTableSection (anonymous) at (0,0) size 492x175
LayoutTableRow {tr} at (0,1) size 492x66
LayoutTableCell {td} at (1,1) size 490x65.75 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5,19.88) size 480x26
layer at (0,0) size 800x204
LayoutBlockFlow {html} at (0,0) size 800x204.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x193
LayoutTable {table} at (140.95,0) size 507x193
LayoutTableSection (anonymous) at (0,0) size 507x193
LayoutTableRow {tr} at (0,0) size 507x193
LayoutTableCell {td} at (0,0) size 507x192.88 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (7,6.94) size 493x179
LayoutTableSection (anonymous) at (0,0) size 493x179
LayoutTableRow {tr} at (0,1) size 493x67
LayoutTableCell {td} at (1,1) size 491x66.84 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5.55,20.42) size 479.91x26
LayoutText {#text} at (0,0) size 480x26
text run at (0,0) width 480: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,68) size 492x23
LayoutTableCell {td} at (1,68) size 244x23 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (95,5) size 54x13
text run at (95,5) width 54: "SVG Image"
LayoutTableCell {td} at (246,68) size 245x23 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (96,5) size 53x13
LayoutTableRow {tr} at (0,69) size 493x24
LayoutTableCell {td} at (1,69) size 245x24.09 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (96,5) size 53x14
text run at (96,5) width 53: "SVG Image"
LayoutTableCell {td} at (247,69) size 245x24.09 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (96,5) size 53x14
text run at (96,5) width 53: "PNG Image"
LayoutTableRow {tr} at (0,92) size 492x82
LayoutTableCell {td} at (1,92) size 244x82.44 [r=2 c=0 rs=1 cs=1]
LayoutTableRow {tr} at (0,94) size 493x84
LayoutTableCell {td} at (1,94) size 245x83.53 [r=2 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 0x0
LayoutTableCell {td} at (246,92) size 245x82.44 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5,5) size 138.88x69.44
LayoutTableCell {td} at (247,94) size 245x83.53 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5.55,5.55) size 138.88x69.44
LayoutText {#text} at (0,0) size 0x0
layer at (255,109) size 139x69
LayoutEmbeddedObject {object} at (100.13,5) size 138.88x69.44
layer at (255,112) size 138x69
LayoutEmbeddedObject {object} at (100.58,5.55) size 138.88x69.44
layer at (0,0) size 139x69
LayoutView at (0,0) size 139x69
layer at (0,0) size 139x69
......
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x198
LayoutBlockFlow {html} at (0,0) size 800x198.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x187
LayoutTable {table} at (142.45,0) size 504x187
LayoutTableSection (anonymous) at (0,0) size 504x187
LayoutTableRow {tr} at (0,0) size 504x187
LayoutTableCell {td} at (0,0) size 504x187 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (6,6) size 492x175
LayoutTableSection (anonymous) at (0,0) size 492x175
LayoutTableRow {tr} at (0,1) size 492x66
LayoutTableCell {td} at (1,1) size 490x65.75 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5,19.88) size 480x26
layer at (0,0) size 800x204
LayoutBlockFlow {html} at (0,0) size 800x204.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x193
LayoutTable {table} at (140.95,0) size 507x193
LayoutTableSection (anonymous) at (0,0) size 507x193
LayoutTableRow {tr} at (0,0) size 507x193
LayoutTableCell {td} at (0,0) size 507x192.88 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (7,6.94) size 493x179
LayoutTableSection (anonymous) at (0,0) size 493x179
LayoutTableRow {tr} at (0,1) size 493x67
LayoutTableCell {td} at (1,1) size 491x66.84 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5.55,20.42) size 479.91x26
LayoutText {#text} at (0,0) size 480x26
text run at (0,0) width 480: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,68) size 492x23
LayoutTableCell {td} at (1,68) size 244x23 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (95,5) size 54x13
text run at (95,5) width 54: "SVG Image"
LayoutTableCell {td} at (246,68) size 245x23 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (96,5) size 53x13
LayoutTableRow {tr} at (0,69) size 493x24
LayoutTableCell {td} at (1,69) size 245x24.09 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (96,5) size 53x14
text run at (96,5) width 53: "SVG Image"
LayoutTableCell {td} at (247,69) size 245x24.09 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (96,5) size 53x14
text run at (96,5) width 53: "PNG Image"
LayoutTableRow {tr} at (0,92) size 492x82
LayoutTableCell {td} at (1,92) size 244x82.44 [r=2 c=0 rs=1 cs=1]
LayoutTableRow {tr} at (0,94) size 493x84
LayoutTableCell {td} at (1,94) size 245x83.53 [r=2 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 0x0
LayoutTableCell {td} at (246,92) size 245x82.44 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5,5) size 138.88x69.44
LayoutTableCell {td} at (247,94) size 245x83.53 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5.55,5.55) size 138.88x69.44
LayoutText {#text} at (0,0) size 0x0
layer at (255,109) size 139x69
LayoutEmbeddedObject {object} at (100.13,5) size 138.88x69.44
layer at (255,112) size 138x69
LayoutEmbeddedObject {object} at (100.58,5.55) size 138.88x69.44
layer at (0,0) size 139x69
LayoutView at (0,0) size 139x69
layer at (0,0) size 139x69
......
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x379
LayoutBlockFlow {html} at (0,0) size 800x379.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x368
LayoutTable {table} at (42.95,0) size 703x368
LayoutTableSection (anonymous) at (0,0) size 703x368
LayoutTableRow {tr} at (0,0) size 703x368
LayoutTableCell {td} at (0,0) size 703x368 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (6,6) size 691x356
LayoutTableSection (anonymous) at (0,0) size 691x356
LayoutTableRow {tr} at (0,1) size 691x66
LayoutTableCell {td} at (1,1) size 689x65.75 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5,19.88) size 679x26
LayoutText {#text} at (99,0) size 481x26
text run at (99,0) width 481: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,68) size 691x23
LayoutTableCell {td} at (1,68) size 344x23 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (145,5) size 54x13
text run at (145,5) width 54: "SVG Image"
LayoutTableCell {td} at (346,68) size 344x23 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (145,5) size 54x13
text run at (145,5) width 54: "PNG Image"
LayoutTableRow {tr} at (0,92) size 691x263
LayoutTableCell {td} at (1,92) size 344x262.98 [r=2 c=0 rs=1 cs=1]
layer at (0,0) size 800x384
LayoutBlockFlow {html} at (0,0) size 800x384.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x373
LayoutTable {table} at (40.95,0) size 707x373
LayoutTableSection (anonymous) at (0,0) size 707x373
LayoutTableRow {tr} at (0,0) size 707x373
LayoutTableCell {td} at (0,0) size 707x372.88 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (7,6.94) size 693x359
LayoutTableSection (anonymous) at (0,0) size 693x359
LayoutTableRow {tr} at (0,1) size 693x67
LayoutTableCell {td} at (1,1) size 691x66.84 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5.55,20.42) size 679.91x26
LayoutText {#text} at (100,0) size 480x26
text run at (100,0) width 480: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,69) size 693x24
LayoutTableCell {td} at (1,69) size 345x24.09 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (146,5) size 53x14
text run at (146,5) width 53: "SVG Image"
LayoutTableCell {td} at (347,69) size 345x24.09 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (146,5) size 53x14
text run at (146,5) width 53: "PNG Image"
LayoutTableRow {tr} at (0,94) size 693x264
LayoutTableCell {td} at (1,94) size 345x264.08 [r=2 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 0x0
LayoutTableCell {td} at (346,92) size 344x262.97 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5,5) size 333.33x249.97
LayoutTableCell {td} at (347,94) size 345x264.06 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5.55,5.55) size 333.33x249.97
LayoutText {#text} at (0,0) size 0x0
layer at (61,109) size 333x250
LayoutEmbeddedObject {object} at (5.67,5) size 333.33x249.98
layer at (61,112) size 333x250
LayoutEmbeddedObject {object} at (6.13,5.55) size 333.33x249.98
layer at (0,0) size 333x250
LayoutView at (0,0) size 333x250
layer at (0,0) size 333x250
......
......@@ -9,15 +9,15 @@ layer at (0,0) size 800x600
LayoutBR {BR} at (307,13) size 1x0
LayoutText {#text} at (0,17) size 179x17
text run at (0,17) width 179: "There should be no red visible."
LayoutTable {TABLE} at (0,48.39) size 785x19
LayoutTableSection {TBODY} at (0,0) size 785x19
LayoutTableRow {TR} at (0,1) size 785x17
LayoutTableCell {TD} at (1,1) size 181x17 [r=0 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 150x17
text run at (0,0) width 150: "getClientBoundingRect():"
LayoutTableCell {TD} at (183,1) size 601x17 [r=0 c=1 rs=1 cs=1]
LayoutText {#text} at (0,0) size 99x17
text run at (0,0) width 99: "getClientRects():"
LayoutTable {TABLE} at (0,48.39) size 785x21
LayoutTableSection {TBODY} at (0,0) size 785x21
LayoutTableRow {TR} at (0,1) size 785x19
LayoutTableCell {TD} at (1,1) size 181x18.78 [r=0 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 151x18
text run at (0,0) width 151: "getClientBoundingRect():"
LayoutTableCell {TD} at (183,1) size 601x18.78 [r=0 c=1 rs=1 cs=1]
LayoutText {#text} at (0,0) size 100x18
text run at (0,0) width 100: "getClientRects():"
layer at (90,90) size 90x90
LayoutBlockFlow (positioned) {DIV} at (90,90) size 90x90 [bgcolor=#FF0000]
layer at (90,90) size 90x90
......
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x199
LayoutBlockFlow {html} at (0,0) size 800x199.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x188
LayoutTable {table} at (144.45,0) size 500x188
LayoutTableSection (anonymous) at (0,0) size 500x188
LayoutTableRow {tr} at (0,0) size 500x188
LayoutTableCell {td} at (0,0) size 500x188 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (6,6) size 488x176
LayoutTableSection (anonymous) at (0,0) size 488x176
LayoutTableRow {tr} at (0,1) size 488x66
LayoutTableCell {td} at (1,1) size 486x65.75 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5,19.88) size 476x26
LayoutText {#text} at (0,0) size 476x25
text run at (0,0) width 476: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,68) size 488x24
LayoutTableCell {td} at (1,68) size 242x24 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (96,5) size 50x14
text run at (96,5) width 50: "SVG Image"
LayoutTableCell {td} at (244,68) size 243x24 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (95,5) size 53x14
text run at (95,5) width 53: "PNG Image"
LayoutTableRow {tr} at (0,93) size 488x82
LayoutTableCell {td} at (1,93) size 242x82.44 [r=2 c=0 rs=1 cs=1]
layer at (0,0) size 800x205
LayoutBlockFlow {html} at (0,0) size 800x205.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x194
LayoutTable {table} at (142.45,0) size 504x194
LayoutTableSection (anonymous) at (0,0) size 504x194
LayoutTableRow {tr} at (0,0) size 504x194
LayoutTableCell {td} at (0,0) size 504x193.88 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (7,6.94) size 490x180
LayoutTableSection (anonymous) at (0,0) size 490x180
LayoutTableRow {tr} at (0,1) size 490x67
LayoutTableCell {td} at (1,1) size 488x66.84 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5.55,20.42) size 476.91x26
LayoutText {#text} at (0,0) size 477x25
text run at (0,0) width 477: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,69) size 490x25
LayoutTableCell {td} at (1,69) size 243x25.09 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (96,5) size 51x15
text run at (96,5) width 51: "SVG Image"
LayoutTableCell {td} at (245,69) size 244x25.09 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (95,5) size 54x15
text run at (95,5) width 54: "PNG Image"
LayoutTableRow {tr} at (0,95) size 490x84
LayoutTableCell {td} at (1,95) size 243x83.53 [r=2 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 0x0
LayoutTableCell {td} at (244,93) size 243x82.44 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5,5) size 138.88x69.44
LayoutTableCell {td} at (245,95) size 244x83.53 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5.55,5.55) size 138.88x69.44
LayoutText {#text} at (0,0) size 0x0
layer at (255,110) size 139x69
LayoutEmbeddedObject {object} at (98.13,5) size 138.88x69.44
layer at (255,113) size 138x69
LayoutEmbeddedObject {object} at (98.58,5.55) size 138.88x69.44
layer at (0,0) size 139x69
LayoutView at (0,0) size 139x69
layer at (0,0) size 139x69
......
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x199
LayoutBlockFlow {html} at (0,0) size 800x199.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x188
LayoutTable {table} at (144.45,0) size 500x188
LayoutTableSection (anonymous) at (0,0) size 500x188
LayoutTableRow {tr} at (0,0) size 500x188
LayoutTableCell {td} at (0,0) size 500x188 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (6,6) size 488x176
LayoutTableSection (anonymous) at (0,0) size 488x176
LayoutTableRow {tr} at (0,1) size 488x66
LayoutTableCell {td} at (1,1) size 486x65.75 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5,19.88) size 476x26
LayoutText {#text} at (0,0) size 476x25
text run at (0,0) width 476: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,68) size 488x24
LayoutTableCell {td} at (1,68) size 242x24 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (96,5) size 50x14
text run at (96,5) width 50: "SVG Image"
LayoutTableCell {td} at (244,68) size 243x24 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (95,5) size 53x14
text run at (95,5) width 53: "PNG Image"
LayoutTableRow {tr} at (0,93) size 488x82
LayoutTableCell {td} at (1,93) size 242x82.44 [r=2 c=0 rs=1 cs=1]
layer at (0,0) size 800x205
LayoutBlockFlow {html} at (0,0) size 800x205.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x194
LayoutTable {table} at (142.45,0) size 504x194
LayoutTableSection (anonymous) at (0,0) size 504x194
LayoutTableRow {tr} at (0,0) size 504x194
LayoutTableCell {td} at (0,0) size 504x193.88 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (7,6.94) size 490x180
LayoutTableSection (anonymous) at (0,0) size 490x180
LayoutTableRow {tr} at (0,1) size 490x67
LayoutTableCell {td} at (1,1) size 488x66.84 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5.55,20.42) size 476.91x26
LayoutText {#text} at (0,0) size 477x25
text run at (0,0) width 477: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,69) size 490x25
LayoutTableCell {td} at (1,69) size 243x25.09 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (96,5) size 51x15
text run at (96,5) width 51: "SVG Image"
LayoutTableCell {td} at (245,69) size 244x25.09 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (95,5) size 54x15
text run at (95,5) width 54: "PNG Image"
LayoutTableRow {tr} at (0,95) size 490x84
LayoutTableCell {td} at (1,95) size 243x83.53 [r=2 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 0x0
LayoutTableCell {td} at (244,93) size 243x82.44 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5,5) size 138.88x69.44
LayoutTableCell {td} at (245,95) size 244x83.53 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5.55,5.55) size 138.88x69.44
LayoutText {#text} at (0,0) size 0x0
layer at (255,110) size 139x69
LayoutEmbeddedObject {object} at (98.13,5) size 138.88x69.44
layer at (255,113) size 138x69
LayoutEmbeddedObject {object} at (98.58,5.55) size 138.88x69.44
layer at (0,0) size 139x69
LayoutView at (0,0) size 139x69
layer at (0,0) size 139x69
......
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x380
LayoutBlockFlow {html} at (0,0) size 800x380.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x369
LayoutTable {table} at (42.95,0) size 703x369
LayoutTableSection (anonymous) at (0,0) size 703x369
LayoutTableRow {tr} at (0,0) size 703x369
LayoutTableCell {td} at (0,0) size 703x369 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (6,6) size 691x357
LayoutTableSection (anonymous) at (0,0) size 691x357
LayoutTableRow {tr} at (0,1) size 691x66
LayoutTableCell {td} at (1,1) size 689x65.75 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5,19.88) size 679x26
layer at (0,0) size 800x385
LayoutBlockFlow {html} at (0,0) size 800x385.09
LayoutBlockFlow {body} at (5.55,5.55) size 788.91x374
LayoutTable {table} at (40.95,0) size 707x374
LayoutTableSection (anonymous) at (0,0) size 707x374
LayoutTableRow {tr} at (0,0) size 707x374
LayoutTableCell {td} at (0,0) size 707x373.88 [r=0 c=0 rs=1 cs=3]
LayoutTable {table} at (7,6.94) size 693x360
LayoutTableSection (anonymous) at (0,0) size 693x360
LayoutTableRow {tr} at (0,1) size 693x67
LayoutTableCell {td} at (1,1) size 691x66.84 [r=0 c=0 rs=1 cs=2]
LayoutBlockFlow {h1} at (5.55,20.42) size 679.91x26
LayoutText {#text} at (101,0) size 477x25
text run at (101,0) width 477: "Both sides should have identical size after zooming"
LayoutTableRow {tr} at (0,68) size 691x24
LayoutTableCell {td} at (1,68) size 344x24 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (147,5) size 50x14
text run at (147,5) width 50: "SVG Image"
LayoutTableCell {td} at (346,68) size 344x24 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (145,5) size 54x14
text run at (145,5) width 54: "PNG Image"
LayoutTableRow {tr} at (0,93) size 691x263
LayoutTableCell {td} at (1,93) size 344x262.98 [r=2 c=0 rs=1 cs=1]
LayoutTableRow {tr} at (0,69) size 693x25
LayoutTableCell {td} at (1,69) size 345x25.09 [r=1 c=0 rs=1 cs=1]
LayoutText {#text} at (147,5) size 51x15
text run at (147,5) width 51: "SVG Image"
LayoutTableCell {td} at (347,69) size 345x25.09 [r=1 c=1 rs=1 cs=1]
LayoutText {#text} at (146,5) size 53x15
text run at (146,5) width 53: "PNG Image"
LayoutTableRow {tr} at (0,95) size 693x264
LayoutTableCell {td} at (1,95) size 345x264.08 [r=2 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 0x0
LayoutTableCell {td} at (346,93) size 344x262.97 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5,5) size 333.33x249.97
LayoutTableCell {td} at (347,95) size 345x264.06 [r=2 c=1 rs=1 cs=1]
LayoutImage {img} at (5.55,5.55) size 333.33x249.97
LayoutText {#text} at (0,0) size 0x0
layer at (61,110) size 333x250
LayoutEmbeddedObject {object} at (5.67,5) size 333.33x249.98
layer at (61,113) size 333x250
LayoutEmbeddedObject {object} at (6.13,5.55) size 333.33x249.98
layer at (0,0) size 333x250
LayoutView at (0,0) size 333x250
layer at (0,0) size 333x250
......
......@@ -9,15 +9,15 @@ layer at (0,0) size 800x600
LayoutBR {BR} at (305,13) size 1x0
LayoutText {#text} at (0,17) size 174x16
text run at (0,17) width 174: "There should be no red visible."
LayoutTable {TABLE} at (0,48.39) size 785x19
LayoutTableSection {TBODY} at (0,0) size 785x19
LayoutTableRow {TR} at (0,1) size 785x17
LayoutTableCell {TD} at (1,1) size 181x17 [r=0 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 141x16
text run at (0,0) width 141: "getClientBoundingRect():"
LayoutTableCell {TD} at (183,1) size 601x17 [r=0 c=1 rs=1 cs=1]
LayoutText {#text} at (0,0) size 94x16
text run at (0,0) width 94: "getClientRects():"
LayoutTable {TABLE} at (0,48.39) size 785x21
LayoutTableSection {TBODY} at (0,0) size 785x21
LayoutTableRow {TR} at (0,1) size 785x19
LayoutTableCell {TD} at (1,1) size 181x18.78 [r=0 c=0 rs=1 cs=1]
LayoutText {#text} at (0,0) size 142x17
text run at (0,0) width 142: "getClientBoundingRect():"
LayoutTableCell {TD} at (183,1) size 601x18.78 [r=0 c=1 rs=1 cs=1]
LayoutText {#text} at (0,0) size 95x17
text run at (0,0) width 95: "getClientRects():"
layer at (90,90) size 90x90
LayoutBlockFlow (positioned) {DIV} at (90,90) size 90x90 [bgcolor=#FF0000]
layer at (90,90) size 90x90
......
......@@ -313,35 +313,21 @@ void LayoutTableCell::UpdateLayout() {
}
LayoutUnit LayoutTableCell::PaddingTop() const {
LayoutUnit result = ComputedCSSPaddingTop();
result += LogicalIntrinsicPaddingToPhysical().Top();
// TODO(crbug.com/377847): The ToInt call should be removed when Table is
// sub-pixel aware.
return LayoutUnit(result.ToInt());
return ComputedCSSPaddingTop() + LogicalIntrinsicPaddingToPhysical().Top();
}
LayoutUnit LayoutTableCell::PaddingBottom() const {
LayoutUnit result = ComputedCSSPaddingBottom();
result += LogicalIntrinsicPaddingToPhysical().Bottom();
// TODO(crbug.com/377847): The ToInt call should be removed when Table is
// sub-pixel aware.
return LayoutUnit(result.ToInt());
return ComputedCSSPaddingBottom() +
LogicalIntrinsicPaddingToPhysical().Bottom();
}
LayoutUnit LayoutTableCell::PaddingLeft() const {
LayoutUnit result = ComputedCSSPaddingLeft();
result += LogicalIntrinsicPaddingToPhysical().Left();
// TODO(crbug.com/377847): The ToInt call should be removed when Table is
// sub-pixel aware.
return LayoutUnit(result.ToInt());
return ComputedCSSPaddingLeft() + LogicalIntrinsicPaddingToPhysical().Left();
}
LayoutUnit LayoutTableCell::PaddingRight() const {
LayoutUnit result = ComputedCSSPaddingRight();
result += LogicalIntrinsicPaddingToPhysical().Right();
// TODO(crbug.com/377847): The ToInt call should be removed when Table is
// sub-pixel aware.
return LayoutUnit(result.ToInt());
return ComputedCSSPaddingRight() +
LogicalIntrinsicPaddingToPhysical().Right();
}
void LayoutTableCell::SetOverrideLogicalContentHeightFromRowHeight(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment