Windowless windows not always windowless

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.

Re: Windowless windows not always windowless

Postby callum » Tue Mar 13, 2018 6:32 pm

No - hooked it up along side my other CefRequestHandler overrides but it's not called.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Windowless windows not always windowless

Postby callum » Mon Mar 19, 2018 2:46 pm

https://paste.ofcode.org/BSteA2ZkGMGqQTQHXr2qiz (didn't want to paste a few hundred lines of code here)

I broke out the code into its own test app and (surprisingly) it exhibits the same issue - link opened with target="_blank" with CefLifeSpanHandler::OnBeforePopup(...) set to return true open a native window vs doing nothing.

The example navigates to a URL - maybe not important, just the one our QA team used to repro, waits a second for it to start loading then navigates to page with a single large clickable div and injects a mouse click. The target page appears in a native OS window that CEF opens versus being suppressed because of the "return true" as I expected. In fact, OnBeforePopup is never called.

Can anyone tell me if this is a CEF issue or if I'm doing something wrong?

Thank you.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Windowless windows not always windowless

Postby magreenblatt » Mon Mar 19, 2018 3:17 pm

I didn't spot anything obviously wrong with your code (you'll want to add "override" to the OnBeforePopup declaration to catch signature changes). I also modified cefclient at current master to return true from ClientHandler::OnBeforePopup, ran with `--off-screen-rendering-enabled --url=https://callum-linden.s3.amazonaws.com/bigclick.html` and manually clicked the link. However, no popup was created for me.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Windowless windows not always windowless

Postby callum » Mon Mar 19, 2018 3:28 pm

Understood (I use OVERRIDE in the real code - super helpful as I move over different versions of CEF).

I'll see if I can force a repro with cefclient - thanks for taking a look.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Windowless windows not always windowless

Postby callum » Mon Mar 19, 2018 4:10 pm

https://github.com/callumprentice/cef_opengl_win

I have a better CEF example that is self-contained and trivial to build using CMake and latest Spotify Win64 build (3.3325.1750.gaabe4c4) - instructions in the README. (Debug doesn't render anything and I don't know why so sadly, I can't rely on breakpoints)

The issue readily and repeatedly appears with these steps in Release:

* delete the cache dir in build\ cef_opengl_win_cache
* start app and as soon as the page starts to render and you see content, right click anywhere to load the "big click" page
* once it loads, click on the green div and you'll see a new native OS window appear and no message in console from OnBeforePopup
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Windowless windows not always windowless

Postby callum » Tue Mar 20, 2018 5:57 pm

I'd very much appreciate it if someone could try this and see if it repros for them.

The app is very easy to build and the repro is trivial - this issue is blocking our release and I'd love to get it fixed if it's something I'm doing wrong.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Windowless windows not always windowless

Postby magreenblatt » Tue Mar 20, 2018 6:18 pm

A Debug build failing usually means you're hitting assertions in the code. Run in a debugger and attach to all child processes (using --wait-for-debugger-children=renderer for example).
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Windowless windows not always windowless

Postby callum » Tue Mar 20, 2018 6:29 pm

Understood - that's a secondary issue to the rogue popup window appearing and that's the one that's blocking my release.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Windowless windows not always windowless

Postby magreenblatt » Tue Mar 20, 2018 7:32 pm

Assertions indicate something is wrong. Without identifying the assertion any relationship to your popup issue is unclear. Were you able to reproduce the popup issue with cefclient?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Windowless windows not always windowless

Postby callum » Tue Mar 20, 2018 7:45 pm

Understood re: assertions but the Debug build doesn't render anything and mostly doesn't get past initialization as far as I can tell from a quick look. Only happens in this test - the main app works fine in Debug - so I haven't spent too much time looking at it - especially as I'm spending all my time trying to hunt down the popup issue.

I tried to repro it in cefclient but that involves pasting in another URL as the first one is loading and cefclient seems to ignore a new URL you paste into the address bar until you press stop or the page loads - both of which cause the issue not to trigger.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

PreviousNext

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 93 guests