Diff
Modified: releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog (108282 => 108283)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog 2012-02-21 02:35:19 UTC (rev 108282)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog 2012-02-21 02:37:59 UTC (rev 108283)
@@ -1,3 +1,13 @@
+2012-02-20 Vsevolod Vlasov <[email protected]>
+
+ Unreviewed manual rollout of r107970 which breaks table column widths
+ updates from _javascript_ (e.g. inspector's network panel).
+
+ * css2.1/20110323/fixed-table-layout-013-expected.html: Removed.
+ * css2.1/20110323/fixed-table-layout-013.htm: Removed.
+ * css2.1/20110323/fixed-table-layout-015-expected.html: Removed.
+ * css2.1/20110323/fixed-table-layout-015.htm: Removed.
+
2012-02-19 Robert Hogan <[email protected]>
Chromium results for r108185
Deleted: releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-013-expected.html (108282 => 108283)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-013-expected.html 2012-02-21 02:35:19 UTC (rev 108282)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-013-expected.html 2012-02-21 02:37:59 UTC (rev 108283)
@@ -1,38 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
- <head>
- <title>CSS Test: Reference Result</title>
- <style type="text/css">
- table
- {
- border-collapse: collapse;
- table-layout: fixed;
- width: 200px;
- }
- #cell
- {
- background: black;
- width: 100px;
- }
- #div1
- {
- background: blue;
- width: 100px;
- }
- #div1, #cell
- {
- height: 1em;
- }
- </style>
- </head>
- <body>
- <p>Test passes if the boxes below are the same width.</p>
- <table>
- <tr>
- <td id="cell"></td>
- <td></td>
- </tr>
- </table>
- <div id="div1"></div>
- </body>
-</html>
\ No newline at end of file
Deleted: releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-013.htm (108282 => 108283)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-013.htm 2012-02-21 02:35:19 UTC (rev 108282)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-013.htm 2012-02-21 02:37:59 UTC (rev 108283)
@@ -1,51 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
- <head>
- <title>CSS Test: Fixed table layout - specified column-group width</title>
- <link rel="author" title="Microsoft" href=""
- <link rel="help" href=""
- <meta name="flags" content="">
- <meta name="assert" content="Specified column-group width is ignored in fixed table layout.">
- <style type="text/css">
- table
- {
- border-collapse: collapse;
- table-layout: fixed;
- width: 200px;
- }
- #colgroup
- {
- width: 50px;
- }
- #cell
- {
- background: black;
- }
- #div1
- {
- background: blue;
- width: 100px;
- }
- #div1, #cell
- {
- height: 1em;
- }
- </style>
- </head>
- <body>
- <p>Test passes if the boxes below are the same width.</p>
- <table>
- <colgroup id="colgroup">
- <col>
- </colgroup>
- <colgroup>
- <col>
- </colgroup>
- <tr>
- <td id="cell"></td>
- <td></td>
- </tr>
- </table>
- <div id="div1"></div>
- </body>
-</html>
\ No newline at end of file
Deleted: releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-015-expected.html (108282 => 108283)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-015-expected.html 2012-02-21 02:35:19 UTC (rev 108282)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-015-expected.html 2012-02-21 02:37:59 UTC (rev 108283)
@@ -1,42 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
- <head>
- <title>CSS Test: Reference Result</title>
- <style type="text/css">
- table
- {
- border-spacing: 0;
- table-layout: fixed;
- width: 200px;
- }
- #cell
- {
- background: black;
- width: 100px;
- }
- td
- {
- padding: 0;
- }
- #div1
- {
- background: blue;
- width: 100px;
- }
- #div1, td
- {
- height: 1em;
- }
- </style>
- </head>
- <body>
- <p>Test passes if the boxes below are the same width.</p>
- <table>
- <tr>
- <td id="cell"></td>
- <td></td>
- </tr>
- </table>
- <div id="div1"></div>
- </body>
-</html>
\ No newline at end of file
Deleted: releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-015.htm (108282 => 108283)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-015.htm 2012-02-21 02:35:19 UTC (rev 108282)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/css2.1/20110323/fixed-table-layout-015.htm 2012-02-21 02:37:59 UTC (rev 108283)
@@ -1,56 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
- <head>
- <title>CSS Test: Fixed table layout - specified cell width overrides specified column-group width</title>
- <link rel="author" title="Microsoft" href=""
- <link rel="help" href=""
- <meta name="flags" content="">
- <meta name="assert" content="A column that has both a cell width and column-group width specified will use its cell specified width.">
- <style type="text/css">
- table
- {
- border-spacing: 0;
- table-layout: fixed;
- width: 200px;
- }
- #colgroup
- {
- width: 75px;
- }
- #cell
- {
- background: black;
- width: 100px;
- }
- td
- {
- padding: 0;
- }
- #div1
- {
- background: blue;
- width: 100px;
- }
- #div1, td
- {
- height: 1em;
- }
- </style>
- </head>
- <body>
- <p>Test passes if the boxes below are the same width.</p>
- <table>
- <colgroup id="colgroup">
- <col>
- </colgroup>
- <colgroup>
- <col>
- </colgroup>
- <tr>
- <td id="cell"></td>
- <td></td>
- </tr>
- </table>
- <div id="div1"></div>
- </body>
-</html>
\ No newline at end of file
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog (108282 => 108283)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-02-21 02:35:19 UTC (rev 108282)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-02-21 02:37:59 UTC (rev 108283)
@@ -1,3 +1,13 @@
+2012-02-20 Vsevolod Vlasov <[email protected]>
+
+ Unreviewed manual rollout of r107970 which breaks table column widths
+ updates from _javascript_ (e.g. inspector's network panel).
+
+ * rendering/FixedTableLayout.cpp:
+ (WebCore::FixedTableLayout::calcWidthArray):
+ * rendering/RenderTableCol.h:
+ (RenderTableCol):
+
2012-02-20 Kalev Lember <[email protected]>
[GTK] Fix build on platforms where UChar is wchar_t
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/FixedTableLayout.cpp (108282 => 108283)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/FixedTableLayout.cpp 2012-02-21 02:35:19 UTC (rev 108282)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/FixedTableLayout.cpp 2012-02-21 02:37:59 UTC (rev 108283)
@@ -77,20 +77,6 @@
{
}
-static RenderObject* findNextCol(RenderObject* child)
-{
- // If child is a colgroup, the next col is the colgroup's first child col.
- if (RenderObject* next = child->firstChild())
- return next;
- // Otherwise it's the next col along.
- if (RenderObject* next = child->nextSibling())
- return next;
- // Failing that, the child is the last col in a colgroup, so the next col is the next col/colgroup after its colgroup.
- if (child->parent()->isTableCol())
- return child->parent()->nextSibling();
- return 0;
-}
-
int FixedTableLayout::calcWidthArray(int)
{
int usedWidth = 0;
@@ -102,43 +88,54 @@
m_width.fill(Length(Auto));
unsigned currentEffectiveColumn = 0;
- for (; child && child->isTableCol(); child = findNextCol(child)) {
-
- // Width specified by column-groups does not affect column width in fixed layout tables
+ Length grpWidth;
+ while (child && child->isTableCol()) {
RenderTableCol* col = toRenderTableCol(child);
- if (col->isColGroup())
- continue;
-
- Length colStyleLogicalWidth = col->style()->logicalWidth();
- int effectiveColWidth = 0;
- if (colStyleLogicalWidth.isFixed() && colStyleLogicalWidth.value() > 0)
- effectiveColWidth = colStyleLogicalWidth.value();
+ if (col->firstChild())
+ grpWidth = col->style()->logicalWidth();
+ else {
+ Length w = col->style()->logicalWidth();
+ if (w.isAuto())
+ w = grpWidth;
+ int effWidth = 0;
+ if (w.isFixed() && w.value() > 0)
+ effWidth = w.value();
- unsigned span = col->span();
- while (span) {
- unsigned spanInCurrentEffectiveColumn;
- if (currentEffectiveColumn >= nEffCols) {
- m_table->appendColumn(span);
- nEffCols++;
- m_width.append(Length());
- spanInCurrentEffectiveColumn = span;
- } else {
- if (span < m_table->spanOfEffCol(currentEffectiveColumn)) {
- m_table->splitColumn(currentEffectiveColumn, span);
+ unsigned span = col->span();
+ while (span) {
+ unsigned spanInCurrentEffectiveColumn;
+ if (currentEffectiveColumn >= nEffCols) {
+ m_table->appendColumn(span);
nEffCols++;
m_width.append(Length());
+ spanInCurrentEffectiveColumn = span;
+ } else {
+ if (span < m_table->spanOfEffCol(currentEffectiveColumn)) {
+ m_table->splitColumn(currentEffectiveColumn, span);
+ nEffCols++;
+ m_width.append(Length());
+ }
+ spanInCurrentEffectiveColumn = m_table->spanOfEffCol(currentEffectiveColumn);
}
- spanInCurrentEffectiveColumn = m_table->spanOfEffCol(currentEffectiveColumn);
+ if ((w.isFixed() || w.isPercent()) && w.isPositive()) {
+ m_width[currentEffectiveColumn] = w;
+ m_width[currentEffectiveColumn] *= spanInCurrentEffectiveColumn;
+ usedWidth += effWidth * spanInCurrentEffectiveColumn;
+ }
+ span -= spanInCurrentEffectiveColumn;
+ currentEffectiveColumn++;
}
- if ((colStyleLogicalWidth.isFixed() || colStyleLogicalWidth.isPercent()) && colStyleLogicalWidth.isPositive()) {
- m_width[currentEffectiveColumn] = colStyleLogicalWidth;
- m_width[currentEffectiveColumn] *= spanInCurrentEffectiveColumn;
- usedWidth += effectiveColWidth * spanInCurrentEffectiveColumn;
- }
- span -= spanInCurrentEffectiveColumn;
- currentEffectiveColumn++;
}
col->computePreferredLogicalWidths();
+
+ RenderObject* next = child->firstChild();
+ if (!next)
+ next = child->nextSibling();
+ if (!next && child->parent()->isTableCol()) {
+ next = child->parent()->nextSibling();
+ grpWidth = Length();
+ }
+ child = next;
}
// Iterate over the first row in case some are unspecified.
@@ -155,9 +152,9 @@
Length w = cell->styleOrColLogicalWidth();
unsigned span = cell->colSpan();
- int effectiveColWidth = 0;
+ int effWidth = 0;
if (w.isFixed() && w.isPositive())
- effectiveColWidth = w.value();
+ effWidth = w.value();
unsigned usedSpan = 0;
unsigned i = 0;
@@ -167,7 +164,7 @@
if (m_width[cCol + i].isAuto() && w.type() != Auto) {
m_width[cCol + i] = w;
m_width[cCol + i] *= eSpan / span;
- usedWidth += effectiveColWidth * eSpan / span;
+ usedWidth += effWidth * eSpan / span;
}
usedSpan += eSpan;
i++;
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderTableCol.h (108282 => 108283)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderTableCol.h 2012-02-21 02:35:19 UTC (rev 108282)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderTableCol.h 2012-02-21 02:37:59 UTC (rev 108283)
@@ -43,7 +43,7 @@
unsigned span() const { return m_span; }
void setSpan(unsigned span) { m_span = span; }
- bool isColGroup() { return firstChild(); }
+
private:
virtual RenderObjectChildList* virtualChildren() { return children(); }
virtual const RenderObjectChildList* virtualChildren() const { return children(); }