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

Issue 2882043002: Update our treatment of repeating headers in tables (Closed)

Created:
3 years, 7 months ago by rhogan
Modified:
3 years, 6 months ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Update our treatment of repeating headers in tables https://drafts.csswg.org/css-tables-3/#repeated-headers has been updated since we first implemented them. Respect the new rules such as only repeating headers if they fit on at most a quarter of the page. We also need to repeat headers even if only part of a row fits on the page - respecting this rule requires us to reintroduce allowing nested repeated headers, something that both Edge and FF do and which is now supported by the spec. BUG=720620, 675904 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2882043002 Cr-Commit-Position: refs/heads/master@{#476212} Committed: https://chromium.googlesource.com/chromium/src/+/9261f26075fab250385db2abde6c63deec1961ed

Patch Set 1 #

Patch Set 2 : bug 720620 #

Patch Set 3 : bug 720620 #

Patch Set 4 : bug 720620 #

Total comments: 16

Patch Set 5 : bug 720620 #

Total comments: 6

Patch Set 6 : bug 720620 #

Patch Set 7 : bug 720620 #

Total comments: 3

Patch Set 8 : bug 720620 #

Total comments: 2

Patch Set 9 : bug 720620 #

Patch Set 10 : bug 720620 #

Patch Set 11 : bug 720620 #

