Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(710)

Issue 1921973005: [css tables] Don't pass table width increase due to % columns to parents (Closed)

Created:
4 years, 7 months ago by dgrogan
Modified:
4 years, 7 months ago
CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[css tables] Don't pass table width increase due to % columns to parents A table cell that specifies % width can increase the width of its table, but shouldn't increase the width of any grandparent table cell. This makes Blink match FF and Edge. LayoutTable::layout calls LayoutTable::updateLogicalWidth, which eventually calls into TableLayoutAlgorithmAuto::computeIntrinsicLogicalWidths, which used to do the percent scaling. This doesn't work because when the table is inside a table-cell, LayoutTableCell calls the child table's TableLayoutAlgorithmAuto::computeIntrinsicLogicalWidths, returning the scaled width, not the intrinsic width. This patch moves the scaling to a separate step that's only called in LayoutTable::updateLogicalWidth, not in TableLayoutAlgorithmAuto::computeIntrinsicLogicalWidths. BUG=178369, 427994 Committed: https://crrev.com/9428cfb16993a2329e87c65da096ca295132ef0f Cr-Commit-Position: refs/heads/master@{#394715}

Patch Set 1 #

Patch Set 2 : some cleanups after first pass review #

Patch Set 3 : move variables around #

Total comments: 11

Patch Set 4 : use TestExpectations instead of deleting #

Patch Set 5 : scaledWidthFromPercentColumns: pure virtual -> virtual #

Patch Set 6 : naively pass scaled width to non-table parents #

Total comments: 8

Patch Set 7 : only avoid passing to table ancestors #

Patch Set 8 : just use TestExpectations for patchability #

Total comments: 1

Patch Set 9 : merge ToT #

Patch Set 10 : merge ToT #

Total comments: 6

Patch Set 11 : respond to comments #

Patch Set 12 : fix some blank lines #

Total comments: 1

Patch Set 13 : merge ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -37 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/table/inner-percent-width-affects-outer-floated-div.html View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/table/inner-percent-width-affects-outer-floated-div-expected.txt View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/table/inner-percent-width-doesnt-affect-ancestor-columns.html View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/table/inner-percent-width-doesnt-affect-ancestor-columns-expected.txt View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/table/inner-percent-width-doesnt-affect-outer-columns.html View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/table/inner-percent-width-doesnt-affect-outer-columns-expected.txt View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/table/max-width-integer-overflow.html View 1 2 3 4 5 6 1 chunk +25 lines, -29 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTable.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/TableLayoutAlgorithm.h View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +27 lines, -6 lines 0 comments Download

Messages

