Print functionality breaks with detached web_contents

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Print functionality breaks with detached web_contents

Postby YogeshTembe » Fri Sep 30, 2022 12:44 pm

With cef-105,

When we click on print icon on any website we get a call at "CefPrintDialogLinux::OnPrintStart" which calls "CefBrowserHostBase::GetBrowserForContents" and it gets browser from web_contents passed to it.
On few websites containing "iframe" and "embed" tag, the web_content is not registered i.e. it will not have any browser so print does not work on it.
When we find the Owner web_content of that guest web_content, then it has browser and print works fine on the owner web_content.
Don't know why the guest web_content is not registered but owner web_content is registered.

It seems like the web_content is detached from the actual page because it does not contain browser.

If anyone has faced similar issue then please provide input.
Thank you.
YogeshTembe
Techie
 
Posts: 23
Joined: Tue Sep 14, 2021 6:01 am

Re: Print functionality breaks with detached web_contents

Postby magreenblatt » Fri Sep 30, 2022 1:19 pm

What CEF version are you using? Try a supported version where this issue is likely already fixed.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Print functionality breaks with detached web_contents

Postby YogeshTembe » Mon Oct 03, 2022 3:22 am

I tried reproducing the same with cef-106 (currently supported version),

The result is same, it says ":alloy_constrained_window_views_client.cc(63)] No likely focused browser"
When we click on print icon, cef crashes stating that there is no focused browser.

Steps to reproduce->
1)Go to "google drive" and right click
2)click on preview option
3)click on print icon, it will open new tab
4)In the new tab with file preview, click on print icon

Same scenario is reproducible with google sheets as well.
YogeshTembe
Techie
 
Posts: 23
Joined: Tue Sep 14, 2021 6:01 am

Re: Print functionality breaks with detached web_contents

Postby magreenblatt » Mon Oct 03, 2022 8:20 am

Please add a bug report in the issue tracker.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 30 guests