Commit 2c80fe6c authored by bdakin's avatar bdakin
Browse files

Bug #:

Submitted by:
Reviewed by:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@10566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fbb76e5a
......@@ -6,13 +6,16 @@ layer at (0,0) size 800x600
RenderTable {TABLE} at (0,0) size 784x40
RenderTableSection {TBODY} at (0,0) size 0x40
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (0,0) size 150x40 [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (0,0) size 150x40 [border: (10px outset #808080)]
RenderTableSection {TBODY} at (10,10) size 0x20
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (0,0) size 130x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderText {TEXT} at (1,1) size 121x18
text run at (1,1) width 121: "left column content"
RenderTableCell {TD} at (150,11) size 634x18 [r=0 c=1 rs=1 cs=1]
RenderText {TEXT} at (0,0) size 70x18
text run at (0,0) width 70: "second cell"
layer at (8,8) size 150x40
RenderTableCell {TD} at (0,0) size 150x40 [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (0,0) size 150x40 [border: (10px outset #808080)]
RenderTableSection {TBODY} at (10,10) size 0x20
RenderTableRow {TR} at (0,0) size 0x0
layer at (18,18) size 130x20 clip at (19,19) size 128x18
RenderTableCell {TD} at (0,0) size 130x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderText {TEXT} at (1,1) size 121x18
text run at (1,1) width 121: "left column content"
layer at (158,8) size 634x40
RenderTableCell {TD} at (150,11) size 634x18 [r=0 c=1 rs=1 cs=1]
RenderText {TEXT} at (0,0) size 70x18
text run at (0,0) width 70: "second cell"
layer at (0,0) size 785x2414
RenderCanvas at (0,0) size 785x600
layer at (0,0) size 785x2414
RenderBlock {HTML} at (0,0) size 785x2414
RenderBody {BODY} at (8,8) size 769x2398
RenderTable {TABLE} at (0,0) size 418x112 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 0x108
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (306,2) size 106x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,112) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,148) size 718x112 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 0x108
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (608,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,260) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,296) size 718x112 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 0x108
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (608,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,408) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,444) size 418x112 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 0x108
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (308,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,556) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,592) size 418x112 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 0x108
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (2,2) size 104x104 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,704) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,740) size 618x218 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 0x214
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (308,2) size 304x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 300x100 [bgcolor=#800080]
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (2,108) size 304x104 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 300x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,958) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,994) size 718x112 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 0x108
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (608,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,1106) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,1142) size 718x112 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 0x108
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (608,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,1254) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,1290) size 718x112 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 0x108
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (608,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,1402) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {DIV} at (0,1438) size 400x100
RenderTableSection at (0,0) size 0x100
RenderTableRow {DIV} at (0,0) size 0x0
RenderTableCell {DIV} at (300,0) size 100x100 [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,1538) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {DIV} at (0,1574) size 400x100
RenderTableSection at (0,0) size 0x100
RenderTableRow {DIV} at (0,0) size 0x0
RenderTableCell {DIV} at (300,0) size 100x100 [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,1674) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,1710) size 710x107
RenderTableSection {TBODY} at (0,0) size 0x107
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (605,0) size 105x107 [border: (3px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,4) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,1817) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,1853) size 710x107
RenderTableSection {TBODY} at (0,0) size 0x107
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (605,0) size 105x107 [border: (3px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,4) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,1960) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,1996) size 418x112 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 0x108
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (308,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,2108) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,2144) size 418x112 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 0x108
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (308,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
RenderBlock (anonymous) at (0,2256) size 769x36
RenderBR {BR} at (0,0) size 0x18
RenderBR {BR} at (0,18) size 0x18
RenderTable {TABLE} at (0,2292) size 470x106
RenderTableSection {TBODY} at (0,0) size 0x106
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (366,2) size 102x102 [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (1,1) size 100x100 [bgcolor=#800080]
layer at (12,12) size 302x104 clip at (13,13) size 300x102
RenderTableCell {TD} at (2,52) size 302x4 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
layer at (14,90) size 600x18
RenderBlock (positioned) {DIV} at (14,90) size 600x18 [bgcolor=#00FFFF]
RenderText {TEXT} at (0,0) size 209x18
text run at (0,0) width 209: "With absolute positioning on div."
layer at (12,160) size 604x104 clip at (13,161) size 602x102
RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
layer at (14,203) size 600x18
RenderBlock {DIV} at (2,2) size 600x18 [bgcolor=#00FFFF]
RenderText {TEXT} at (0,0) size 129x18
text run at (0,0) width 129: "With opacity on div."
layer at (12,308) size 604x104 clip at (13,309) size 602x102
RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 600x18 [bgcolor=#00FFFF]
RenderText {TEXT} at (0,0) size 131x18
text run at (0,0) width 131: "With opacity on cell."
layer at (12,456) size 304x104 clip at (13,457) size 302x102 scrollWidth 601
RenderTableCell {TD} at (2,52) size 304x4 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
RenderText {TEXT} at (0,0) size 27x18
text run at (0,0) width 27: "Test"
layer at (118,604) size 304x104 clip at (119,605) size 302x102 scrollWidth 601
RenderTableCell {TD} at (108,52) size 304x4 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
RenderText {TEXT} at (0,0) size 82x18
text run at (0,0) width 82: "Reverse Test"
layer at (12,752) size 304x104 clip at (13,753) size 302x102 scrollWidth 601
RenderTableCell {TD} at (2,52) size 304x4 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
RenderText {TEXT} at (0,0) size 81x18
text run at (0,0) width 81: "Stacked Test"
layer at (318,858) size 304x104 clip at (319,859) size 302x102 scrollWidth 601
RenderTableCell {TD} at (308,158) size 304x4 [bgcolor=#808080] [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
RenderText {TEXT} at (0,0) size 51x18
text run at (0,0) width 51: "Reverse"
layer at (12,1006) size 604x104 clip at (13,1007) size 602x102
RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
layer at (14,1049) size 600x18
RenderBlock (relative positioned) {DIV} at (2,2) size 600x18 [bgcolor=#FFA500]
RenderText {TEXT} at (0,0) size 203x18
text run at (0,0) width 203: "With relative positioning on div."
layer at (12,1154) size 604x104 clip at (13,1155) size 602x102
RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 600x18 [bgcolor=#FFC0CB]
RenderText {TEXT} at (0,0) size 205x18
text run at (0,0) width 205: "With relative positioning on cell."
layer at (12,1302) size 604x104 clip at (13,1303) size 602x102
RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 600x18 [bgcolor=#FFC0CB]
RenderText {TEXT} at (0,0) size 290x18
text run at (0,0) width 290: "With relative positioning and an offset on cell."
layer at (8,1446) size 300x100 scrollWidth 600
RenderTableCell {DIV} at (0,41) size 300x18 [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (0,0) size 300x18
RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#FFA500]
RenderText {TEXT} at (0,0) size 141x18
text run at (0,0) width 141: "With display:table-cell"
layer at (8,1582) size 300x100 scrollWidth 600
RenderTableCell {DIV} at (0,41) size 300x18 [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (0,0) size 300x18
RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#FFA500]
RenderText {TEXT} at (0,0) size 278x18
text run at (0,0) width 278: "With display:table-cell + relative positioning"
layer at (8,1718) size 605x107 clip at (11,1721) size 602x102
RenderTableCell {TD} at (0,41) size 605x25 [bgcolor=#808080] [border: (3px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (4,4) size 600x18 [bgcolor=#FFFF00]
RenderText {TEXT} at (0,0) size 215x18
text run at (0,0) width 215: "Test with border-collapse:collapse"
layer at (8,1861) size 605x107 clip at (11,1864) size 602x102
RenderTableCell {TD} at (0,41) size 605x25 [border: (3px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (4,4) size 600x18 [bgcolor=#FFFF00]
RenderText {TEXT} at (0,0) size 271x18
text run at (0,0) width 271: "Test with border-collapse:collapse no color"
layer at (12,2008) size 304x104 clip at (13,2009) size 302x87 scrollWidth 601
RenderTableCell {TD} at (2,44) size 304x19 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
RenderText {TEXT} at (0,0) size 151x18
text run at (0,0) width 151: "Test with overflow:auto"
layer at (12,2156) size 304x104 clip at (13,2157) size 287x87 scrollWidth 601
RenderTableCell {TD} at (2,44) size 304x19 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
RenderText {TEXT} at (0,0) size 158x18
text run at (0,0) width 158: "Test with overflow:scroll"
layer at (10,2302) size 362x102 clip at (40,2332) size 302x27 scrollWidth 601
RenderTableCell {TD} at (2,5) size 362x95 [bgcolor=#808080] [border: (30px solid #000000)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (31,31) size 300x18 [bgcolor=#00FF00]
RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
RenderText {TEXT} at (0,0) size 151x18
text run at (0,0) width 151: "Test with overflow:auto"
<html>
<body>
<table border=2>
<tr valign=middle>
<td width=300 style="overflow:hidden; background-color:grey">
<div style="position:absolute; top:90px; width:600px; background-color:cyan">With absolute positioning on div.</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
<br><br>
<table border=2>
<tr valign=middle>
<td width=300 style="overflow:hidden; background-color:grey">
<div style="width:600px; background-color:cyan; opacity:0.50;">With opacity on div.</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
<br><br>
<table border=2>
<tr valign=middle>
<td width=300 style="overflow:hidden; background-color:grey; opacity:0.50;">
<div style="width:600px; background-color:cyan">With opacity on cell.</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
<br><br>
<table border=2>
<tr valign=middle>
<td width=300 style="overflow:hidden; background-color:grey">
<div style="width:300px; margin-top:-20px; background-color:lime">
<div style="width:600px; background-color:green">Test</div>
</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
<br><br>
<table border=2>
<tr valign=middle>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
<td width=300 style="overflow:hidden; background-color:grey">
<div style="width:300px; margin-top:-20px; background-color:lime">
<div style="width:600px; background-color:green">Reverse Test</div>
</div>
</td>
</tr>
</table>
<br><br>
<table border=2>
<tr valign=middle>
<td width=300 style="overflow:hidden; background-color:grey">
<div style="width:300px; margin-top:-20px; background-color:lime">
<div style="width:600px; background-color:green">Stacked Test</div>
</div>
</td>
<td><div style="height:100px; background-color:purple"></div></td>
</tr>
<tr valign=middle>
<td><div style="height:100px; background-color:purple"></div></td>
<td width=300 style="overflow:hidden; background-color:grey">
<div style="width:300px; margin-top:-20px; background-color:lime">
<div style="width:600px; background-color:green">Reverse</div>
</div>
</td>
</tr>
</table>
<br><br>
<table border=2>
<tr valign=middle>
<td width=300 style="overflow:hidden; background-color:grey">
<div style="position:relative; width:600px; background-color:orange">With relative positioning on div.</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
<br><br>
<table border=2>
<tr valign=middle>
<td width=300 style="overflow:hidden; position:relative; background-color:grey">
<div style="width:600px; background-color:pink">With relative positioning on cell.</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
<br><br>
<table border=2>
<tr valign=middle>
<td width=300 style="overflow:hidden; position:relative; left:100px; background-color:grey">
<div style="width:600px; background-color:pink">With relative positioning and an offset on cell.</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
<br><br>
<div style="display:table">
<div style="display:table-row;">
<div style="display:table-cell;vertical-align:middle; overflow:hidden">
<div style="width:300px">
<div style="width:600px; background-color:orange">With display:table-cell</div>
</div>
</div>
<div style="display:table-cell"><div style="height:100px;width:100px; background-color:purple"></div></div>
</div>
</div>
<br><br>
<div style="display:table">
<div style="display:table-row;">
<div style="position:relative; left:100px; display:table-cell;vertical-align:middle; overflow:hidden">
<div style="width:300px">
<div style="width:600px; background-color:orange">With display:table-cell + relative positioning</div>
</div>
</div>
<div style="display:table-cell"><div style="height:100px;width:100px; background-color:purple"></div></div>
</div>
</div>
<br><br>
<table border=5 style="border-collapse:collapse">
<tr valign=middle>
<td width=300 style="overflow:hidden; background-color:grey">
<div style="width:600px; background-color:yellow">Test with border-collapse:collapse</div>
</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
<br><br>
<table border=5 style="border-collapse:collapse">
<tr valign=middle>
<td width=300 style="overflow:hidden;">
<div style="width:600px; background-color:yellow">Test with border-collapse:collapse no color</div>
</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
<br><br>
<table border=2>
<tr valign=middle>
<td width=300 style="overflow:auto; background-color:grey">
<div style="width:300px; margin-top:-20px; background-color:lime">
<div style="width:600px; background-color:green">Test with overflow:auto</div>
</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
<br><br>
<table border=2>
<tr valign=middle>
<td width=300 style="overflow:scroll; background-color:grey">
<div style="width:300px; margin-top:-20px; background-color:lime">
<div style="width:600px; background-color:green">Test with overflow:scroll</div>
</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
<br><br>
<table>
<tr valign=middle>
<td width=300 style="overflow:auto; background-color:grey; border: 30px solid black">
<div style="width:300px; background-color:lime">
<div style="width:600px; background-color:green">Test with overflow:auto</div>
</div>
</td>
<td><div style="height:100px;width:100px; background-color:purple"></div></td>
</tr>
</table>
</body>
</html>
2005-09-19 Beth Dakin <bdakin@apple.com>
Reviewed by Hyatt
Test cases added: fast/table/overflowHidden.html
-Fixed <rdar://problem/3885711> (4047) CSS: Content displays incorrectly in tables with TD style set overflow:hidden
Table cells render correctly with overflow:hidden, :auto, and :scroll specified. Cells now have a layer when overflow is specified.
* khtml/css/cssstyleselector.cpp: Make sure table cells do not honor position:relative
(khtml::CSSStyleSelector::adjustRenderStyle):
* khtml/rendering/render_block.cpp: Add borderTopExtra() and borderBottomExtra() to various calculations of table cell height so that scroll bars render properly.
(khtml::RenderBlock::isPointInScrollbar):
(khtml::RenderBlock::nodeAtPoint):
* khtml/rendering/render_box.cpp: Allow table cells to have overflow, and add borderTopExtra() and borderBottomExtra() to calculation of the clip rect.
(RenderBox::setStyle):
(RenderBox::getOverflowClipRect):
* khtml/rendering/render_box.h: Removed definitions of borderTopExtra() and borderBottomExtra() so that they occur at the RenderObject level now.
* khtml/rendering/render_layer.cpp: Layers must also take borderTopExtra() and borderBottomExtra() into account.
(khtml::RenderLayer::updateLayerPosition):
(khtml::RenderLayer::paintLayer):
(khtml::RenderLayer::hitTestLayer):
* khtml/rendering/render_object.cpp: Use m_overflowClip instead of hasOverflowClip() for consistency.
(RenderObject::requiresLayer):
* khtml/rendering/render_object.h: Add definitions of borderTopExtra() and borderBottomExtra() to RenderObject level.
(khtml::RenderObject::borderTopExtra):
(khtml::RenderObject::borderBottomExtra):
* khtml/rendering/render_table.cpp: Allow table cells to have a layer if overflow is specified.
(RenderTableSection::paint):
(RenderTableCell::requiresLayer):
(RenderTableCell::paint):
(RenderTableCell::paintBoxDecorations):
* layout-tests/fast/table/029-expected.txt: This layout test now paints a layer because it specifies overflow:hidden
* layout-tests/fast/table/overflowHidden-expected.txt: Added.
* layout-tests/fast/table/overflowHidden.html: Added.
2005-09-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Geoff.
......
......@@ -922,9 +922,9 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, ElementImpl *e)
}
// After performing the display mutation, check table rows. We do not honor position:relative on
// table rows. This has been established in CSS2.1 (and caused a crash in containingBlock() on
// some sites).
if (style->display() == TABLE_ROW && style->position() == RELATIVE)
// table rows or cells. This has been established in CSS2.1 (and caused a crash in containingBlock()
// on some sites).
if ((style->display() == TABLE_ROW || style->display() == TABLE_CELL) && style->position() == RELATIVE)
style->setPosition(STATIC);
}
......
......@@ -2428,9 +2428,9 @@ bool RenderBlock::isPointInScrollbar(int _x, int _y, int _tx, int _ty)
if (m_layer->verticalScrollbarWidth()) {
QRect vertRect(_tx + width() - borderRight() - m_layer->verticalScrollbarWidth(),
_ty + borderTop(),
_ty + borderTop() - borderTopExtra(),
m_layer->verticalScrollbarWidth(),
height()-borderTop()-borderBottom());
height() + borderTopExtra() + borderBottomExtra() - borderTop() - borderBottom());
if (vertRect.contains(_x, _y)) {
RenderLayer::gScrollBar = m_layer->verticalScrollbar();
return true;
......@@ -2439,8 +2439,8 @@ bool RenderBlock::isPointInScrollbar(int _x, int _y, int _tx, int _ty)
if (m_layer->horizontalScrollbarHeight()) {
QRect horizRect(_tx + borderLeft(),
_ty + height() - borderBottom() - m_layer->horizontalScrollbarHeight(),
width()-borderLeft()-borderRight(),
_ty + height() + borderTop() + borderBottomExtra() - m_layer->horizontalScrollbarHeight() - borderBottom(),
width() - borderLeft() - borderRight(),
m_layer->horizontalScrollbarHeight());
if (horizRect.contains(_x, _y)) {
RenderLayer::gScrollBar = m_layer->horizontalScrollbar();
......@@ -2475,7 +2475,6 @@ bool RenderBlock::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
}
}
// See if we're inside the scrollbar (if we're overflow:scroll/auto).
if (isPointInScrollbar(_x, _y, tx, ty)) {
if (hitTestAction == HitTestBlockBackground) {
setInnerNode(info);
......
......@@ -98,17 +98,17 @@ void RenderBox::setStyle(RenderStyle *_style)
setRelPositioned(true);
}
// FIXME: Note that we restrict overflow to blocks for now. One day table bodies and cells
// FIXME: Note that we restrict overflow to blocks for now. One day table bodies
// will need to support overflow.
// We also handle <body> and <html>, whose overflow applies to the viewport.
if (_style->overflow() != OVISIBLE && isBlockFlow() && !isTableCell() && !isRoot() && (!isBody() || !document()->isHTMLDocument()))
if (_style->overflow() != OVISIBLE && isBlockFlow() && !isRoot() && (!isBody() || !document()->isHTMLDocument()))
setHasOverflowClip();
if (requiresLayer()) {
if (!m_layer) {
m_layer = new (renderArena()) RenderLayer(this);
m_layer->insertOnlyThisLayer();
if (containingBlock())
if (parent() && containingBlock())
m_layer->updateLayerPositions();
}
}
......@@ -587,10 +587,10 @@ QRect RenderBox::getOverflowClipRect(int tx, int ty)
// XXX When overflow-clip (CSS3) is implemented, we'll obtain the property
// here.
int bl=borderLeft(),bt=borderTop(),bb=borderBottom(),br=borderRight();
int clipx = tx+bl;
int clipy = ty+bt;
int clipw = m_width-bl-br;
int cliph = m_height-bt-bb;
int clipx = tx + bl;
int clipy = ty + bt;
int clipw = m_width - bl - br;
int cliph = m_height - bt - bb + borderTopExtra() + borderBottomExtra();
// Subtract out scrollbars if we have them.
if (m_layer) {
......
......@@ -152,9 +152,6 @@ protected:
void paintBackground(QPainter *p, const QColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int h);
void outlineBox(QPainter *p, int _tx, int _ty, const char *color = "red");
virtual int borderTopExtra() const { return 0; }
virtual int borderBottomExtra() const { return 0; }
void calcAbsoluteHorizontal();
void calcAbsoluteVertical();
void calcAbsoluteHorizontalValues(WidthType widthType, RenderObject* cb, int cw, int pab, int static_distance,
......
......@@ -201,7 +201,7 @@ void RenderLayer::updateLayerPosition()
return;
int x = m_object->xPos();
int y = m_object->yPos();
int y = m_object->yPos() - m_object->borderTopExtra();
if (!m_object->isPositioned()) {
// We must adjust our position by walking up the render tree looking for the
......@@ -212,6 +212,7 @@ void RenderLayer::updateLayerPosition()
y += curr->yPos();
curr = curr->parent();