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

Issue 642814 link

Starred by 12 users

Issue metadata

Status: Fixed
Owner:
Use other robhogan account instead.
Closed: Nov 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocking:
issue 631222



Sign in to add a comment

Overlapping table header and row content in print preview

Project Member Reported by robho...@gmail.com, Aug 31 2016

Issue description

https://jsfiddle.net/vmLqpfs1/ has overlapping header lines and content in print preview - you have to experiment with paper size and font size to find it.
 

Comment 1 by robho...@gmail.com, Aug 31 2016

Cc: nicholas...@gmail.com ryanande...@dailyvest.com

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

Status: Fixed (was: Assigned)
Fixed by https://codereview.chromium.org/2326303002

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

Blocking: 631222
I'm still seeing this issue in Version 55.0.2867.0 canary (64-bit)

Comment 5 by robho...@gmail.com, Sep 21 2016

Status: Started (was: Fixed)
Oh yes, I see what you mean. This time it's the header and footer that overlap each other.
Cc: robhogan@chromium.org ligim...@chromium.org
 Issue 648378  has been merged into this issue.
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 4 2016

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

commit 1c81ee4bbd257cb08f4aa603abece114d855a18e
Author: robhogan <robhogan@gmail.com>
Date: Tue Oct 04 18:06:33 2016

Use paginationStrut() instead of paginationStrutForRow()

There's no change in behaviour. Now that we setPaginationStrut() on the row,
we don't need to call paginationStrutForRow() outside of layout anymore.

BUG= 642814 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

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

[modify] https://crrev.com/1c81ee4bbd257cb08f4aa603abece114d855a18e/third_party/WebKit/Source/core/layout/LayoutTable.cpp
[modify] https://crrev.com/1c81ee4bbd257cb08f4aa603abece114d855a18e/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp

Comment 8 by robho...@gmail.com, Oct 5 2016

Cc: kkaluri@chromium.org
 Issue 652792  has been merged into this issue.
Cc: kavvaru@chromium.org rbasuvula@chromium.org
 Issue 650749  has been merged into this issue.
Project Member

Comment 10 by bugdroid1@chromium.org, Oct 6 2016

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

commit 0b78ef8444af3b0eba5aa7adcf932fffbb3233f9
Author: robhogan <robhogan@gmail.com>
Date: Thu Oct 06 07:54:39 2016

Move below headers even when row doesn't require a strut

When a row doesn't need a strut to appear at the top of a page, ensure it moves
below any repeating header. When the tables uses 'border-spacing' ensure that
the row is offsetting from the top of the page, as the border-spacing can often
straddle the page-break.

BUG= 642814 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

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

[add] https://crrev.com/0b78ef8444af3b0eba5aa7adcf932fffbb3233f9/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-2-expected.html
[add] https://crrev.com/0b78ef8444af3b0eba5aa7adcf932fffbb3233f9/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-2.html
[add] https://crrev.com/0b78ef8444af3b0eba5aa7adcf932fffbb3233f9/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-3-expected.html
[add] https://crrev.com/0b78ef8444af3b0eba5aa7adcf932fffbb3233f9/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-3.html
[modify] https://crrev.com/0b78ef8444af3b0eba5aa7adcf932fffbb3233f9/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp

Labels: Merge-Request-54

Comment 12 by dimu@chromium.org, Oct 8 2016

Labels: -Merge-Request-54 Merge-Review-54 Hotlist-Merge-Review
[Automated comment] Less than 2 weeks to go before stable on M54, manual review required.
Labels: -Merge-Review-54 Merge-Rejected-54
We're too close to stable cut (in a few hours from now) for this to make sense to merge into M54, since it only happens with some paper sizes.
Maybe just some but the most common US paper size is included. Plain letter size. I think this is pretty important. 
Labels: Merge-Request-54
Richard, I guess we need to prioritize this bug,requesting a merge.

Comment 16 by dimu@chromium.org, Oct 10 2016

Labels: -Merge-Request-54 Merge-Review-54
[Automated comment] Less than 2 weeks to go before stable on M54, manual review required.
Labels: -Merge-Rejected-54 Merge-Approved-54
Approved on appeal, this also affects the final printed copy and not just the preview.
Labels: -Merge-Review-54
Not sure if #10 was meant to be a full fix for this issue, but I can still reproduce it in several cases using 56.0.2887.0 canary (64-bit) and the demo above (https://jsfiddle.net/vmLqpfs1/).

Attachments:
Image crbug-642814-1.png shows the duplicated header overlapping a row of the blue table on the second page.

Image crbug-642814-2.png shows the (unnecessary) duplicated header overlapping the original header of the blue table on the second page.

