Hello,
I found that samples with OSR are not able to load iFrames inside page, how it can be solved ?
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
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: iframe not work with OSR
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.
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
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: in the OSR mode and let me know is there any solution to see iframes from it?
But it doesn't help.
please, can you try this page:
Code: Select all
http://queue.vip/e0xp4yh
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: iframe not work with OSR
Hi,
Try adding this before the GlobalCEFApp.StartMainProcess call in your DPR file :
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.
Try adding this before the GlobalCEFApp.StartMainProcess call in your DPR file :
Code: Select all
GlobalCEFApp.SitePerProcess := False;
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.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: iframe not work with OSR
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;

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
GlobalCEFApp.SitePerProcess := False; with this every thing works, Thanks!