Table borders are omitted when printing <iframe style=display:none>
Reported by
renesis...@gmail.com,
Jun 20 2017
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36 Example URL: http://jsfiddle.net/nuw8v2Ln/19/ Steps to reproduce the problem: 1. Go to link that I provided 2. Click "print" What is the expected behavior? Table printed as it seen on the page What went wrong? Table printed without borders Does it occur on multiple sites: N/A Is it a problem with a plugin? No Did this work before? Yes 58 Does this work in other browsers? Yes Chrome version: 59.0.3071.104 Channel: stable OS Version: XUbuntu 17.04 Flash Version:
,
Jun 21 2017
I mean not printing from browser menu, but initiating printing of iframe from javascript (in my snippet you should click the "print" button that is right below the test table). Result is gonna be like on the attached screenshot (without borders). This issue appears only when printing Iframes, sorry that I didn't mention that in the title.
,
Jun 21 2017
Thank you for providing more feedback. Adding requester "sandeepkumars@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 23 2017
Any chance for this to be fixed in any of following versions?
,
Jun 27 2017
In the original bug report, you wrote: "Did this work before? Yes 58" I tried this on Linux with Chrome 58 and 59. Neither version would print the table with borders. Are you sure this worked before? You also wrote: "Does this work in other browsers? Yes" - I tried Firefox, which threw an error: document.printFrame is undefined. - With Edge on Windows, the table also does not have borders, and it is not laid out properly. - With Safari on Mac, it behaves the same way as Chrome 59, without borders. So, what other browser does this test page work properly in?
,
Jun 28 2017
Here's an updated version: http://jsfiddle.net/nuw8v2Ln/22/ It works in Firefox and Chrome 58 It was quite hard to reproduce because I was not permitted to provide the real-world example from proprietary system
,
Jun 28 2017
Thank you for providing more feedback. Adding requester "thestig@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 29 2017
,
Jun 29 2017
This happens because the iFrame is hidden with display: none;. Workaround - Use - visibility: hidden; pointer-events: none; border: none; :( Reduced further - Fails - data:text/html,<iframe style="display: none" srcdoc="<table border=1><tr><td>Test</td></tr></table><script>print()</script>"></iframe> Works - data:text/html,<iframe style="visibility: hidden; border: none; pointer-events: none;" srcdoc="<table border=1><tr><td>Test</td></tr></table><script>print()</script>"></iframe> Edge 15 (using BrowserStack) and Firefox 53 print the JSFiddle test with borders. Internet Explorer 11 prints the outer iFrame instead. :) Chrome 59 prints without borders. Chrome 58 (using BrowserStack) prints with borders. Perhaps related to work done over at issue 650433 .
,
Jun 29 2017
,
Jun 29 2017
Am able to reproduce the issue. Chrome version : 59.0.3071.115 (Official Build) (64-bit) Tested OS : macOS Sierra version 10.12.5,Windows10,Windows 8.1,Ubuntu 16.04 There is no issue with previous Chrome version.
,
Jun 29 2017
,
Jun 29 2017
Am able to fix my prints issue with workaround given phistuck@chromium.org. The workaround works in following Chrome version : 59.0.3071.115 (Official Build) (64-bit) Tested OS : macOS Sierra version 10.12.5,Windows10,Windows 8.1,Ubuntu 16.04 thankyou phistuck@chromium.org
,
Jun 29 2017
thanks phistuck@chromium.org ... This trick temporarily solves the issue
,
Jun 30 2017
,
Jun 30 2017
The CL in question is still an experimental feature, so it shouldn't affect stable users. We need a bisect.
,
Jun 30 2017
Able to reproduce this issue on Mac 10.12.5, Win-10 and Ubuntu 14.04 using chrome stable version #59.0.3071.115 and latest canary #61.0.3144.0. This is a non-regression issue as it is observed from M45 old builds. Hence, marking it as untriaged to get more inputs from dev team. Thanks...!!
,
Jun 30 2017
#17 - I tested it using BrowserStack and it printed borders before Chrome 59. Have you tested the code from comment 9 or comment 6? Because the initial report above has a slightly erroneous test case which indeed did not work, but it was reduced further in comments 6 and 9 and one of those those should be bisected instead.
,
Jun 30 2017
phistuck@ - Thanks for your feedback...!! Able to reproduce the issue on Windows 10, Ubuntu 14.04 and Mac 10.12.5 using chrome stable version #59.0.3071.115 and latest canary #61.0.3144.0 by using the URL from comment #6. Bisect Information: ===================== Good build: 58.0.2991.0 Revision(445609) Bad Build : 58.0.2992.0 Revision(445908) Change Log URL: https://chromium.googlesource.com/chromium/src/+log/cd207440f74f112ed24d1e72b63fddbca063dcc9..9686be68e53348bab6f4ce846bf07d494f1575a0 From the above change log suspecting below change Review URL: https://codereview.chromium.org/2647393002 wangxianzhu@ - Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner. Thanks...!!
,
Jun 30 2017
#19 - Thank you! In order to narrow down the regression range even further (that change list enables a big feature that was developed for months), can you bisect again, but this time, also make sure Chrome is run with the following command line flag? --enable-blink-features="SlimmingPaintInvalidation"
,
Jun 30 2017
I think we have got enough information that this bug is related to SlimmingPaintInvalidation.
,
Jun 30 2017
TL;DR: We need walk detached frames for PrePaint before printing. Assigning to chrishtr@ because I will be on vacation until mid August. The test passes for non-SlimmingPaintInvalidation because we walk detached frames during paint invalidation. The walk ensures the frame is ready for painting, e.g. getting PaintLayer NeedsPaintPhaseXXX flags updated and table collapsed borders not updated. We also need the walk for SlimmingPaintInvalidation. More details of diagosis: Chrome with DCHECK enabled crashes at: [1:1:0630/113942.841717:FATAL:LayoutTable.h(345)] Check failed: collapsed_borders_valid_. #0 0x558c6c573027 base::debug::StackTrace::StackTrace() #1 0x558c6c58cf71 logging::LogMessage::~LogMessage() #2 0x558c6eedeff8 blink::TablePainter::PaintObject() ... #32 0x558c6eeb7eed blink::PaintLayerPainter::Paint() #33 0x558c6ee81e5b blink::FramePainter::PaintContents() #34 0x558c6eae7aca blink::LocalFrameView::PaintContents() #35 0x558c6f01c4a1 blink::ChromePrintContext::SpoolPage() #36 0x558c6f016045 blink::ChromePrintContext::SpoolSinglePage() Even with collapsed borders updated, we still don't paint the collapsed borders because the PaintLayer's NeedsPaintPhaseXXX flags are not updated which will cause more issues other than collapsed borders.
,
Jun 30 2017
This is where the old path walks detached frames during paint invalidation: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/frame/LocalFrameView.cpp?rcl=12dd20d1972b5a0a21003555fdababb37f2f747e&l=3512
,
Jun 30 2017
With the following flags - --force-device-scale-factor=1 --disable-blink-features=SlimmingPaintInvalidation --disable-slimming-paint-invalidation Print preview shows (beside the print headers) an empty page. Also, while issue 738543 still reproduces with flags above, it seems like a related issue as well.
,
Jul 19 2017
pdr, sending to you to loadbalance.
,
Jul 19 2017
,
Aug 4 2017
Issue 752138 has been merged into this issue.
,
Aug 22 2017
I did not get around to this from July. Xianzhu, can you take a look again?
,
Sep 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0f447f657e78625331f2b69318d69aa97eb7805a commit 0f447f657e78625331f2b69318d69aa97eb7805a Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Fri Sep 08 05:06:39 2017 Update life cycle for detached frames for printing We need to let detached frames up-to-date for painting because we can print a detached frame directly with javascript. Bug: 735059 Change-Id: Ifbb27c4178bb7fe310e5637b6205186b78ca12a9 Reviewed-on: https://chromium-review.googlesource.com/653769 Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#500512} [modify] https://crrev.com/0f447f657e78625331f2b69318d69aa97eb7805a/third_party/WebKit/Source/core/exported/WebFrameTest.cpp [modify] https://crrev.com/0f447f657e78625331f2b69318d69aa97eb7805a/third_party/WebKit/Source/core/frame/LocalFrameView.cpp [modify] https://crrev.com/0f447f657e78625331f2b69318d69aa97eb7805a/third_party/WebKit/Source/core/frame/LocalFrameView.h [modify] https://crrev.com/0f447f657e78625331f2b69318d69aa97eb7805a/third_party/WebKit/Source/core/frame/LocalFrameViewTest.cpp [modify] https://crrev.com/0f447f657e78625331f2b69318d69aa97eb7805a/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp [add] https://crrev.com/0f447f657e78625331f2b69318d69aa97eb7805a/third_party/WebKit/Source/core/testing/data/print-detached-iframe.html
,
Sep 8 2017
The test case is causing crash in M62 official build, so we need to merge into M62.
,
Sep 9 2017
Your change meets the bar and is auto-approved for M62. Please go ahead and merge the CL to branch 3202 manually. Please contact milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 11 2017
Verified this issue on chrome Windows-10, Ubuntu 14.04 and Mac OS 10.12.6 using chrome latest canary #63.0.3212.0 by using the test case provided in the comment #6, observed the table borders are seen in print-preview page of chrome as expected. Hence adding TE-Verified label for M-63. Thanks!
,
Sep 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f912cab710250e5d8074967188a7911bf2d7a500 commit f912cab710250e5d8074967188a7911bf2d7a500 Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Mon Sep 11 16:42:41 2017 Update life cycle for detached frames for printing We need to let detached frames up-to-date for painting because we can print a detached frame directly with javascript. TBR=wangxianzhu@chromium.org (cherry picked from commit 0f447f657e78625331f2b69318d69aa97eb7805a) Bug: 735059 Change-Id: Ifbb27c4178bb7fe310e5637b6205186b78ca12a9 Reviewed-on: https://chromium-review.googlesource.com/653769 Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#500512} Reviewed-on: https://chromium-review.googlesource.com/660800 Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/branch-heads/3202@{#128} Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098} [modify] https://crrev.com/f912cab710250e5d8074967188a7911bf2d7a500/third_party/WebKit/Source/core/exported/WebFrameTest.cpp [modify] https://crrev.com/f912cab710250e5d8074967188a7911bf2d7a500/third_party/WebKit/Source/core/frame/LocalFrameView.cpp [modify] https://crrev.com/f912cab710250e5d8074967188a7911bf2d7a500/third_party/WebKit/Source/core/frame/LocalFrameView.h [modify] https://crrev.com/f912cab710250e5d8074967188a7911bf2d7a500/third_party/WebKit/Source/core/frame/LocalFrameViewTest.cpp [modify] https://crrev.com/f912cab710250e5d8074967188a7911bf2d7a500/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp [add] https://crrev.com/f912cab710250e5d8074967188a7911bf2d7a500/third_party/WebKit/Source/core/testing/data/print-detached-iframe.html
,
Sep 11 2017
|
||||||||||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||||||||||
Comment 1 by sandeepkumars@chromium.org
, Jun 21 2017Labels: Needs-Feedback
168 KB
168 KB View Download