Image crbug-642814-3.png shows adjusted margins and the (unnecessary) duplicated header from the green table overlapping the blue table's header.
crbug-642814-1.png
157 KB View Download
crbug-642814-2.png
121 KB View Download
crbug-642814-3.png
135 KB View Download
Labels: -Merge-Approved-54 M-55 ReleaseBlock-Beta
As per #19 ,not completely fixed. Please target to get this done ASAP.
robhogan@, please request a merge to M55 (by adding Merge-Request-55 label) once change is well baked/verified in Canary and safe to merge. Thank you.
I no longer reproduce the problem using the jsfiddle example site above but I do reproduce it with my sample from ticket 652792 which was duped to this ticket. Load the sample file via file:///<whatever>sampleHTML.html and do File Print. 
Forgot to add that it is occurring on both print preview and actual print on plain ol' letter size US 8-1/2 X 11" paper. 

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

@nicholas - I cannot reproduce this on Linux using any font size between 20px and 36px. I stopped trying after that.

Could you try reducing the test case to use a specific font, or maybe even the Ahem font, and add it to the bug here?

Chromium	56.0.2888.0 (Developer Build) (64-bit)
Revision	455c0eb32565cfa44f43fe32e45155b32a2cb24c-refs/heads/master@{#424525}
OS	Linux 
@robhogan - Rather than changing font and size, I've found the easiest way to reproduce it is by tweaking the print margins (down to the hundredth of an inch) to position the tables accordingly for each scenario (corresponding to the images in #19 above):

1. Page break is right at a row border inside the table. This is the hardest one to reproduce; if one row border doesn't work, try the next one.
2. Page break is between tables and there is enough space on the first page for the second table to start but not enough space to display its header row.
3. Page break is between tables and the first table just barely flows over to the second page.

Linux: Chromium 56.0.2889.0 (64-bit)
Windows 10: Chrome 56.0.2888.1 canary (64-bit)
OS X 10.11: Chrome 56.0.2888.0 canary (64-bit)
Tried again today with the canary download for Mac against this URL. Problem still there. 
https://demo5590.services.journyx.com/sampleHTML.html
robhogan@, any update/progress on this bug?
Cc: -robhogan@chromium.org
govind@ - there are a couple of edge cases to sort out and I'm going to work through them over the next week or so.

There's also 652972 which is caption-related.
Labels: -ReleaseBlock-Beta ReleaseBlock-Stable
Ok, thank you. Please request a merge to M55 when ready.

This won't block M55 Beta release as this is a known bug for a while and the bug is not completely fixed yet.
Tested this issue on Ubuntu 14.04 using chrome latest Dev M56 #56.0.2896.0. By clicking on print button from the page observed the issue is still seen while enabling background grphics.

Gentle ping!can we get any latest update on this bug?

Comment 31 by robho...@gmail.com, Oct 21 2016

Sure: CL in progress at https://codereview.chromium.org/2422163003
Tested in 56.0.2900.0 canary. Looks like the border spacing fix takes care of cases 1 and 2! I can still reproduce case 3.
**** Bulk edit -  please ignore if not applicable ****

A friendly reminder that M55 Stable is launch is coming soon! Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix and get it merged into the release branch ASAP so it gets enough baking time in Beta (before Stable promotion). Thank you!

Comment 35 by robho...@gmail.com, Oct 26 2016

Labels: Merge-Request-M55
Labels: -Merge-Request-M55 Merge-Request-55
Cc: ranjitkan@chromium.org
Labels: Needs-Feedback
Rechecked this on chrome version 56.0.2902.0 on Ubuntu 14.04, attached are the screen shots for the same and assuming that the issue appears to be fixed as 

1) No duplicated header overlapping of the table content is observed
2) No duplicated header overlapping the original header is displayed
3) No overlapping of tables are observed.

Kindly confirm so that we can add respective verified labels.

Thanks.!
Print 1.png
123 KB View Download
Print 2.png
185 KB View Download
Print 3.png
127 KB View Download
ranjitkan@ - As I mentioned in #33, I can still reproduce the error in test case 3 (defined in comment #25 and #19). We may want to spin that case off into a different issue though to avoid delaying these fixes any further.

Comment 39 by robho...@gmail.com, Oct 27 2016

@nicolas: The fixes I've landed will make it into M55 and onward so nothing is getting delayed by keeping this issue open until I resolve case 3.
Project Member

Comment 40 by bugdroid1@chromium.org, Oct 27 2016

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

commit 0b78ef8444af3b0eba5aa7adcf932fffbb3233f9
Author: robhogan <robhogan@gmail.com>
Date: Thu Oct 06 07:54:39 2016

Move below headers even when row doesn't require a strut

When a row doesn't need a strut to appear at the top of a page, ensure it moves
below any repeating header. When the tables uses 'border-spacing' ensure that
the row is offsetting from the top of the page, as the border-spacing can often
straddle the page-break.

BUG= 642814 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

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

[add] https://crrev.com/0b78ef8444af3b0eba5aa7adcf932fffbb3233f9/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-2-expected.html
[add] https://crrev.com/0b78ef8444af3b0eba5aa7adcf932fffbb3233f9/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-2.html
[add] https://crrev.com/0b78ef8444af3b0eba5aa7adcf932fffbb3233f9/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-3-expected.html
[add] https://crrev.com/0b78ef8444af3b0eba5aa7adcf932fffbb3233f9/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-repeating-thead-starts-middle-of-page-break-after-avoid-3.html
[modify] https://crrev.com/0b78ef8444af3b0eba5aa7adcf932fffbb3233f9/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp

