Page 1 of 1

iframe not work with OSR

Posted: Thu Jan 18, 2018 4:44 pm
by exx
Hello,
I found that samples with OSR are not able to load iFrames inside page, how it can be solved ?

Re: iframe not work with OSR

Posted: Thu Jan 18, 2018 7:13 pm
by salvadordf
Hi,

This may be caused by a known issue in CEF3 that also affects CEF4Delphi.

If you try to load a second URL using TChromium.LoadURL in OSR mode with high DPI monitors it won't work.
The CEF4Delphi demo loads google.com when you run it and if you try to load a second page by typing the URL in the edit box it won't load anything.

The CEF3 issue is described here :
https://bitbucket.org/chromiumembedded/ ... ainting-in

The CEF4Delphi issue is this :
https://github.com/salvadordf/CEF4Delphi/issues/69

I tested these web pages with iframes in the OSR demo and they work :
https://www.w3schools.com/html/html_iframe.asp
https://www.w3schools.com/html/tryit.as ... ight_width

I had to replace the google URL in the edit box, compile the demo and then run it.
They are loaded correctly as soon as TChromium is initialized.

Re: iframe not work with OSR

Posted: Thu Jan 18, 2018 10:14 pm
by exx
I switched start page to about:blank and turned off "High DPI Enabled" from project settings.
But it doesn't help.


please, can you try this page:

Code: Select all

http://queue.vip/e0xp4yh
in the OSR mode and let me know is there any solution to see iframes from it?

Re: iframe not work with OSR

Posted: Fri Jan 19, 2018 8:24 am
by salvadordf
Hi,

Try adding this before the GlobalCEFApp.StartMainProcess call in your DPR file :

Code: Select all

GlobalCEFApp.SitePerProcess := False;
There seems to be a bug in the new SitePerProcess mode introduced in the latest Blink update.

About the other bug, it only happens when you select a bigger than normal size (>100%) for all the screen items in the Display control panel.

Re: iframe not work with OSR

Posted: Fri Jan 19, 2018 8:59 am
by salvadordf
I tested again the bug about loading a second URL and it seems it was fixed without warning. :)

You should be able to load your URL with iframes with any DPI setting if you add GlobalCEFApp.SitePerProcess := False;

Re: iframe not work with OSR

Posted: Fri Jan 19, 2018 11:15 am
by exx
GlobalCEFApp.SitePerProcess := False; with this every thing works, Thanks!