Total messages: 39 (15 generated)
dgrogan
Morten, could you take a look at this? As mentioned in the rietveld comment, it ...
4 years, 7 months ago (2016-04-27 03:14:05 UTC) #5
mstensho (USE GERRIT)
I have problems applying this patch locally, because it deletes PNG (i.e. binary) files. Do ...
4 years, 7 months ago (2016-04-27 12:19:48 UTC) #6
dgrogan
Thanks for the feedback. I don't have a trick for getting around the png patch ...
4 years, 7 months ago (2016-04-27 18:10:17 UTC) #7
dgrogan
https://codereview.chromium.org/1921973005/diff/40001/third_party/WebKit/LayoutTests/fast/table/table-size-integer-overflow.html File third_party/WebKit/LayoutTests/fast/table/table-size-integer-overflow.html (right): https://codereview.chromium.org/1921973005/diff/40001/third_party/WebKit/LayoutTests/fast/table/table-size-integer-overflow.html#newcode1 third_party/WebKit/LayoutTests/fast/table/table-size-integer-overflow.html:1: <div style="float: left;"> On 2016/04/27 12:19:48, mstensho wrote: > ...
4 years, 7 months ago (2016-04-27 20:24:06 UTC) #8
dgrogan
My comments here are as much notes to me as anything else. But take a ...
4 years, 7 months ago (2016-04-28 01:04:32 UTC) #9
mstensho (USE GERRIT)
https://codereview.chromium.org/1921973005/diff/100001/third_party/WebKit/LayoutTests/fast/table/inner-percent-width-affects-outer-floated-div.html File third_party/WebKit/LayoutTests/fast/table/inner-percent-width-affects-outer-floated-div.html (right): https://codereview.chromium.org/1921973005/diff/100001/third_party/WebKit/LayoutTests/fast/table/inner-percent-width-affects-outer-floated-div.html#newcode2 third_party/WebKit/LayoutTests/fast/table/inner-percent-width-affects-outer-floated-div.html:2: <p>There should be a blue square below. Inner table's ...
4 years, 7 months ago (2016-04-28 09:18:05 UTC) #10
dgrogan
Xianzhu, this patch causes fast/table/border-collapsing/cached-change-row-border-width.html to fail. I don't know enough about painting to know ...
4 years, 7 months ago (2016-04-29 21:03:57 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1921973005/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1921973005/180001
4 years, 7 months ago (2016-04-29 21:06:16 UTC) #16
Xianzhu
On 2016/04/29 21:03:57, dgrogan wrote: > Xianzhu, this patch causes > fast/table/border-collapsing/cached-change-row-border-width.html to fail. I ...
4 years, 7 months ago (2016-04-29 21:06:51 UTC) #17
Xianzhu
On 2016/04/29 21:06:51, Xianzhu wrote: > On 2016/04/29 21:03:57, dgrogan wrote: > > Xianzhu, this ...
4 years, 7 months ago (2016-04-29 21:26:16 UTC) #18
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/214245)
4 years, 7 months ago (2016-04-29 22:25:14 UTC) #20
dgrogan
The layout doesn't seem to have changed with the patch. For both before and after ...
4 years, 7 months ago (2016-04-29 23:20:40 UTC) #21
Xianzhu
On 2016/04/29 23:20:40, dgrogan wrote: > The layout doesn't seem to have changed with the ...
4 years, 7 months ago (2016-04-30 00:06:26 UTC) #22
dgrogan
Ah, quite right. The table size IS different with my change, but only for the ...
4 years, 7 months ago (2016-05-04 01:54:14 UTC) #23
dgrogan
Morten, this is ready for a detailed review now that its dependency landed.
4 years, 7 months ago (2016-05-18 13:49:18 UTC) #24
mstensho (USE GERRIT)
https://codereview.chromium.org/1921973005/diff/220001/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp File third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp (right): https://codereview.chromium.org/1921973005/diff/220001/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp#newcode36 third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp:36: , m_scaledWidthFromPercentColumns(0) No need to explicitly initialize LayoutUnit to ...
4 years, 7 months ago (2016-05-18 19:50:18 UTC) #25
dgrogan
https://codereview.chromium.org/1921973005/diff/220001/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp File third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp (right): https://codereview.chromium.org/1921973005/diff/220001/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp#newcode36 third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp:36: , m_scaledWidthFromPercentColumns(0) On 2016/05/18 19:50:17, mstensho wrote: > No ...
4 years, 7 months ago (2016-05-18 22:28:33 UTC) #26
mstensho (USE GERRIT)
lgtm https://codereview.chromium.org/1921973005/diff/280001/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.h File third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.h (right): https://codereview.chromium.org/1921973005/diff/280001/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.h#newcode57 third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.h:57: LayoutUnit scaledWidthFromPercentColumns() override Duh, I somehow missed the ...
4 years, 7 months ago (2016-05-19 05:30:14 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1921973005/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1921973005/280001
4 years, 7 months ago (2016-05-19 05:30:41 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/8270) ios-device-gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 7 months ago (2016-05-19 05:33:27 UTC) #32
dgrogan
Thanks for the review and for sticking with it for so long.
4 years, 7 months ago (2016-05-19 06:19:32 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1921973005/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1921973005/300001
4 years, 7 months ago (2016-05-19 06:20:07 UTC) #36
commit-bot: I haz the power
Committed patchset #13 (id:300001)
4 years, 7 months ago (2016-05-19 08:29:44 UTC) #37
commit-bot: I haz the power
4 years, 7 months ago (2016-05-19 08:30:53 UTC) #39
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/9428cfb16993a2329e87c65da096ca295132ef0f
Cr-Commit-Position: refs/heads/master@{#394715}

Powered by Google App Engine
This is Rietveld 408576698