[Lazarus] fpCEF3 questions

dev.dliw at gmail.com dev.dliw at gmail.com
Thu Sep 14 15:05:34 CEST 2017


> With main menu:
>   - notice the lacking tabs, this is more prominent if not using a
> pagecontrol, but
>     any other wincontrol to host the browser.
I see.
The problem is, that the menu does not change the position of the controls on 
the form.
E.g. if you out a button with Top=0 on an empty form and then add a menu, Top 
stays at 0. So the offset of TChromium is wrong.

As a workaround you could change the position of the TChromium component (if 
on Linux).
As I said, fpCEF on Linux embeds CEF into the XWindow of the main form, which 
is more or less a borderless window manually positioned over the LCL form.


> In my project i create an HTML output for a statistical analysis program
> and the code itself is very simple - tables and paragraph, and only very
> little CSS.
It doesn't really matter what you show via TChromium, but how you use 
TChromium.
And the tabbed browser is probably the most complex case and unfortunately 
rather broken on Linux right now.

However, if you really only want to show very simple HTML, then
	https://github.com/BerndGabriel/HtmlViewer
may possibly be the better choice for you.

> In the OSR example the painting is tied to OpenGL IIRC, but can it be
> tied to something else? and how?
Actually not. CEF only provides an array of pixel values, it is up to you to 
do whatever you want.
Older versions of the OSRDemo used BGRABitmap:
https://github.com/dliw/fpCEF3/blob/5335a5ba437d469eb6f933e47ae0e0cd3d6e8968/Examples/OSRDemo/main.pas#L113


> Another issue with all the versions of CEF i have tried so far is that I
> get a SIGSEGV when closing any application that uses fpCEF. I have tried
> many combinations when trying to shutdown, but it seems to boil down to
> calling "CefCloseLibrary" that causes the SIGSEGV.
See the last part of my answer in this issue:
https://github.com/dliw/fpCEF3/issues/47#issuecomment-281333395

In the meantime I have a version which implements the correct CEF shutdown 
process. It works fine if there is only a single TChromium instance, but has 
side effects when used in the tabbed browser. Focus get lost for all other 
instances and there is no way to get it back, browser content turns black, 
etc.
-> headaches...


So no good nows - sorry. It very much depends on CEF to improve the usage on 
Linux.

Regards,
dliw


More information about the Lazarus mailing list