Patch Set 12 : bug 720620 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+345 lines, -136 lines) Patch
M third_party/WebKit/LayoutTests/fast/multicol/balance-repeating-table-headers.html View 1 chunk +12 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fragmentation/single-cell-repeating-thead-break-inside-avoid-content.html View 1 2 3 4 5 6 1 chunk +32 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fragmentation/single-cell-repeating-thead-break-inside-avoid-content-expected.html View 1 2 3 4 5 6 1 chunk +33 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fragmentation/single-cell-repeating-thead-break-inside-content.html View 1 2 3 4 5 6 7 8 9 1 chunk +32 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fragmentation/single-cell-repeating-thead-break-inside-content-expected.html View 1 2 3 4 5 6 7 8 9 1 chunk +33 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fragmentation/single-cell-repeating-thead-break-inside-content-first-line.html View 1 2 3 4 5 6 7 8 9 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fragmentation/single-cell-repeating-thead-break-inside-content-first-line-expected.html View 1 2 3 4 5 6 7 8 9 1 chunk +33 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-large-cell-with-header.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -27 lines 0 comments Download
D third_party/WebKit/LayoutTests/fragmentation/single-large-cell-with-header-expected.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +17 lines, -34 lines 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-line-cells-nested-repeating-thead-2-expected.html View 1 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-line-cells-nested-repeating-thead-3-expected.html View 1 3 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-line-cells-nested-repeating-thead-4-expected.html View 1 3 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-line-cells-nested-repeating-thead-expected.html View 1 3 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-2.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-2-expected.html View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-3.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-3-expected.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-expected.html View 1 4 chunks +8 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-with-border-spacing-at-top-of-row.html View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-with-border-spacing-at-top-of-row-expected.html View 3 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +14 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 6 1 chunk +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutState.h View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutState.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTable.cpp View 1 2 3 4 5 6 2 chunks +8 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableRow.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableRow.cpp View 1 1 chunk +0 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableSection.h View 1 2 3 4 4 chunks +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableSection.cpp View 1 2 3 4 5 6 5 chunks +17 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/core/paint/TableSectionPainter.cpp View 1 2 3 4 2 chunks +10 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 56 (43 generated)
rhogan
3 years, 7 months ago (2017-05-20 15:22:24 UTC) #14
mstensho (USE GERRIT)
https://codereview.chromium.org/2882043002/diff/60001/third_party/WebKit/LayoutTests/fragmentation/single-large-cell-with-header-expected.html File third_party/WebKit/LayoutTests/fragmentation/single-large-cell-with-header-expected.html (left): https://codereview.chromium.org/2882043002/diff/60001/third_party/WebKit/LayoutTests/fragmentation/single-large-cell-with-header-expected.html#oldcode1 third_party/WebKit/LayoutTests/fragmentation/single-large-cell-with-header-expected.html:1: <!DOCTYPE html> :-/ No way to still do this ...
3 years, 7 months ago (2017-05-22 10:40:44 UTC) #17
rhogan
Thanks mstensho - applied your comments. https://codereview.chromium.org/2882043002/diff/60001/third_party/WebKit/LayoutTests/fragmentation/single-large-cell-with-header-expected.html File third_party/WebKit/LayoutTests/fragmentation/single-large-cell-with-header-expected.html (left): https://codereview.chromium.org/2882043002/diff/60001/third_party/WebKit/LayoutTests/fragmentation/single-large-cell-with-header-expected.html#oldcode1 third_party/WebKit/LayoutTests/fragmentation/single-large-cell-with-header-expected.html:1: <!DOCTYPE html> On ...
3 years, 7 months ago (2017-05-22 18:06:04 UTC) #21
mstensho (USE GERRIT)
Sorry, forgot to review the changes in LayoutBlockFlow.cpp! I added some nits there, but my ...
3 years, 7 months ago (2017-05-22 19:17:34 UTC) #23
rhogan
On 2017/05/22 at 19:17:34, mstensho wrote: > Sorry, forgot to review the changes in LayoutBlockFlow.cpp! ...
3 years, 7 months ago (2017-05-25 19:43:01 UTC) #26
mstensho (USE GERRIT)
On 2017/05/25 19:43:01, rhogan wrote: > On 2017/05/22 at 19:17:34, mstensho wrote: > > Sorry, ...
3 years, 7 months ago (2017-05-26 10:56:50 UTC) #27
rhogan
On 2017/05/26 at 10:56:50, mstensho wrote: > > Maybe we could exercise the code in ...
3 years, 6 months ago (2017-05-27 12:47:41 UTC) #28
mstensho (USE GERRIT)
https://codereview.chromium.org/2882043002/diff/120001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp File third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp (right): https://codereview.chromium.org/2882043002/diff/120001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp#newcode1173 third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:1173: pagination_strut += layout_state->HeightOffsetForTableHeaders(); I was actually expecting this one ...
3 years, 6 months ago (2017-05-29 10:22:00 UTC) #33
rhogan
On 2017/05/29 at 10:22:00, mstensho wrote: > https://codereview.chromium.org/2882043002/diff/120001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp > File third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp (right): > > https://codereview.chromium.org/2882043002/diff/120001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp#newcode1173 ...
3 years, 6 months ago (2017-05-30 19:08:42 UTC) #36
mstensho (USE GERRIT)
lgtm https://codereview.chromium.org/2882043002/diff/140001/third_party/WebKit/LayoutTests/fragmentation/single-cell-repeating-thead-break-inside-always-content-first-line.html File third_party/WebKit/LayoutTests/fragmentation/single-cell-repeating-thead-break-inside-always-content-first-line.html (right): https://codereview.chromium.org/2882043002/diff/140001/third_party/WebKit/LayoutTests/fragmentation/single-cell-repeating-thead-break-inside-always-content-first-line.html#newcode22 third_party/WebKit/LayoutTests/fragmentation/single-cell-repeating-thead-break-inside-always-content-first-line.html:22: <div style="break-inside:always; border-top: 40px solid black;"> No such ...
3 years, 6 months ago (2017-05-30 19:43:55 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2882043002/220001
3 years, 6 months ago (2017-06-01 06:38:40 UTC) #52
commit-bot: I haz the power
Committed patchset #12 (id:220001) as https://chromium.googlesource.com/chromium/src/+/9261f26075fab250385db2abde6c63deec1961ed
3 years, 6 months ago (2017-06-01 06:43:51 UTC) #55
rhogan
3 years, 6 months ago (2017-06-01 18:45:25 UTC) #56
Message was sent while issue was closed.
https://codereview.chromium.org/2882043002/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp (right):

https://codereview.chromium.org/2882043002/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:1171: if
(!IsTableCell()) {
On 2017/05/22 at 19:17:34, mstensho wrote:
> Table cells should never accept struts, so this check is unnecessary. I
suggest that you change it to a DCHECK.

Done.

https://codereview.chromium.org/2882043002/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:1203: if
(!IsTableCell()) {
On 2017/05/22 at 19:17:34, mstensho wrote:
> Ditto.

Done.

https://codereview.chromium.org/2882043002/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:1205:
View()->GetLayoutState()->HeightOffsetForTableHeaders();
On 2017/05/22 at 19:17:34, mstensho wrote:
> I think this is now the third time we do View()->GetLayoutState() in this
method. How about declaring a const layout_state variable instead?

Done.

Powered by Google App Engine
This is Rietveld 408576698