Bug 510082 - [Browser] webkit browser to support WebGL
Summary: [Browser] webkit browser to support WebGL
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.7 M5   Edit
Assignee: Alexander Kurtakov CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2017-01-09 00:07 EST by Mickael Istria CLA
Modified: 2017-10-24 09:05 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2017-01-09 00:07:20 EST
Webkit is often used as the internal browser for RCP dev as it's currently the one that works best on most OSs.
An important limitation is that it doesn't support WebGL which can be necessary for some advanced visualizations.
webkit browser should be set to supoort WebGL. Several resources on the web explain what needs to be tweaked to enable it. Those tweaks should be implemented in SWT browser directly.
Comment 1 Alexander Kurtakov CLA 2017-01-09 03:14:13 EST
http://madebyevan.com/webgl-water/ works just fine in epiphany so it's not a webkitgtk limitation. Needs to be investigated why it's not working when called from swt.
Comment 2 Eclipse Genie CLA 2017-01-09 03:33:37 EST
New Gerrit change created: https://git.eclipse.org/r/88249
Comment 4 Alexander Kurtakov CLA 2017-01-09 04:07:07 EST
Niraj, Lakshmi, would you please enable webgl for win/mac if it's not enabled by default there too. FWIW, I tested with http://madebyevan.com/webgl-water/ to see it in real world.
Comment 5 Lakshmi P Shanmugam CLA 2017-01-09 05:19:25 EST
(In reply to Alexander Kurtakov from comment #4)
> Niraj, Lakshmi, would you please enable webgl for win/mac if it's not
> enabled by default there too. FWIW, I tested with
> http://madebyevan.com/webgl-water/ to see it in real world.

The above demo works for me in SWT Browser on OSX 10.11.6. Looks like WebGL is enabled by default.
Comment 6 Lars Vogel CLA 2017-01-10 02:55:08 EST
If I try to use this in yesterdays build with Linux I receive errors. They depend which protocol is use:

Browser browser = new Browser(parent, SWT.
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
browser.setUrl("https://madebyevan.com/webgl-water/");

Unacceptable TLS certificate

browser.setUrl("https://madebyevan.com/webgl-water/");

Error: image not loaded for security reasons (image must originate from the same domain as this page or use Cross-Origin Resource Sharing)

Is this expected. How do I fix these?
Comment 7 Lars Vogel CLA 2017-01-10 04:34:36 EST
(In reply to Lars Vogel from comment #6)

This was with http:

> browser.setUrl("http://madebyevan.com/webgl-water/");
> 
> Error: image not loaded for security reasons (image must originate from the
> same domain as this page or use Cross-Origin Resource Sharing)
Comment 8 Lars Vogel CLA 2017-01-10 04:37:48 EST
Tested the example on Windows (Windows 7) and this works fine.
Comment 9 Alexander Kurtakov CLA 2017-01-10 04:47:52 EST
(In reply to comment #6)
> If I try to use this in yesterdays build with Linux I receive errors. They
> depend which protocol is use:
> 
> Browser browser = new Browser(parent, SWT.
> browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
> browser.setUrl("https://madebyevan.com/webgl-water/");
> 
> Unacceptable TLS certificate
> 
> browser.setUrl("https://madebyevan.com/webgl-water/");
> 
> Error: image not loaded for security reasons (image must originate from the same
> domain as this page or use Cross-Origin Resource Sharing)
> 
> Is this expected. How do I fix these?

Tested with Firefox to access the https one and I was faced with the "Your connections is not secure" page on which one has to manually add exception to see it. Not sure what can be done on webkitgtk (and whether it should be done at all cause this is just wrong certificate) site to allow user to still see it after warning. Feel free to open new bug report as this has nothing to do with webgl enablement. Resolving this bug.
Comment 10 Tristan Gemus CLA 2017-10-24 07:25:21 EDT
I am able to reproduce the issue as the OP mentioned.

Steps to reproduce:

1. Open a new incognito window
2. Go to any WebGL URL, example: https://www.learnthreejs.com/load-3d-model-using-three-js-obj-loader/
3. See if the scene works. It is just black for me.

Thoughts?
Comment 11 Lars Vogel CLA 2017-10-24 09:05:22 EDT
(In reply to Tristan Gemus from comment #10)

> 3. See if the scene works. It is just black for me.

Its also black for me in the normal Chrome browser under Linux.