WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
104711
Col width is not honored when dynamically updated and it would make table narrower
https://bugs.webkit.org/show_bug.cgi?id=104711
Summary
Col width is not honored when dynamically updated and it would make table nar...
bug.issuer
Reported
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.
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
Show Obsolete
(10)
View All
Add attachment
proposed patch, testcase, etc.
gur.trio
Comment 1
2013-09-19 20:49:58 PDT
Created
attachment 212119
[details]
Patch
Build Bot
Comment 2
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
Build Bot
Comment 3
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
Build Bot
Comment 4
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
Build Bot
Comment 5
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
gur.trio
Comment 6
2013-09-23 00:39:36 PDT
Created
attachment 212330
[details]
Patch
Build Bot
Comment 7
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
Build Bot
Comment 8
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
Build Bot
Comment 9
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
Build Bot
Comment 10
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
gur.trio
Comment 11
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.
gur.trio
Comment 12
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.
gur.trio
Comment 13
2013-09-30 08:28:27 PDT
Created
attachment 212997
[details]
Patch
Build Bot
Comment 14
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
Build Bot
Comment 15
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
Build Bot
Comment 16
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
Build Bot
Comment 17
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
Build Bot
Comment 18
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
Build Bot
Comment 19
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
gur.trio
Comment 20
2013-10-02 01:15:18 PDT
Created
attachment 213155
[details]
Patch
gur.trio
Comment 21
2013-10-04 02:22:31 PDT
(In reply to
comment #20
)
> Created an attachment (id=213155) [details] > Patch
Can someone please review this?
gur.trio
Comment 22
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
gur.trio
Comment 23
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
gur.trio
Comment 24
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?
Antti Koivisto
Comment 25
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).
gur.trio
Comment 26
2014-01-14 01:42:23 PST
Created
attachment 221123
[details]
Patch
Build Bot
Comment 27
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
Build Bot
Comment 28
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
Build Bot
Comment 29
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
Build Bot
Comment 30
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
Build Bot
Comment 31
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
Build Bot
Comment 32
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
gur.trio
Comment 33
2014-01-14 05:05:59 PST
Created
attachment 221143
[details]
Patch
Build Bot
Comment 34
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
Build Bot
Comment 35
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
Build Bot
Comment 36
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
Build Bot
Comment 37
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
Build Bot
Comment 38
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
Build Bot
Comment 39
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
gur.trio
Comment 40
2014-01-14 20:37:37 PST
Created
attachment 221227
[details]
Patch
Antti Koivisto
Comment 41
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.
gur.trio
Comment 42
2014-01-17 20:26:31 PST
Created
attachment 221526
[details]
Patch
gur.trio
Comment 43
2014-01-19 20:48:03 PST
Created
attachment 221608
[details]
Patch
Build Bot
Comment 44
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
Build Bot
Comment 45
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
Build Bot
Comment 46
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
Build Bot
Comment 47
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
gur.trio
Comment 48
2014-01-19 22:09:11 PST
Created
attachment 221613
[details]
Patch
Antti Koivisto
Comment 49
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?
gur.trio
Comment 50
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.
gur.trio
Comment 51
2014-01-20 01:18:25 PST
Created
attachment 221633
[details]
Patch
WebKit Commit Bot
Comment 52
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
>
WebKit Commit Bot
Comment 53
2014-01-20 03:55:01 PST
All reviewed patches have been landed. Closing bug.
David Kilzer (:ddkilzer)
Comment 54
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
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug