Bug 104711 - Col width is not honored when dynamically updated and it would make table narrower
Summary: Col width is not honored when dynamically updated and it would make table nar...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: gur.trio
URL: http://jsfiddle.net/BugIssuer/7mWrR/
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-11 13:39 PST by bug.issuer
Modified: 2014-04-17 21:21 PDT (History)
18 users (show)

See Also:


Attachments
Patch (6.17 KB, patch)
2013-09-19 20:49 PDT, gur.trio
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 (1.03 MB, application/zip)
2013-09-19 21:36 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (1.05 MB, application/zip)
2013-09-19 22:01 PDT, Build Bot
no flags Details
Patch (5.85 KB, patch)
2013-09-23 00:39 PDT, gur.trio
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 (378.23 KB, application/zip)
2013-09-23 01:20 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion (381.98 KB, application/zip)
2013-09-23 01:33 PDT, Build Bot
no flags Details
Patch (6.00 KB, patch)
2013-09-30 08:28 PDT, gur.trio
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2 (942.82 KB, application/zip)
2013-09-30 10:18 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (967.03 KB, application/zip)
2013-09-30 10:51 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion (930.84 KB, application/zip)
2013-09-30 11:38 PDT, Build Bot
no flags Details
Patch (6.94 KB, patch)
2013-10-02 01:15 PDT, gur.trio
no flags Details | Formatted Diff | Diff
Patch (6.49 KB, patch)
2014-01-14 01:42 PST, gur.trio
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2 (455.04 KB, application/zip)
2014-01-14 02:37 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion (485.80 KB, application/zip)
2014-01-14 02:57 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion (483.91 KB, application/zip)
2014-01-14 03:56 PST, Build Bot
no flags Details
Patch (6.56 KB, patch)
2014-01-14 05:05 PST, gur.trio
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 (919.09 KB, application/zip)
2014-01-14 05:40 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (489.28 KB, application/zip)
2014-01-14 06:26 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion (652.69 KB, application/zip)
2014-01-14 06:36 PST, Build Bot
no flags Details
Patch (6.56 KB, patch)
2014-01-14 20:37 PST, gur.trio
no flags Details | Formatted Diff | Diff
Patch (6.36 KB, patch)
2014-01-17 20:26 PST, gur.trio
no flags Details | Formatted Diff | Diff
Patch (6.52 KB, patch)
2014-01-19 20:48 PST, gur.trio
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 (452.56 KB, application/zip)
2014-01-19 21:45 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion (484.32 KB, application/zip)
2014-01-19 22:00 PST, Build Bot
no flags Details
Patch (6.52 KB, patch)
2014-01-19 22:09 PST, gur.trio
no flags Details | Formatted Diff | Diff
Patch (6.52 KB, patch)
2014-01-20 01:18 PST, gur.trio
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bug.issuer 2012-12-11 13:39:52 PST
In the example on the attached URL, a simple table with one column and one row is used. The width of this table is controlled by the width of the single col element. If the col width is dynamically updated to a wider width than the original width, the table resizes just fine, but if the col width is updated to a narrower width than the original width, the table will not get narrower than the original width.

The expected behavior is that the table width would shrink as well as grow as the col width changes. 

The same behavior was observed with both an auto and fixed layout table.

This behavior was observed in Chrome 23.0.1271.97 and Safari 5.1.7 on Windows 7 as well as Chrome 23.0.1271.97 and Safari 6.0.2 on OS X 10.8.
The expected behavior was observed in Firefox 17.0.1, IE 9.0.8112.16421 and Opera 12.11.1661 on Windows 7 as well as Firefox 17.0.1 on OS X 10.8.
Comment 1 gur.trio 2013-09-19 20:49:58 PDT
Created attachment 212119 [details]
Patch
Comment 2 Build Bot 2013-09-19 21:36:27 PDT
Comment on attachment 212119 [details]
Patch

Attachment 212119 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/1925265

New failing tests:
tables/mozilla/bugs/bug113235-1.html
fast/text/international/bidi-layout-across-linebreak.html
fast/table/border-collapsing/003.html
fast/repaint/table-cell-collapsed-border.html
fast/table/border-collapsing/003-vertical.html
tables/mozilla_expected_failures/marvin/x_colgroup_width_px.xml
tables/mozilla/bugs/bug14159-1.html
Comment 3 Build Bot 2013-09-19 21:36:29 PDT
Created attachment 212124 [details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 4 Build Bot 2013-09-19 22:01:11 PDT
Comment on attachment 212119 [details]
Patch

Attachment 212119 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/2015072

New failing tests:
tables/mozilla/bugs/bug113235-1.html
fast/text/international/bidi-layout-across-linebreak.html
fast/table/border-collapsing/003.html
fast/repaint/table-cell-collapsed-border.html
fast/table/border-collapsing/003-vertical.html
tables/mozilla_expected_failures/marvin/x_colgroup_width_px.xml
tables/mozilla/bugs/bug14159-1.html
Comment 5 Build Bot 2013-09-19 22:01:13 PDT
Created attachment 212125 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 6 gur.trio 2013-09-23 00:39:36 PDT
Created attachment 212330 [details]
Patch
Comment 7 Build Bot 2013-09-23 01:20:00 PDT
Comment on attachment 212330 [details]
Patch

Attachment 212330 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/2083098

New failing tests:
css3/selectors3/xhtml/css3-modsel-74b.xml
css3/selectors3/xhtml/css3-modsel-28b.xml
fast/css/percentage-non-integer.html
css3/selectors3/xml/css3-modsel-28b.xml
fast/dynamic/create-renderer-for-whitespace-only-text.html
fast/block/positioning/053.html
accessibility/table-cells.html
css3/selectors3/xml/css3-modsel-28.xml
fast/css/css3-nth-child.html
css3/selectors3/html/css3-modsel-28b.html
css3/selectors3/xml/css3-modsel-74.xml
css3/selectors3/html/css3-modsel-18b.html
css3/selectors3/xml/css3-modsel-18b.xml
fast/css/acid2-pixel.html
css3/selectors3/xhtml/css3-modsel-18.xml
css3/selectors3/html/css3-modsel-28.html
css3/selectors3/xhtml/css3-modsel-18b.xml
css3/selectors3/html/css3-modsel-18.html
fast/css/acid2.html
css3/selectors3/html/css3-modsel-74.html
css3/selectors3/xml/css3-modsel-74b.xml
fast/dynamic/insert-before-table-part-in-continuation.html
fast/dom/HTMLTableElement/colSpan.html
css3/selectors3/xhtml/css3-modsel-74.xml
fast/forms/basic-buttons.html
editing/pasteboard/paste-table-001.html
css3/selectors3/html/css3-modsel-74b.html
css3/selectors3/xhtml/css3-modsel-28.xml
css3/selectors3/xml/css3-modsel-18.xml
css2.1/20110323/table-caption-002.htm
Comment 8 Build Bot 2013-09-23 01:20:02 PDT
Created attachment 212333 [details]
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-10  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 9 Build Bot 2013-09-23 01:33:25 PDT
Comment on attachment 212330 [details]
Patch

Attachment 212330 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/2095062

New failing tests:
css3/selectors3/xhtml/css3-modsel-74b.xml
css3/selectors3/xhtml/css3-modsel-28b.xml
fast/css/percentage-non-integer.html
css3/selectors3/xml/css3-modsel-28b.xml
fast/dynamic/create-renderer-for-whitespace-only-text.html
fast/block/positioning/053.html
accessibility/table-cells.html
css3/selectors3/xml/css3-modsel-28.xml
fast/css/css3-nth-child.html
css3/selectors3/html/css3-modsel-28b.html
css3/selectors3/xml/css3-modsel-74.xml
css3/selectors3/html/css3-modsel-18b.html
css3/selectors3/xml/css3-modsel-18b.xml
fast/css/acid2-pixel.html
css3/selectors3/xhtml/css3-modsel-18.xml
css3/selectors3/html/css3-modsel-28.html
css3/selectors3/xhtml/css3-modsel-18b.xml
css3/selectors3/html/css3-modsel-18.html
fast/css/acid2.html
css3/selectors3/html/css3-modsel-74.html
css3/selectors3/xml/css3-modsel-74b.xml
fast/dynamic/insert-before-table-part-in-continuation.html
fast/dom/HTMLTableElement/colSpan.html
css3/selectors3/xhtml/css3-modsel-74.xml
fast/forms/basic-buttons.html
editing/pasteboard/paste-table-001.html
css3/selectors3/html/css3-modsel-74b.html
css3/selectors3/xhtml/css3-modsel-28.xml
css3/selectors3/xml/css3-modsel-18.xml
css2.1/20110323/table-caption-002.htm
Comment 10 Build Bot 2013-09-23 01:33:27 PDT
Created attachment 212334 [details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 11 gur.trio 2013-09-23 05:13:34 PDT
Hi Julien. I am working on this issue but had one doubt. 
As per the content initial width is set to 200px. When the width changes the table width is not set to the new values because

void AutoTableLayout::recalcColumn(unsigned effCol)

if (cell->maxPreferredLogicalWidth() > columnLayout.maxLogicalWidth) {
      columnLayout.maxLogicalWidth = cell->maxPreferredLogicalWidth();
      maxContributor = cell;
}
cell->maxPreferredLogicalWidth is still 200 and columnLayout.maxLogicalWidth is the new for example 180 (reduce by 20px) and since the condition doesnot satisfy the new width 180px is not set to columnLayout.maxLogicalWidth.

So is it better to do some workaround for this in void AutoTableLayout::recalcColumn(unsigned effCol) or calculates the preflogicalwidths again?

I tried the first way but some test cases are failing

Please suggest.
Comment 12 gur.trio 2013-09-27 03:13:12 PDT
(In reply to comment #11)
> Hi Julien. I am working on this issue but had one doubt. 
> As per the content initial width is set to 200px. When the width changes the table width is not set to the new values because
> 
> void AutoTableLayout::recalcColumn(unsigned effCol)
> 
> if (cell->maxPreferredLogicalWidth() > columnLayout.maxLogicalWidth) {
>       columnLayout.maxLogicalWidth = cell->maxPreferredLogicalWidth();
>       maxContributor = cell;
> }
> cell->maxPreferredLogicalWidth is still 200 and columnLayout.maxLogicalWidth is the new for example 180 (reduce by 20px) and since the condition doesnot satisfy the new width 180px is not set to columnLayout.maxLogicalWidth.
> 
> So is it better to do some workaround for this in void AutoTableLayout::recalcColumn(unsigned effCol) or calculates the preflogicalwidths again?
> 
> I tried the first way but some test cases are failing
> 
> Please suggest.

Someone Please suggest.
Comment 13 gur.trio 2013-09-30 08:28:27 PDT
Created attachment 212997 [details]
Patch
Comment 14 Build Bot 2013-09-30 10:18:17 PDT
Comment on attachment 212997 [details]
Patch

Attachment 212997 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/2695168

New failing tests:
tables/mozilla/marvin/body_col.html
fast/table/021.html
fast/text/international/bidi-layout-across-linebreak.html
tables/mozilla/core/one_row.html
tables/mozilla/other/body_col.html
fast/table/border-collapsing/cached-change-col-border-width.html
tables/mozilla_expected_failures/bugs/bug14007-2.html
fast/table/border-collapsing/cached-cell-remove.html
tables/mozilla_expected_failures/marvin/x_colgroup_width_px.xml
tables/mozilla_expected_failures/core/col_span2.html
fast/table/border-collapsing/cached-change-colgroup-border-width.html
fast/table/border-collapsing/cached-change-cell-border-width.html
fast/table/border-collapsing/cached-cell-append.html
fast/table/border-collapsing/cached-change-table-border-width.html
Comment 15 Build Bot 2013-09-30 10:18:19 PDT
Created attachment 213011 [details]
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-11  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 16 Build Bot 2013-09-30 10:51:38 PDT
Comment on attachment 212997 [details]
Patch

Attachment 212997 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/2816101

New failing tests:
tables/mozilla/marvin/body_col.html
fast/table/021.html
fast/text/international/bidi-layout-across-linebreak.html
tables/mozilla/core/one_row.html
tables/mozilla/other/body_col.html
fast/table/border-collapsing/cached-change-col-border-width.html
tables/mozilla_expected_failures/bugs/bug14007-2.html
fast/table/border-collapsing/cached-cell-remove.html
tables/mozilla_expected_failures/marvin/x_colgroup_width_px.xml
tables/mozilla_expected_failures/core/col_span2.html
fast/table/border-collapsing/cached-change-colgroup-border-width.html
fast/table/border-collapsing/cached-change-cell-border-width.html
fast/table/border-collapsing/cached-cell-append.html
fast/table/border-collapsing/cached-change-table-border-width.html
Comment 17 Build Bot 2013-09-30 10:51:40 PDT
Created attachment 213013 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 18 Build Bot 2013-09-30 11:37:57 PDT
Comment on attachment 212997 [details]
Patch

Attachment 212997 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/2720226

New failing tests:
tables/mozilla/marvin/body_col.html
fast/table/021.html
fast/text/international/bidi-layout-across-linebreak.html
tables/mozilla/core/one_row.html
tables/mozilla/other/body_col.html
fast/table/border-collapsing/cached-change-col-border-width.html
tables/mozilla_expected_failures/bugs/bug14007-2.html
fast/table/border-collapsing/cached-cell-remove.html
tables/mozilla_expected_failures/marvin/x_colgroup_width_px.xml
tables/mozilla_expected_failures/core/col_span2.html
fast/table/border-collapsing/cached-change-colgroup-border-width.html
fast/table/border-collapsing/cached-change-cell-border-width.html
fast/table/border-collapsing/cached-cell-append.html
fast/table/border-collapsing/cached-change-table-border-width.html
Comment 19 Build Bot 2013-09-30 11:38:00 PDT
Created attachment 213017 [details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 20 gur.trio 2013-10-02 01:15:18 PDT
Created attachment 213155 [details]
Patch
Comment 21 gur.trio 2013-10-04 02:22:31 PDT
(In reply to comment #20)
> Created an attachment (id=213155) [details]
> Patch

Can someone please review this?
Comment 22 gur.trio 2013-10-09 04:03:45 PDT
(In reply to comment #21)
> (In reply to comment #20)
> > Created an attachment (id=213155) [details] [details]
> > Patch
> 
> Can someone please review this?

Hi. Can someone please review this. Thanks
Comment 23 gur.trio 2013-12-03 04:48:38 PST
(In reply to comment #22)
> (In reply to comment #21)
> > (In reply to comment #20)
> > > Created an attachment (id=213155) [details] [details] [details]
> > > Patch
> > 
> > Can someone please review this?
> 
> Hi. Can someone please review this. Thanks

Please review.Thanks
Comment 24 gur.trio 2013-12-11 04:40:03 PST
(In reply to comment #23)
> (In reply to comment #22)
> > (In reply to comment #21)
> > > (In reply to comment #20)
> > > > Created an attachment (id=213155) [details] [details] [details] [details]
> > > > Patch
> > > 
> > > Can someone please review this?
> > 
> > Hi. Can someone please review this. Thanks
> 
> Please review.Thanks

Hi Simon. Can you please review this patch?
Comment 25 Antti Koivisto 2014-01-13 06:29:41 PST
Comment on attachment 213155 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=213155&action=review

> Source/WebCore/rendering/AutoTableLayout.cpp:85
>                      columnLayout.minLogicalWidth = max<int>(cell->minPreferredLogicalWidth(), columnLayout.minLogicalWidth);
> +
> +                    Length cellLogicalWidth = cell->styleOrColLogicalWidth();
> +                    if (cellLogicalWidth.isFixed() && cell->style()->logicalWidth().isAuto()) {
> +                        int logicalWidth = cell->adjustBorderBoxLogicalWidthForBoxSizing(cellLogicalWidth.value());
> +                        if (cellLogicalWidth.value() > cell->minPreferredLogicalWidth() && cell->maxPreferredLogicalWidth() != logicalWidth)
> +                            cell->setPreferredLogicalWidthsDirty(true);
> +                    }

Actually this looks wrong. The code saves minPreferredLogicalWidth to columnLayout.minLogicalWidth and then marks logical width dirty. 

Also I suspect the invalidation should be done when the col width changes rather than during recalcColumn (which happens during layout).
Comment 26 gur.trio 2014-01-14 01:42:23 PST
Created attachment 221123 [details]
Patch
Comment 27 Build Bot 2014-01-14 02:37:01 PST
Comment on attachment 221123 [details]
Patch

Attachment 221123 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/6538699684708352

New failing tests:
fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html
Comment 28 Build Bot 2014-01-14 02:37:04 PST
Created attachment 221135 [details]
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-11  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 29 Build Bot 2014-01-14 02:57:53 PST
Comment on attachment 221123 [details]
Patch

Attachment 221123 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5507948201639936

New failing tests:
fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html
Comment 30 Build Bot 2014-01-14 02:57:58 PST
Created attachment 221136 [details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 31 Build Bot 2014-01-14 03:56:47 PST
Comment on attachment 221123 [details]
Patch

Attachment 221123 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5231997626613760

New failing tests:
fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html
Comment 32 Build Bot 2014-01-14 03:56:51 PST
Created attachment 221138 [details]
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-06  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 33 gur.trio 2014-01-14 05:05:59 PST
Created attachment 221143 [details]
Patch
Comment 34 Build Bot 2014-01-14 05:40:39 PST
Comment on attachment 221143 [details]
Patch

Attachment 221143 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5729575493435392

New failing tests:
fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html
Comment 35 Build Bot 2014-01-14 05:40:43 PST
Created attachment 221148 [details]
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-16  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 36 Build Bot 2014-01-14 06:26:06 PST
Comment on attachment 221143 [details]
Patch

Attachment 221143 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5217174083862528

New failing tests:
fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html
Comment 37 Build Bot 2014-01-14 06:26:11 PST
Created attachment 221154 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 38 Build Bot 2014-01-14 06:36:53 PST
Comment on attachment 221143 [details]
Patch

Attachment 221143 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/4810267405844480

New failing tests:
fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html
Comment 39 Build Bot 2014-01-14 06:36:59 PST
Created attachment 221157 [details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-01  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 40 gur.trio 2014-01-14 20:37:37 PST
Created attachment 221227 [details]
Patch
Comment 41 Antti Koivisto 2014-01-17 05:56:10 PST
Comment on attachment 221227 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=221227&action=review

> Source/WebCore/rendering/RenderTableCol.cpp:58
> +            unsigned nEffCols = table->numEffCols();
> +            for (unsigned j = 0; j < nEffCols; j++) {

Ideally this would be optimized by figuring out which columns this RenderTableCol actually affects. This may not be critical to do now as animating <col> width is likely rare.

> Source/WebCore/rendering/RenderTableCol.cpp:62
> +                for (RenderObject* child = table->firstChild(); child; child = child->nextSibling()) {
> +                    if (child->isTableSection()) {
> +                        RenderTableSection* section = toRenderTableSection(child);
> +                        unsigned numRows = section->numRows();

You should use C++11 and child iterators here:

for (auto& section : childrenOfType<RenderTableSection>(*table)) { 
    unsigned rowCount = section.numRows()
    ....

> Source/WebCore/rendering/RenderTableCol.cpp:66
> +                            RenderTableSection::CellStruct current = section->cellAt(i, j);
> +                            RenderTableCell* cell = current.primaryCell();
> +                            cell->setPreferredLogicalWidthsDirty(true);

You can just use section.primaryCellAt(i, j)

Are you sure the cell can't be null? Looking around it is always null tested in similar cases.
Comment 42 gur.trio 2014-01-17 20:26:31 PST
Created attachment 221526 [details]
Patch
Comment 43 gur.trio 2014-01-19 20:48:03 PST
Created attachment 221608 [details]
Patch
Comment 44 Build Bot 2014-01-19 21:45:34 PST
Comment on attachment 221608 [details]
Patch

Attachment 221608 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5820269700579328

New failing tests:
fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html
Comment 45 Build Bot 2014-01-19 21:45:38 PST
Created attachment 221609 [details]
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-16  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 46 Build Bot 2014-01-19 21:59:56 PST
Comment on attachment 221608 [details]
Patch

Attachment 221608 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5459725986562048

New failing tests:
fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html
Comment 47 Build Bot 2014-01-19 22:00:01 PST
Created attachment 221612 [details]
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-06  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 48 gur.trio 2014-01-19 22:09:11 PST
Created attachment 221613 [details]
Patch
Comment 49 Antti Koivisto 2014-01-20 00:44:58 PST
Comment on attachment 221613 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=221613&action=review

> Source/WebCore/rendering/RenderTableCol.cpp:63
> +            unsigned nEffCols = table->numEffCols();
> +            for (unsigned j = 0; j < nEffCols; j++) {
> +                for (auto& section : childrenOfType<RenderTableSection>(*table)) {
> +                    unsigned rowCount = section.numRows();
> +                    for (unsigned i = 0; i < rowCount; i++) {
> +                        RenderTableCell* cell = section.primaryCellAt(i, j);

It is bit strange (and inefficient) to iterate over columns and then over sections. Could you make the section loop the outermost one?
Comment 50 gur.trio 2014-01-20 00:49:43 PST
(In reply to comment #49)
> (From update of attachment 221613 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=221613&action=review
> 
> > Source/WebCore/rendering/RenderTableCol.cpp:63
> > +            unsigned nEffCols = table->numEffCols();
> > +            for (unsigned j = 0; j < nEffCols; j++) {
> > +                for (auto& section : childrenOfType<RenderTableSection>(*table)) {
> > +                    unsigned rowCount = section.numRows();
> > +                    for (unsigned i = 0; i < rowCount; i++) {
> > +                        RenderTableCell* cell = section.primaryCellAt(i, j);
> 
> It is bit strange (and inefficient) to iterate over columns and then over sections. Could you make the section loop the outermost one?

Just one query in void AutoTableLayout::fullRecalc() it recalcColumn which internally gets the cells from section. Something similiar I was trying to do.
Comment 51 gur.trio 2014-01-20 01:18:25 PST
Created attachment 221633 [details]
Patch
Comment 52 WebKit Commit Bot 2014-01-20 03:54:54 PST
Comment on attachment 221633 [details]
Patch

Clearing flags on attachment: 221633

Committed r162334: <http://trac.webkit.org/changeset/162334>
Comment 53 WebKit Commit Bot 2014-01-20 03:55:01 PST
All reviewed patches have been landed.  Closing bug.
Comment 54 David Kilzer (:ddkilzer) 2014-04-17 21:21:01 PDT
(In reply to comment #52)
> (From update of attachment 221633 [details])
> Clearing flags on attachment: 221633
> 
> Committed r162334: <http://trac.webkit.org/changeset/162334>

This caused a regression fixed in r165837:
<http://trac.webkit.org/changeset/165837>