Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Sometimes resizing the browser by 1 pixel causes crash in cef lib

tad.chen
Posts: 104
Joined: Fri Jan 04, 2019 1:39 am

Re: Sometimes resizing the browser by 1 pixel causes crash in cef lib

Post by tad.chen »

After long time testing, I find the reason.

In your TabbedOSRBrowser demo, ShowBrowser procedure is written as
procedure TBrowserFrame.ShowBrowser;
begin
if chrmosr.Initialized and not(FTabVisible) then
begin
chrmosr.WasHidden(False);
chrmosr.WasResized;
chrmosr.SetFocus(True);
FTabVisible := True;
end;
end;
If the statement “chrmosr.WasResized;” is removed, the calling to wasHidden(false) will fail if too many tabs are opened. It's something like old version which needs to resize by 1 pixel after calling to wasHidden(false) .
tad.chen
Posts: 104
Joined: Fri Jan 04, 2019 1:39 am

Re: Sometimes resizing the browser by 1 pixel causes crash in cef lib

Post by tad.chen »

Anthoer issue I found is that chrmosrPaint procedure will output all white data ($ff) first time, after calling to ShowBrowser procedure, if too many tabs are opened. This will cause flicker in web page after browser becomes unhidden.

To avoid the issue above, I must add the statement 'GlobalCEFApp.EnableGPU:=True'.
Post Reply