Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Issue 10479019: Merge 118819 - REGRESSION(r111742): box-sizing: border-box doesn't work on fixed table layout (Closed)

8 years, 6 months ago by Julien - ping for review
8 years, 6 months ago
Base URL:


Merge 118819 - REGRESSION(r111742): box-sizing: border-box doesn't work on fixed table layout Reviewed by Tony Chang. Source/WebCore: Tests: fast/table/fixed-table-layout/cell-box-sizing-fixed-table-layout.html fast/table/fixed-table-layout/column-box-sizing-fixed-table-layout.html fast/table/fixed-table-layout/column-group-box-sizing-fixed-table-layout.html fast/table/fixed-table-layout/column-in-column-group-box-sizing-fixed-table-layout.html The change in r111742 completely ignored border-sizing (following the table's code lead unfortunately). The issue is that we would count the borders and paddings twice for the border-box case which would lead to the content-box including them too. From a web-author, this behavior is equivalent to ignoring box-sizing. * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): Reworked the function to properly use computeBorderBoxLogicalWidth() for correctness. This matches what RenderBox and the rendering code does generally. Also refactored the code to avoid the need for local variables and make it more readable. LayoutTests: * fast/table/fixed-table-layout/cell-box-sizing-fixed-table-layout-expected.html: Added. * fast/table/fixed-table-layout/cell-box-sizing-fixed-table-layout.html: Added. This test covers the regression. * fast/table/fixed-table-layout/column-box-sizing-fixed-table-layout-expected.html: Added. * fast/table/fixed-table-layout/column-box-sizing-fixed-table-layout.html: Added. * fast/table/fixed-table-layout/column-group-box-sizing-fixed-table-layout-expected.html: Added. * fast/table/fixed-table-layout/column-group-box-sizing-fixed-table-layout.html: Added. * fast/table/fixed-table-layout/column-in-column-group-box-sizing-fixed-table-layout-expected.html: Added. * fast/table/fixed-table-layout/column-in-column-group-box-sizing-fixed-table-layout.html: Added. Those test ensured I didn't regress and document our current behavior ie that column and column group fixed width apply to the cell's border-box. Committed:

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -32 lines) Patch
M Source/WebCore/rendering/FixedTableLayout.cpp View 1 chunk +31 lines, -32 lines 0 comments Download


Total messages: 1 (0 generated)
Julien - ping for review
8 years, 6 months ago (2012-06-04 21:41:13 UTC) #1


Powered by Google App Engine
This is Rietveld 408576698