Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 372075

Summary: [Browser] Browser doesn't display anything
Product: [Eclipse Project] Platform Reporter: Hugues Cassé <casse>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED WORKSFORME QA Contact: Grant Gayed <grant_gayed>
Severity: normal    
Priority: P3 CC: eclipse.felipe, ericwill, grant_gayed, ipun
Version: 4.8Keywords: helpwanted, triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Hugues Cassé CLA 2012-02-20 18:25:52 EST
Build Identifier: M20110909-1335

I creates a swt.Browser object and feed it with the setText() command in a shell of mine. The shell is displayed but the location of the browser remains blank.

I'm on Ubuntu 11 and when I click on the browser location, scroll bar appear and seem to be proportional to the text in the browser. But, whatever the action, the text is not displayed. Below, my initialization of the browser:


SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL);
sashForm.setLayout(new GridLayout());
sashForm.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));

tbCFG = new Table(sashForm, SWT.PUSH | SWT.BORDER);
TableColumn column1 = new TableColumn(tbCFG,SWT.NULL);
column1.setText("CFG");
column1.pack();

browser = new Browser(sashForm, SWT.NONE);
browser.setText("<html><body><i>Select a script on the left list.</i></body></html>");



Reproducible: Always

Steps to Reproduce:
1. Just run the code above.
Comment 1 Hugues Cassé CLA 2012-02-20 18:28:03 EST
  I just discover that the bug is arising when my PC is behind a proxy.
If there is no proxy, all is fine !
Comment 2 Grant Gayed CLA 2012-02-21 11:23:43 EST
As an experiment can you see if specifying appropriate values for the java properties described in http://www.eclipse.org/swt/faq.php#browserproxy (Linux) helps?
Comment 3 Hugues Cassé CLA 2012-02-22 03:06:01 EST
  Indeed, as soon as I realized it's a problem of proxy, I tried to configure it in the preferences dialog and doesn't work: my browser widget wasn't displaying anything.

  In fact, I have dig the problem: I have forgotten that my displayed HTML (generated from a String) is including a CSS stylesheet from an HTTP location: that's was the real problem. But as a side effect, it seems that the Browser widget does not handle well the proxy configuration. Maybe some method has to be called ?
Comment 4 Grant Gayed CLA 2012-02-23 16:18:59 EST
To confirm, you said that you tried to configure the proxy info in eclipse's preferences dialog, but did you try setting the java properties described in http://www.eclipse.org/swt/faq.php#browserproxy?  The linked FAQ item suggests setting them at the command line when launching eclipse, but a better way is to append the vm args to the end of the eclipse.ini file.
Comment 5 Hugues Cassé CLA 2012-02-24 03:17:17 EST
  No, I don't. I don't know I have to do something for that.
Comment 6 Ian Pun CLA 2017-06-21 16:20:03 EDT
Bug triaged. Visit https://www.eclipse.org/swt/triage.php for more information.
Comment 7 Eric Williams CLA 2018-06-15 15:46:14 EDT
Is this still an issue on 4.8?
Comment 8 Eric Williams CLA 2018-06-29 15:08:20 EDT
(In reply to Eric Williams from comment #7)
> Is this still an issue on 4.8?

No response in 2 weeks, closing this ticket now. Please feel free to reopen the issue with steps to reproduce on 4.8/GTK3.22, should the bug reoccur.