Bug 568789

Summary: SWT Browser not displaying pages using D3
Product: [Eclipse Project] Platform Reporter: Michael Haywood <m.haywood>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.18   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Michael Haywood CLA 2020-11-13 06:04:42 EST
I would like to display a html page that uses D3 in an SWT Browser.

If I load a URL like www.google.com it loads correctly and allows me to search etc. If I try loading a page that contains D3 I find that nothing gets displayed and no errors are output.

Apparently this works on Mac but not on Windows 10. 

Code: 

    public class D3BrowserExample {

    public static void main(String args[]) {
    Display display = new Display();
    final Shell shell = new Shell(display, SWT.SHELL_TRIM);
    shell.setLayout(new FillLayout());
    Browser browser = new Browser(shell, SWT.NONE);
    browser.addTitleListener(new TitleListener() {
        @Override
        public void changed(TitleEvent event) {
        shell.setText(event.title);
        }
    });
    browser.setBounds(0, 0, 1200, 900);
    shell.pack();
    shell.open();

    browser.setJavascriptEnabled(true);

    browser.setUrl("https://observablehq.com/@d3/force-directed-graph");

    browser.addProgressListener(new ProgressListener() {
        @Override
        public void completed(ProgressEvent event) {
        System.out.println("Page loaded");

        }

        @Override
        public void changed(ProgressEvent event) {
        }
    });
    
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch()) {
        display.sleep();
        }
    }
    }
}

I've tried this on another Windows 10 PC with version 4.3 of SWT. The complete method is called for the progress listener but nothing displays.

Here's a stackoverflow question I've created. 
https://stackoverflow.com/questions/64808494/swt-browser-not-displaying-pages-using-d3?noredirect=1#comment114602781_64808494