What is this HTMLViewer.Renderer Business ?

This conversation follows my other conversations about javascript "" in my url field.

  1. After some asked help, searches on the internet, hard disk, etc. It happens to me that my javascript "" trouble disappears… [this have to be checked and continue to check).

Yesterday’s Window standalone size was 31.3 MB (Libs + .exe), with the settings below:

When I found the .Renderer Clue, I changed the Property (image below) from Native to WebKit (watch the PopupMenu text value) and save the project before I forgot to make the changes. Now, back home, I get an eye on the [local] docs and discover (or refresh my mind) with the below sentense:

Choosing WebKit includes the WebKit engine in your built application, increasing the size of your application by about 20MB.

I built the standalone application and checked its size: 72.2 MB (Libs + .exe). The application alone weight 2.7 MB.

This have been done with El Capitan & Xojo 2015r1.

Further search lead me to tell: using the code below:

#If TargetWin32 Me.Renderer = 1 // WebKit #EndIf

Does not place the libcef.dll library into the Libs folder !
(I found a Browser Plugin.dll library that weight 140 KB [yes, Kilo Bytes…]).

BTW: a search for HTMLViewer.Renderer on my hard disk (including system files) leads to nothing. I have the recent versions installed (and not used) and so if no occurrence found that means: no entry in the Release Notes.

I love when crazy ideas comes to mind: I checked the size of the Safari application: 47.2MB for a full featured browser… and compare that to the 72.2 MB for my Xojo standalone application… and start to cry.

I’ve checked the release notes for the 2015 releases but I found no information there.

Before someone ask me for it, yes, I defined the UserAgent property (in the 2014 “original” version and it is still here, in the current project: I updated the string).

I nearly forgot to add an important information:
El Capitan .2
Xojo 15r1

I do not know the current version situation since one have to build the StandAlone and my license stops at 15r1.

I’m afraid I can’t help you much but

The Safari.App in your Application Folder is not ‘Safari’. It needs /System/Library/PrivateFrameworks/Safari.framework/
And I’m that sure if you run otool -L on the Safari binary within this framework, you’ll find tons of other frameworks and libraries it needs on top of that.

I think an easier comparison is Firefox (not sure if they use Webkit) that is 190MB on my system.

well, if you want webkit on Windows, please set Renderer to WebKit.
This property has no effect for Mac and can’t really be set at runtime.

And when using WebKit in one of the htmlviewer, the libraries are added.

Screen shots above comes from OS X.

It may be available in the IDE, but it does nothing.

This property is only available on the Windows platform.

I probably sound like a broken record here, but on modern OS’s (e.g. Windows 8.1 or later) you can use the Native Renderer, and if you set the Registry tags AND MOTW (mark of the web, google it) properly, the IE11 renderer is “pretty good”.

I’m not saying the WebKit/Chromium embed is bad or anything, but that you might want to give IE11 a try first.

With a good practice of both platforms, it quickly appears that WebKit on Windows is vastly inferior (or outdated) as compared to the Mac implementation.

I concur with Michael : when using the latest native renderer (see http://blog.xojo.com/use-newer-version-of-internet-explorer-with-webbrowser-and-htmlviewer) HTMLViewer using the IE11 engine is usually comparable to MacOSX.

Hi all,

I do not understand what you are talking about.

The important part is that the code below:

#If TargetWin32 Me.Renderer = 1 // WebKit #EndIf

does not works: the relevant piece of data is not added into the StandAlone.

Why must I add this ?

Because there are bugs in the standard renderer under Windows. Using the alternate renderer (WebKit) allows me to get the application working fine under WIndows.

I will try to add a bug report against that later today.

To get the alternate Renderer, one have to set the IDE Property (instead of the code).

Yes, testings have been done (here), and yes, that not working code was present in the code before I made testings on this problem. Yes, I discovers that days ago only after getting troubles with the bug.

I forgot to mention the question (even if I do not saw an entry in the Release Notes):

Is this working on 2015r4 ?

Since on Mac Renderer does not change anything, simply set to Webkit in the IDE and don’t bother testing for Win32.

I just tried this in a button action event :

[code] if htmlviewer1.Renderer = 0 then
htmlviewer1.Renderer = 1
htmlviewer1.Renderer = 0
end if

system.DebugLog str(htmlviewer1.Renderer)

Renderer is set quite correctly.

Xojo version ?

In the Stand Alone application ?

Windows ?

[quote=241510:@Emile Schwarz]Xojo version ?

In the Stand Alone application ?

Windows ?[/quote]

Why don’t you try that yourself ? 2015R4 Windows 10, both debug and build do the same.

Now, as I said above, just set to WebKit in the IDE, and you will be fine since that does nothing in Mac.

Becaus, as I wrote earlier, I can’tbuild a stand alone with 2015r4.

The matter is on Windows (Windows 8.1 is installed in my second laptop, but I accept Windows 10 results too ;-:slight_smile: ).

Why are-you talking about Mac ?

Emile, sometimes I wonder …

Why put #If TargetWin32 ?

Maybe I should have not tried to help. You seem to enjoy so much getting lost in haphazard conjectures, I am sorry for having tried to bring in any clarity…

Maybe I also wasted too much time in this thread…

Well, the renderer property is only for Windows.
And must be set before the window opens, so you can only do it in the IDE.
You can of course have two copies of the ContainerControl/Window and one with Renderer=1 and one with Renderer=0.

[quote=241518:@Christian Schmitz]Well, the renderer property is only for Windows.
And must be set before the window opens, so you can only do it in the IDE.[/quote]

This is the important thing. It lets the IDE know to include the CEF DLLs.

Because as you stated, the trouble exists only on Windows. So, I change the Renderer in the project for when the application runs on Windows. (at first, you think so; changing the renderer using the HTMLViever IDE properties is not the obvious way when you compile for xplatforms).

I re-read my original text: I forgot to specifically says this is for the WIndows compile. But, if it was for running under OS X, why would I place

#If TargetWin32

in my code ?

Also, the only real way to check if Webkit is added to the .exe application is to build the application, check its size (+20MB) and that I cannot do with version afer 2015r1.

@Christian, Joe: the code must be set in the App.Open event ?

Here is the official answer to my bug report:

This property can only be set at design time At runtime it can be read Setting it at runtime has no effect

I was right (unfortunately) and the trouble comes from the documentation.

I was wrong in not using the Windows channel and forgetting to state clearly it is for Windows standalone.

Michel, is your standalone size more than 20MB ? (using the #If TargetWin32 code ?)

As far as I understand: no.

Half baked help ?

Well, set it in the IDE. It’s ignored for Mac/Linux anyway.