Before we approve merge to M55, could you please confirm whether this change is well baked/tested/verified in Canary and safe to merge?
Yes, I think they're ready to merge now.
Thank you robhogan@. Please reply to comment #37. And Is there any fix still pending for case 3 as you mentioned at #39?




There is, but I haven't started it yet. We should just merge what we have for now.
Labels: -Merge-Request-55 Merge-Approved-55
Ok, approving the merge to M55 branch 2883. Please merge before 4:00 PM PT on  Monday (10/31/16) so we take it for next week beta release. Thank you.

Please re-request a merge for any new changes in future.

Comment 46 by robho...@gmail.com, Oct 30 2016

Turns out these aren't safe to merge as the code has moved around a bit in trunk. Sorry!
Labels: -Merge-Approved-55
Ok, removing "Merge-Approved-55" label for now. 
Please re-request merge to M55 (by applying "Merge-Request-55" label) when they are safe to merge to M55. Thank you.
**** Bulk edit -  please ignore if not applicable ****

A friendly reminder that M55 Stable is launch is coming soon! Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix and get it merged into the release branch ASAP so it gets enough baking time in Beta (before Stable promotion). Thank you!


Project Member

Comment 49 by bugdroid1@chromium.org, Nov 3 2016

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

commit be9e1f1ffc1e1d3287c7d994587446f9d7e703ee
Author: robhogan <robhogan@gmail.com>
Date: Thu Nov 03 00:03:50 2016

Don't paint repeating header if only the border spacing exceeds page height

BUG= 642814 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

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

[add] https://crrev.com/be9e1f1ffc1e1d3287c7d994587446f9d7e703ee/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-multiple-tables-caption-repeating-thead-with-border-spacing-at-top-of-row-2-expected.html
[add] https://crrev.com/be9e1f1ffc1e1d3287c7d994587446f9d7e703ee/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-multiple-tables-caption-repeating-thead-with-border-spacing-at-top-of-row-2.html
[add] https://crrev.com/be9e1f1ffc1e1d3287c7d994587446f9d7e703ee/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-multiple-tables-caption-repeating-thead-with-border-spacing-at-top-of-row-3-expected.html
[add] https://crrev.com/be9e1f1ffc1e1d3287c7d994587446f9d7e703ee/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-multiple-tables-caption-repeating-thead-with-border-spacing-at-top-of-row-3.html
[add] https://crrev.com/be9e1f1ffc1e1d3287c7d994587446f9d7e703ee/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-multiple-tables-caption-repeating-thead-with-border-spacing-at-top-of-row-expected.html
[add] https://crrev.com/be9e1f1ffc1e1d3287c7d994587446f9d7e703ee/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-multiple-tables-caption-repeating-thead-with-border-spacing-at-top-of-row.html
[add] https://crrev.com/be9e1f1ffc1e1d3287c7d994587446f9d7e703ee/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-multiple-tables-repeating-thead-with-border-spacing-at-top-of-row-expected.html
[add] https://crrev.com/be9e1f1ffc1e1d3287c7d994587446f9d7e703ee/third_party/WebKit/LayoutTests/fragmentation/single-line-cells-multiple-tables-repeating-thead-with-border-spacing-at-top-of-row.html
[modify] https://crrev.com/be9e1f1ffc1e1d3287c7d994587446f9d7e703ee/third_party/WebKit/Source/core/layout/LayoutTable.cpp
[modify] https://crrev.com/be9e1f1ffc1e1d3287c7d994587446f9d7e703ee/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp

Tested in 56.0.2908.0 canary -- all three cases I've documented appear to be fixed. Great work on this, robhogan@!
robhogan@, please request a merge to M55 if CLs are ready and safe to merge to M55.

Comment 52 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840
**** Bulk edit -  please ignore if not applicable ****

A friendly reminder that M55 Stable is launch is coming soon! Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix and get it merged into the release branch ASAP so it gets enough baking time in Beta (before Stable promotion). Thank you!

Also due to Thanksgiving holidays in US, please make sure all fixes are ready and merged to M55 latest by 5:00 PM PT Friday, 11/18/16.
**** Bulk edit -  please ignore if not applicable ****


A friendly reminder that M55 Stable is launch is coming soon! Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix and get it merged into the release branch ASAP so it gets enough baking time in Beta (before Stable promotion). Thank you!

Also due to Thanksgiving holidays in US, please make sure fix is ready and merged to M55 latest by 5:00 PM PT Friday, 11/18/16 (sooner the better).
Labels: -Hotlist-Merge-Review
Status: Fixed (was: Started)
Can't merge the work here as the code has moved around in trunk.
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-55; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-55 label, otherwise remove Merge-TBD label. Thanks.
Labels: -M-55 -Merge-TBD M-56
Per comment #46 and #55, this can't be safely merged to M55. Hence, punting to M56 and removing "Merge-TBD" label.

Sign in to add a comment