[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jamesr at google.com
jamesr at google.com
Wed Dec 22 11:32:22 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b426623eebc23d7cfa7f2f6bd9e2a25c95510513
Author: jamesr at google.com <jamesr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jul 28 20:07:19 2010 +0000
2010-07-28 fsamuel at chromium.org <fsamuel at chromium.org>
Reviewed by David Hyatt.
REGRESSION (r63994): Bank of America's home page is horribly mis-rendered
https://bugs.webkit.org/show_bug.cgi?id=42993
Fixed bug introduced by patch for bug 40775.
The new table rendering code did not take into account table layouts starting
during a partial construction of the table render tree. As such,
multiple layouts on the same table resulted in more columns being generated.
This patch solves this issue.
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::cellAbove):
(WebCore::RenderTable::cellBelow):
(WebCore::RenderTable::cellBefore):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::ensureRows):
(WebCore::RenderTableSection::addCell):
(WebCore::RenderTableSection::setCellWidths):
(WebCore::RenderTableSection::calcRowHeight):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::paintObject):
(WebCore::RenderTableSection::appendColumn):
(WebCore::RenderTableSection::splitColumn):
* rendering/RenderTableSection.h:
(WebCore::RenderTableSection::CellStruct::CellStruct):
2010-07-28 fsamuel at chromium.org <fsamuel at chromium.org>
Reviewed by David Hyatt.
REGRESSION (r63994): Bank of America's home page is horribly mis-rendered
https://bugs.webkit.org/show_bug.cgi?id=42993
Restored the expectation for the slashdot logo table test.
Added a new layout test to check for the correctness of early table layout.
* fast/table/early-table-layout.html: Added.
* platform/chromium/test_expectations.txt:
* platform/gtk/fast/table/early-table-layout-expected.checksum: Added.
* platform/gtk/fast/table/early-table-layout-expected.png: Added.
* platform/gtk/fast/table/early-table-layout-expected.txt: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9d0896a..5ee8b31 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2010-07-28 fsamuel at chromium.org <fsamuel at chromium.org>
+
+ Reviewed by David Hyatt.
+
+ REGRESSION (r63994): Bank of America's home page is horribly mis-rendered
+ https://bugs.webkit.org/show_bug.cgi?id=42993
+
+ Restored the expectation for the slashdot logo table test.
+
+ Added a new layout test to check for the correctness of early table layout.
+
+ * fast/table/early-table-layout.html: Added.
+ * platform/chromium/test_expectations.txt:
+ * platform/gtk/fast/table/early-table-layout-expected.checksum: Added.
+ * platform/gtk/fast/table/early-table-layout-expected.png: Added.
+ * platform/gtk/fast/table/early-table-layout-expected.txt: Added.
+
2010-07-28 Victor Wang <victorw at chromium.org>
Unreviewed. Update chromium test expectations for tesst that
diff --git a/LayoutTests/fast/table/early-table-layout.html b/LayoutTests/fast/table/early-table-layout.html
new file mode 100644
index 0000000..274796f
--- /dev/null
+++ b/LayoutTests/fast/table/early-table-layout.html
@@ -0,0 +1,29 @@
+<html>
+<head>
+<title>Force early table layout</title>
+</head>
+ <body>
+ <table border="1" width="500">
+ <tr>
+ <td>
+ cell 1,1
+ </td>
+ <td>
+ cell 1,2
+ </td>
+ </tr>
+ <tr>
+ <td>
+ cell 2,1
+ </td>
+ <script>
+ // Force an early layout
+ var w = document.body.offsetWidth;
+ </script>
+ <td>
+ cell 2,2
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index d089647..14054fb 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -66,6 +66,7 @@ BUG24182 SLOW LINUX MAC RELEASE : http/tests/navigation/multiple-back-forward-en
BUG24182 SLOW LINUX DEBUG : http/tests/navigation/multiple-back-forward-entries.html = PASS
BUG24182 SLOW : http/tests/xmlhttprequest/simple-cross-origin-progress-events.html = PASS
BUG24182 SLOW WIN MAC : svg/custom/invisible-text-after-scrolling.xhtml = PASS
+BUG24182 SLOW : tables/mozilla/other/slashlogo.html = PASS
BUG24182 SLOW WIN RELEASE : tables/mozilla/bugs/bug113235-1.html = PASS
BUG24182 SLOW DEBUG : fast/js/toString-and-valueOf-override.html = PASS
diff --git a/LayoutTests/platform/gtk/fast/table/early-table-layout-expected.checksum b/LayoutTests/platform/gtk/fast/table/early-table-layout-expected.checksum
new file mode 100644
index 0000000..358b66e
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/table/early-table-layout-expected.checksum
@@ -0,0 +1 @@
+b8002ce8957fec7ead9908d3f45b4d17
\ No newline at end of file
diff --git a/LayoutTests/platform/gtk/fast/table/early-table-layout-expected.png b/LayoutTests/platform/gtk/fast/table/early-table-layout-expected.png
new file mode 100644
index 0000000..3d64420
Binary files /dev/null and b/LayoutTests/platform/gtk/fast/table/early-table-layout-expected.png differ
diff --git a/LayoutTests/platform/gtk/fast/table/early-table-layout-expected.txt b/LayoutTests/platform/gtk/fast/table/early-table-layout-expected.txt
new file mode 100644
index 0000000..3d22164
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/table/early-table-layout-expected.txt
@@ -0,0 +1,21 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderTable {TABLE} at (0,0) size 500x56 [border: (1px outset #808080)]
+ RenderTableSection {TBODY} at (1,1) size 498x54
+ RenderTableRow {TR} at (0,2) size 498x24
+ RenderTableCell {TD} at (2,2) size 246x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 46x20
+ text run at (2,2) width 46: "cell 1,1"
+ RenderTableCell {TD} at (250,2) size 246x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 46x20
+ text run at (2,2) width 46: "cell 1,2"
+ RenderTableRow {TR} at (0,28) size 498x24
+ RenderTableCell {TD} at (2,28) size 246x24 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 46x20
+ text run at (2,2) width 46: "cell 2,1"
+ RenderTableCell {TD} at (250,28) size 246x24 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+ RenderText {#text} at (2,2) size 46x20
+ text run at (2,2) width 46: "cell 2,2"
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 32e55c0..14e8b81 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,35 @@
+2010-07-28 fsamuel at chromium.org <fsamuel at chromium.org>
+
+ Reviewed by David Hyatt.
+
+ REGRESSION (r63994): Bank of America's home page is horribly mis-rendered
+ https://bugs.webkit.org/show_bug.cgi?id=42993
+
+ Fixed bug introduced by patch for bug 40775.
+
+ The new table rendering code did not take into account table layouts starting
+ during a partial construction of the table render tree. As such,
+ multiple layouts on the same table resulted in more columns being generated.
+ This patch solves this issue.
+
+ * rendering/AutoTableLayout.cpp:
+ (WebCore::AutoTableLayout::recalcColumn):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::cellAbove):
+ (WebCore::RenderTable::cellBelow):
+ (WebCore::RenderTable::cellBefore):
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::ensureRows):
+ (WebCore::RenderTableSection::addCell):
+ (WebCore::RenderTableSection::setCellWidths):
+ (WebCore::RenderTableSection::calcRowHeight):
+ (WebCore::RenderTableSection::layoutRows):
+ (WebCore::RenderTableSection::paintObject):
+ (WebCore::RenderTableSection::appendColumn):
+ (WebCore::RenderTableSection::splitColumn):
+ * rendering/RenderTableSection.h:
+ (WebCore::RenderTableSection::CellStruct::CellStruct):
+
2010-07-28 Tony Gentilcore <tonyg at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebCore/rendering/AutoTableLayout.cpp b/WebCore/rendering/AutoTableLayout.cpp
index 0715caa..a064f2a 100644
--- a/WebCore/rendering/AutoTableLayout.cpp
+++ b/WebCore/rendering/AutoTableLayout.cpp
@@ -125,7 +125,7 @@ void AutoTableLayout::recalcColumn(int effCol)
break;
}
} else {
- if (cell && (!effCol || cell->section()->primaryCellAt(i, effCol-1) != cell)) {
+ if (cell && (!effCol || section->primaryCellAt(i, effCol-1) != cell)) {
// This spanning cell originates in this column. Ensure we have
// a min/max width of at least 1px for this column now.
l.minWidth = max(l.minWidth, cellHasContent ? 1 : 0);
diff --git a/WebCore/rendering/RenderTable.cpp b/WebCore/rendering/RenderTable.cpp
index 658fd9c..c3b2b2f 100644
--- a/WebCore/rendering/RenderTable.cpp
+++ b/WebCore/rendering/RenderTable.cpp
@@ -1019,12 +1019,7 @@ RenderTableCell* RenderTable::cellAbove(const RenderTableCell* cell) const
// Look up the cell in the section's grid, which requires effective col index
if (section) {
int effCol = colToEffCol(cell->col());
- RenderTableSection::CellStruct aboveCell;
- // If we hit a span back up to a real cell.
- do {
- aboveCell = section->cellAt(rAbove, effCol);
- effCol--;
- } while (!aboveCell.hasCells() && aboveCell.inColSpan && effCol >= 0);
+ RenderTableSection::CellStruct& aboveCell = section->cellAt(rAbove, effCol);
return aboveCell.primaryCell();
} else
return 0;
@@ -1051,12 +1046,7 @@ RenderTableCell* RenderTable::cellBelow(const RenderTableCell* cell) const
// Look up the cell in the section's grid, which requires effective col index
if (section) {
int effCol = colToEffCol(cell->col());
- RenderTableSection::CellStruct belowCell;
- // If we hit a colspan back up to a real cell.
- do {
- belowCell = section->cellAt(rBelow, effCol);
- effCol--;
- } while (!belowCell.hasCells() && belowCell.inColSpan && effCol >= 0);
+ RenderTableSection::CellStruct& belowCell = section->cellAt(rBelow, effCol);
return belowCell.primaryCell();
} else
return 0;
@@ -1072,11 +1062,7 @@ RenderTableCell* RenderTable::cellBefore(const RenderTableCell* cell) const
return 0;
// If we hit a colspan back up to a real cell.
- RenderTableSection::CellStruct prevCell;
- do {
- prevCell = section->cellAt(cell->row(), effCol - 1);
- effCol--;
- } while (!prevCell.hasCells() && prevCell.inColSpan && effCol >= 0);
+ RenderTableSection::CellStruct& prevCell = section->cellAt(cell->row(), effCol - 1);
return prevCell.primaryCell();
}
diff --git a/WebCore/rendering/RenderTableSection.cpp b/WebCore/rendering/RenderTableSection.cpp
index 8c8d130..2517cab 100644
--- a/WebCore/rendering/RenderTableSection.cpp
+++ b/WebCore/rendering/RenderTableSection.cpp
@@ -161,12 +161,8 @@ bool RenderTableSection::ensureRows(int numRows)
}
m_gridRows = numRows;
int nCols = max(1, table()->numEffCols());
- CellStruct emptyCellStruct;
- emptyCellStruct.inColSpan = false;
- emptyCellStruct.empty = false;
for (int r = nRows; r < numRows; r++) {
m_grid[r].row = new Row(nCols);
- m_grid[r].row->fill(emptyCellStruct);
m_grid[r].rowRenderer = 0;
m_grid[r].baseline = 0;
m_grid[r].height = Length();
@@ -191,6 +187,7 @@ void RenderTableSection::addCell(RenderTableCell* cell, RenderTableRow* row)
// </TABLE>
while (m_cCol < nCols && (cellAt(m_cRow, m_cCol).hasCells() || cellAt(m_cRow, m_cCol).inColSpan))
m_cCol++;
+
if (rSpan == 1) {
// we ignore height settings on rowspan cells
Length height = cell->style()->height();
@@ -224,28 +221,28 @@ void RenderTableSection::addCell(RenderTableCell* cell, RenderTableRow* row)
// tell the cell where it is
bool inColSpan = false;
while (cSpan) {
- int currentSpan;
- if (m_cCol >= nCols) {
- table()->appendColumn(cSpan);
- currentSpan = cSpan;
- } else {
- if (cSpan < (int)columns[m_cCol].span)
- table()->splitColumn(m_cCol, cSpan);
- currentSpan = columns[m_cCol].span;
- }
- for (int r = 0; r < rSpan; r++) {
- CellStruct& c = cellAt(m_cRow + r, m_cCol);
- ASSERT(cell);
- c.cells.append(cell);
- // If cells overlap then we take the slow path for painting.
- if (c.cells.size() > 1)
- m_hasMultipleCellLevels = true;
- if (inColSpan)
- c.inColSpan = true;
- }
- m_cCol++;
- cSpan -= currentSpan;
- inColSpan = true;
+ int currentSpan;
+ if (m_cCol >= nCols) {
+ table()->appendColumn(cSpan);
+ currentSpan = cSpan;
+ } else {
+ if (cSpan < (int)columns[m_cCol].span)
+ table()->splitColumn(m_cCol, cSpan);
+ currentSpan = columns[m_cCol].span;
+ }
+ for (int r = 0; r < rSpan; r++) {
+ CellStruct& c = cellAt(m_cRow + r, m_cCol);
+ ASSERT(cell);
+ c.cells.append(cell);
+ // If cells overlap then we take the slow path for painting.
+ if (c.cells.size() > 1)
+ m_hasMultipleCellLevels = true;
+ if (inColSpan)
+ c.inColSpan = true;
+ }
+ m_cCol++;
+ cSpan -= currentSpan;
+ inColSpan = true;
}
cell->setRow(m_cRow);
cell->setCol(table()->effColToCol(col));
@@ -260,21 +257,11 @@ void RenderTableSection::setCellWidths()
for (int i = 0; i < m_gridRows; i++) {
Row& row = *m_grid[i].row;
int cols = row.size();
- RenderTableCell* lastCell = 0;
for (int j = 0; j < cols; j++) {
CellStruct& current = row[j];
RenderTableCell* cell = current.primaryCell();
- if (!cell) {
- ASSERT(lastCell || !current.inColSpan);
- if (lastCell)
- current.cells.append(lastCell);
- if (!current.inColSpan)
- current.empty = true;
+ if (!cell || current.inColSpan)
continue;
- }
- if (current.inColSpan || current.empty)
- continue;
- lastCell = cell;
int endCol = j;
int cspan = cell->colSpan();
while (cspan && endCol < cols) {
@@ -335,8 +322,8 @@ int RenderTableSection::calcRowHeight()
for (int c = 0; c < totalCols; c++) {
CellStruct& current = cellAt(r, c);
cell = current.primaryCell();
- ASSERT(cell || current.empty);
- if (!cell || current.empty || current.inColSpan)
+
+ if (!cell || current.inColSpan)
continue;
if ((cell->row() + cell->rowSpan() - 1) > r)
@@ -511,7 +498,7 @@ int RenderTableSection::layoutRows(int toAdd)
CellStruct& cs = cellAt(r, c);
RenderTableCell* cell = cs.primaryCell();
- if (!cell || cs.empty || cs.inColSpan)
+ if (!cell || cs.inColSpan)
continue;
rindx = cell->row();
@@ -651,7 +638,7 @@ int RenderTableSection::layoutRows(int toAdd)
for (int c = 0; c < nEffCols; c++) {
CellStruct& cs = cellAt(r, c);
RenderTableCell* cell = cs.primaryCell();
- if (!cell || cs.empty || cs.inColSpan)
+ if (!cell || cs.inColSpan)
continue;
if (r < totalRows - 1 && cell == primaryCellAt(r + 1, c))
continue;
@@ -1064,7 +1051,7 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)
for (unsigned c = startcol; c < endcol; c++) {
CellStruct& current = cellAt(r, c);
RenderTableCell* cell = current.primaryCell();
- if (current.empty || (r > startrow && primaryCellAt(r - 1, c) == cell) || (c > startcol && primaryCellAt(r, c - 1) == cell))
+ if (!cell || (r > startrow && primaryCellAt(r - 1, c) == cell) || (c > startcol && primaryCellAt(r, c - 1) == cell))
continue;
paintCell(cell, paintInfo, tx, ty);
}
@@ -1076,7 +1063,7 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)
for (unsigned r = startrow; r < endrow; r++) {
for (unsigned c = startcol; c < endcol; c++) {
CellStruct& current = cellAt(r, c);
- if (current.empty)
+ if (!current.hasCells())
continue;
for (unsigned i = 0; i < current.cells.size(); ++i) {
if (current.cells[i]->rowSpan() > 1 || current.cells[i]->colSpan() > 1) {
@@ -1156,12 +1143,8 @@ int RenderTableSection::numColumns() const
void RenderTableSection::appendColumn(int pos)
{
- for (int row = 0; row < m_gridRows; ++row) {
+ for (int row = 0; row < m_gridRows; ++row)
m_grid[row].row->resize(pos + 1);
- CellStruct& c = cellAt(row, pos);
- c.inColSpan = false;
- c.empty = false;
- }
}
void RenderTableSection::splitColumn(int pos, int first)
@@ -1183,7 +1166,6 @@ void RenderTableSection::splitColumn(int pos, int first)
} else {
r[pos + 1].inColSpan = 0;
}
- r[pos + 1].empty = false;
}
}
diff --git a/WebCore/rendering/RenderTableSection.h b/WebCore/rendering/RenderTableSection.h
index e3c09bc..6d2f752 100644
--- a/WebCore/rendering/RenderTableSection.h
+++ b/WebCore/rendering/RenderTableSection.h
@@ -56,16 +56,9 @@ public:
struct CellStruct {
Vector<RenderTableCell*, 1> cells;
bool inColSpan; // true for columns after the first in a colspan
- bool empty;
CellStruct():
- inColSpan(false),
- empty(false) {}
-
- CellStruct(const CellStruct& other):
- cells(other.cells),
- inColSpan(other.inColSpan),
- empty(other.empty) {}
+ inColSpan(false) {}
RenderTableCell* primaryCell()
{
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list