New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 631222 link

Starred by 27 users

Issue metadata

Status: Fixed
Owner:
Use other robhogan account instead.
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

Blocked on:
issue 642814



Sign in to add a comment

Repeated table headers overlap when multiple tables on one page

Reported by ryanande...@dailyvest.com, Jul 25 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.21 Safari/537.36

Example URL:
https://jsfiddle.net/pzaw8r05/

Steps to reproduce the problem:
1. Create page that has multiple multi-page tables with headers
2. Print page, notice that on the page where both tables are displayed (page 2 in the example URL) the headers of the first table actually has the text (overlapped) from both tables

What is the expected behavior?
Header text for each table should be displayed only for that specific table

What went wrong?
Header for the first table, when displayed on a page which also contains another table shows the header text from both tables

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? Yes 

Chrome version: 53.0.2785.21  Channel: dev
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0
 

Comment 1 by b...@chromium.org, Jul 26 2016

Components: Blink
Components: -Blink Blink>CSS Blink>Layout>Table
Labels: -Type-Compat Type-Bug

Comment 3 by bokan@chromium.org, Jul 26 2016

Cc: bokan@chromium.org
Components: Internals>Printing
Owner: robhogan@chromium.org
Status: Assigned (was: Unconfirmed)
robhogan@: ptal. This seems to be an issue since  issue 24826  has been resolved.
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f4f9dd5f2a9339d1b66a226580102d0bee4e4d38

commit f4f9dd5f2a9339d1b66a226580102d0bee4e4d38
Author: robhogan <robhogan@gmail.com>
Date: Tue Aug 09 14:13:22 2016

Handle repeated headers when more than one table in paged context

BUG= 631222 

