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.

iframe not work with OSR

Post Reply
exx
Posts: 10
Joined: Thu Jan 18, 2018 4:41 pm

iframe not work with OSR

Post by exx »

Hello,
I found that samples with OSR are not able to load iFrames inside page, how it can be solved ?
User avatar
salvadordf
Posts: 4052
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: iframe not work with OSR

Post 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.
exx
Posts: 10
Joined: Thu Jan 18, 2018 4:41 pm

Re: iframe not work with OSR

Post 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?
User avatar
salvadordf
Posts: 4052
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: iframe not work with OSR

Post 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.
User avatar
salvadordf
Posts: 4052
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: iframe not work with OSR

Post 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;
exx
Posts: 10
Joined: Thu Jan 18, 2018 4:41 pm

Re: iframe not work with OSR

Post by exx »

GlobalCEFApp.SitePerProcess := False; with this every thing works, Thanks!
Post Reply