+2011-10-25 Fady Samuel <fsamuel@chromium.org>
+
+ Made Table tests for Bug 70678 Platform Independent
+ https://bugs.webkit.org/show_bug.cgi?id=70850
+
+ Reviewed by Adam Barth.
+
+ * fast/table/table-anonymous-cell-bug-expected.png: Added.
+ * fast/table/table-anonymous-cell-bug-expected.txt:
+ * fast/table/table-anonymous-cell-bug.html:
+ * fast/table/table-anonymous-row-bug-expected.png: Added.
+ * fast/table/table-anonymous-row-bug-expected.txt:
+ * fast/table/table-anonymous-row-bug.html:
+ * fast/table/table-anonymous-section-bug-expected.png: Added.
+ * fast/table/table-anonymous-section-bug-expected.txt:
+ * fast/table/table-anonymous-section-bug.html:
+
2011-10-25 Ryosuke Niwa <rniwa@webkit.org>
Moving to the start of line should not place the caret outside of the table
layer at (0,0) size 800x66
RenderBlock {HTML} at (0,0) size 800x66
RenderBody {BODY} at (8,8) size 784x50
- RenderTable {DIV} at (0,0) size 260x50
- RenderTableSection {DIV} at (0,0) size 260x50
- RenderTableRow {DIV} at (0,0) size 260x50
+ RenderTable {DIV} at (0,0) size 150x50
+ RenderTableSection {DIV} at (0,0) size 150x50
+ RenderTableRow {DIV} at (0,0) size 150x50
RenderTableCell {DIV} at (0,0) size 50x0 [bgcolor=#0000FF] [r=0 c=0 rs=1 cs=1]
- RenderTableCell (anonymous) at (50,0) size 160x16 [r=0 c=1 rs=1 cs=1]
- RenderInline {SPAN} at (0,0) size 160x16
- RenderText {#text} at (0,0) size 160x16
- text run at (0,0) width 160: "Some text."
- RenderTableCell {DIV} at (210,0) size 50x0 [bgcolor=#0000FF] [r=0 c=2 rs=1 cs=1]
+ RenderTableCell (anonymous) at (50,0) size 50x50 [r=0 c=1 rs=1 cs=1]
+ RenderBlock {DIV} at (0,0) size 50x50 [bgcolor=#008000]
+ RenderTableCell {DIV} at (100,0) size 50x0 [bgcolor=#0000FF] [r=0 c=2 rs=1 cs=1]
div.section { display: table-row-group; }
div.cell { display: table-cell; width: 50px; height: 50px; background-color: blue; }
div.row { display: table-row; }
+ div.test { background-color: green; width: 50px; height: 50px; }
</style>
<div class="table" id="table-1">
</div>
<script>
- function createSpan()
+ function createDiv()
{
- var spanElement = document.createElement("span");
- spanElement.appendChild(document.createTextNode("Some text."));
- return spanElement;
+ var divElement = document.createElement("div");
+ divElement.setAttribute("class", "test");
+ return divElement;
}
- function insertSpan(tableID, beforeID)
+ function insertDiv(tableID, beforeID)
{
var tableRow = document.getElementById(tableID);
var before = document.getElementById(beforeID);
- tableRow.insertBefore(createSpan(), before);
+ tableRow.insertBefore(createDiv(), before);
}
document.body.offsetTop;
- insertSpan("row-1", "cell-2");
+ insertDiv("row-1", "cell-2");
</script>
</body>
</html>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x132
- RenderBlock {HTML} at (0,0) size 800x132
- RenderBody {BODY} at (8,8) size 784x116
- RenderTable {DIV} at (0,0) size 160x116
- RenderTableSection (anonymous) at (0,0) size 160x116
- RenderTableRow {DIV} at (0,0) size 160x50
- RenderTableCell {DIV} at (0,0) size 160x16 [bgcolor=#0000FF] [r=0 c=0 rs=1 cs=1]
- RenderText {#text} at (0,0) size 96x16
- text run at (0,0) width 96: "Cell 1"
- RenderTableRow (anonymous) at (0,50) size 160x16
- RenderTableCell (anonymous) at (0,50) size 160x16 [r=1 c=0 rs=1 cs=1]
- RenderInline {SPAN} at (0,0) size 160x16
- RenderText {#text} at (0,0) size 160x16
- text run at (0,0) width 160: "Some text."
- RenderTableRow {DIV} at (0,66) size 160x50
- RenderTableCell {DIV} at (0,66) size 160x16 [bgcolor=#0000FF] [r=2 c=0 rs=1 cs=1]
- RenderText {#text} at (0,0) size 96x16
- text run at (0,0) width 96: "Cell 2"
+layer at (0,0) size 800x166
+ RenderBlock {HTML} at (0,0) size 800x166
+ RenderBody {BODY} at (8,8) size 784x150
+ RenderTable {DIV} at (0,0) size 50x150
+ RenderTableSection (anonymous) at (0,0) size 50x150
+ RenderTableRow {DIV} at (0,0) size 50x50
+ RenderTableCell {DIV} at (0,0) size 50x0 [bgcolor=#0000FF] [r=0 c=0 rs=1 cs=1]
+ RenderTableRow (anonymous) at (0,50) size 50x50
+ RenderTableCell (anonymous) at (0,50) size 50x50 [r=1 c=0 rs=1 cs=1]
+ RenderBlock {DIV} at (0,0) size 50x50 [bgcolor=#008000]
+ RenderTableRow {DIV} at (0,100) size 50x50
+ RenderTableCell {DIV} at (0,100) size 50x0 [bgcolor=#0000FF] [r=2 c=0 rs=1 cs=1]
div.table { display: table; }
div.cell { display: table-cell; width: 50px; height: 50px; background-color: blue; }
div.row { display: table-row; }
+ div.test { background-color: green; width: 50px; height: 50px; }
</style>
<div class="table" id="table-1">
<div class="row" id="row-1">
- <div class="cell">Cell 1</div>
+ <div class="cell"></div>
</div>
<div class="row" id="row-2">
- <div class="cell">Cell 2</div>
+ <div class="cell"></div>
</div>
</div>
<script>
- function createSpan()
+ function createDiv()
{
- var spanElement = document.createElement("span");
- spanElement.appendChild(document.createTextNode("Some text."));
- return spanElement;
+ var divElement = document.createElement("div");
+ divElement.setAttribute("class", "test");
+ return divElement;
}
- function insertSpan(tableID, beforeID)
+ function insertDiv(tableID, beforeID)
{
var table = document.getElementById(tableID);
var before = document.getElementById(beforeID);
- table.insertBefore(createSpan(), before);
+ table.insertBefore(createDiv(), before);
}
document.body.offsetTop;
- insertSpan("table-1", "row-2");
+ insertDiv("table-1", "row-2");
</script>
</body>
</html>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x32
- RenderBlock {HTML} at (0,0) size 800x32
- RenderBody {BODY} at (8,8) size 784x16
- RenderTable {DIV} at (0,0) size 160x16
- RenderTableSection {DIV} at (0,0) size 160x0
- RenderTableSection (anonymous) at (0,0) size 160x16
- RenderTableRow (anonymous) at (0,0) size 160x16
- RenderTableCell (anonymous) at (0,0) size 160x16 [r=0 c=0 rs=1 cs=1]
- RenderInline {SPAN} at (0,0) size 160x16
- RenderText {#text} at (0,0) size 160x16
- text run at (0,0) width 160: "Some text."
- RenderTableSection {DIV} at (0,16) size 160x0
+layer at (0,0) size 800x66
+ RenderBlock {HTML} at (0,0) size 800x66
+ RenderBody {BODY} at (8,8) size 784x50
+ RenderTable {DIV} at (0,0) size 50x50
+ RenderTableSection {DIV} at (0,0) size 50x0
+ RenderTableSection (anonymous) at (0,0) size 50x50
+ RenderTableRow (anonymous) at (0,0) size 50x50
+ RenderTableCell (anonymous) at (0,0) size 50x50 [r=0 c=0 rs=1 cs=1]
+ RenderBlock {DIV} at (0,0) size 50x50 [bgcolor=#008000]
+ RenderTableSection {DIV} at (0,50) size 50x0
<style>
div.table { display: table; }
div.section { display: table-row-group; }
+ div.test { background-color: green; width: 50px; height: 50px; }
</style>
<div class="table" id="table-1">
</div>
<script>
- function createSpan()
+ function createDiv()
{
- var spanElement = document.createElement("span");
- spanElement.appendChild(document.createTextNode("Some text."));
- return spanElement;
+ var divElement = document.createElement("div");
+ divElement.setAttribute("class", "test");
+ return divElement;
}
- function insertSpan(tableID, beforeID)
+ function insertDiv(tableID, beforeID)
{
var table = document.getElementById(tableID);
var before = document.getElementById(beforeID);
- table.insertBefore(createSpan(), before);
+ table.insertBefore(createDiv(), before);
}
document.body.offsetTop;
- insertSpan("table-1", "tbody-2");
+ insertDiv("table-1", "tbody-2");
</script>
</body>
</html>