Review-Url: https://codereview.chromium.org/2212033002
Cr-Commit-Position: refs/heads/master@{#410657}

[modify] https://crrev.com/f4f9dd5f2a9339d1b66a226580102d0bee4e4d38/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/f4f9dd5f2a9339d1b66a226580102d0bee4e4d38/third_party/WebKit/LayoutTests/fragmentation/repeating-thead-multiple-tables-expected.html
[add] https://crrev.com/f4f9dd5f2a9339d1b66a226580102d0bee4e4d38/third_party/WebKit/LayoutTests/fragmentation/repeating-thead-multiple-tables.html
[add] https://crrev.com/f4f9dd5f2a9339d1b66a226580102d0bee4e4d38/third_party/WebKit/LayoutTests/platform/linux/printing/thead-repeats-at-top-of-each-page-multiple-tables-expected.png
[add] https://crrev.com/f4f9dd5f2a9339d1b66a226580102d0bee4e4d38/third_party/WebKit/LayoutTests/printing/thead-repeats-at-top-of-each-page-multiple-tables-expected.txt
[add] https://crrev.com/f4f9dd5f2a9339d1b66a226580102d0bee4e4d38/third_party/WebKit/LayoutTests/printing/thead-repeats-at-top-of-each-page-multiple-tables.html
[modify] https://crrev.com/f4f9dd5f2a9339d1b66a226580102d0bee4e4d38/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/449b1daa95c7d07c15ab077ec58e5daddbbc73ae

commit 449b1daa95c7d07c15ab077ec58e5daddbbc73ae
Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org>
Date: Tue Aug 09 15:52:07 2016

Auto-rebaseline for r410657

https://chromium.googlesource.com/chromium/src/+/f4f9dd5f2

BUG= 631222 
TBR=robhogan@gmail.com

Review URL: https://codereview.chromium.org/2221393003 .

Cr-Commit-Position: refs/heads/master@{#410686}

[modify] https://crrev.com/449b1daa95c7d07c15ab077ec58e5daddbbc73ae/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/449b1daa95c7d07c15ab077ec58e5daddbbc73ae/third_party/WebKit/LayoutTests/platform/linux/virtual/threaded/printing/thead-repeats-at-top-of-each-page-multiple-tables-expected.png
[add] https://crrev.com/449b1daa95c7d07c15ab077ec58e5daddbbc73ae/third_party/WebKit/LayoutTests/platform/mac/printing/thead-repeats-at-top-of-each-page-multiple-tables-expected.png
[add] https://crrev.com/449b1daa95c7d07c15ab077ec58e5daddbbc73ae/third_party/WebKit/LayoutTests/platform/mac/virtual/threaded/printing/thead-repeats-at-top-of-each-page-multiple-tables-expected.png
[add] https://crrev.com/449b1daa95c7d07c15ab077ec58e5daddbbc73ae/third_party/WebKit/LayoutTests/platform/win7/printing/thead-repeats-at-top-of-each-page-multiple-tables-expected.png
[add] https://crrev.com/449b1daa95c7d07c15ab077ec58e5daddbbc73ae/third_party/WebKit/LayoutTests/platform/win7/virtual/threaded/printing/thead-repeats-at-top-of-each-page-multiple-tables-expected.png

This might already be known, but to clarify the OP, "multiple multi-page tables" is not a requirement to reproduce this bug (i.e. the tables don't need to span the page boundary).

See https://jsfiddle.net/vmLqpfs1/ for demo.

chrome-table-multi-header-bug.png (attached) shows a page-spanning table. Its header is duplicated on top of the next table row, as are the headers of all other tables on the continuing page.

chrome-table-page-break-header-bug.png (attached) shows a page boundary that cleanly separates two tables. Even though there is no page-spanning table, the headers of all tables on the continuing page are duplicated. (Same issue, different context.)

Chrome 53.0.2785.46 beta-m (64-bit) and 54.0.2824.0 canary (64-bit)
Windows 10 v1607

chrome-table-multi-header-bug.png
135 KB View Download
chrome-table-page-break-header-bug.png
114 KB View Download
Components: -Blink>CSS
Status: Fixed (was: Assigned)
So I think we're fixed here - including comment #9. 
Sorry, comment #6. :)
There's still an issue where the repeated header overlaps the table in certain cases (see attached). The rest looks fixed though! v55.0.2843.0 canary (64-bit)

chrome-table-header-overlap.png
107 KB View Download
HI Nicolas - so how do I reproduce this issue? 
@robhogan: The demo from my comment #9 should do it -- https://jsfiddle.net/vmLqpfs1/. Chrome v55.0.2843.0 canary (64-bit), Letter-size paper in portrait orientation with default margins.
@robhogan: I couldn't reproduce as Nicholas did, but found similar issue when switching from portrait to landscape layout. Version 55.0.2843.0 canary (64-bit).
Capture.PNG
106 KB View Download
 Issue 644242  has been merged into this issue.
 Issue 645421  has been merged into this issue.
 Issue 646591  has been merged into this issue.
 Issue 647728  has been merged into this issue.

Comment 18 by robho...@gmail.com, Sep 19 2016

Blockedon: 642814
Project Member

Comment 19 by bugdroid1@chromium.org, Sep 25 2016

Labels: merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ce9cc9bcd4cd3263615b4a5bce70d1b48a89e251

commit ce9cc9bcd4cd3263615b4a5bce70d1b48a89e251
Author: Robert Hogan <robhogan@gmail.com>
Date: Sun Sep 25 18:10:42 2016

Handle repeated headers when more than one table in paged context

BUG= 631222 

Review-Url: https://codereview.chromium.org/2212033002
Cr-Commit-Position: refs/heads/master@{#410657}
(cherry picked from commit f4f9dd5f2a9339d1b66a226580102d0bee4e4d38)

Review URL: https://codereview.chromium.org/2368093002 .

Cr-Commit-Position: refs/branch-heads/2785@{#929}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/ce9cc9bcd4cd3263615b4a5bce70d1b48a89e251/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/ce9cc9bcd4cd3263615b4a5bce70d1b48a89e251/third_party/WebKit/LayoutTests/fragmentation/repeating-thead-multiple-tables-expected.html
[add] https://crrev.com/ce9cc9bcd4cd3263615b4a5bce70d1b48a89e251/third_party/WebKit/LayoutTests/fragmentation/repeating-thead-multiple-tables.html
[add] https://crrev.com/ce9cc9bcd4cd3263615b4a5bce70d1b48a89e251/third_party/WebKit/LayoutTests/platform/linux/printing/thead-repeats-at-top-of-each-page-multiple-tables-expected.png
[add] https://crrev.com/ce9cc9bcd4cd3263615b4a5bce70d1b48a89e251/third_party/WebKit/LayoutTests/printing/thead-repeats-at-top-of-each-page-multiple-tables-expected.txt
[add] https://crrev.com/ce9cc9bcd4cd3263615b4a5bce70d1b48a89e251/third_party/WebKit/LayoutTests/printing/thead-repeats-at-top-of-each-page-multiple-tables.html
[modify] https://crrev.com/ce9cc9bcd4cd3263615b4a5bce70d1b48a89e251/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp

Labels: TE-Verified-53.0.2785.146 TE-Verified-M53
Verified the issue on Windows 10 using chrome stable version #53.0.2785.146 as per the comment #0
Observed that the fix is working as expected.

Attaching screencast for reference

Hence, adding the verified labels.
631222.mp4
5.7 MB View Download
Cc: anan...@chromium.org kerz@chromium.org amineer@chromium.org
P2 bug got merged to Stable without Merge request and approval. Changes listed at #4 # #5 have been in Canary/Dev/Beta since August 9th. No milestone label applied to the bug.
It is not necessary for the tables to be multi-page. This example has two tables entirely confined to page 2, and it exhibits the same bug at the top of page 2: 

    http://thomasoandrews.com/examples/ChromePrintBug.html

Screen Shot 2016-09-29 at 12.50.05 PM.png
28.7 KB View Download
As of 53.0.2785.143, the fiddle at the top of this issue is still showing incorrectly on table at the top of the 2nd page.

Comment 24 by robho...@gmail.com, Oct 10 2016

Yes, that's fixed in  https://crbug.com/642814  I believe. Unfortunately it will stay broken in 53, but will be fixed in 54 and 55.

Comment 25 Deleted

Comment 26 by dms2...@gmail.com, Apr 6 2018

I use Chrome Version 65.0.3325.181 (Official Build) (64-bit)
And it still happened on my table.
Anyone has workaround or solution please?
messy_header.PNG
36.5 KB View Download
I am using Chrome Version 65.0.3325.181 (Official Build) (64-bit)
And this is easily reproducible. If any CSS fix available , please let us know
Chrome printing issue.PNG
80.4 KB View Download
Issue re-occurring here as well. Tested in all other major browsers to make sure it isn't my code and can't reproduce outside of chrome.
unknown.png
21.0 KB View Download

Sign in to add a comment