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

Bug 401278

Summary: [Browser] BackgroundColor behaves inconsistently
Product: [RT] RAP Reporter: Heiner Napp <h.napp>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ruediger.herrmann, tbuschto
Version: 2.0   
Target Milestone: 2.1 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Heiner Napp CLA 2013-02-20 04:44:08 EST
The following CodeSequence gives a green BACKGROUND in Chrome, but in the IE ( Version 8.0 ) the Color is not used.

public int createUI() {
Display display = new Display();
	Shell shell = new Shell( display, SWT.NONE );
	shell.setMaximized(true);
	Browser browser = new Browser( shell, SWT.NONE);
	browser.setBounds(20, 20, 400, 400);
	browser.setBackground(display.getSystemColor(SWT.COLOR_GREEN));
	shell.open();
	return 0;
}
Comment 1 Tim Buschtoens CLA 2013-02-20 05:10:51 EST
I noticed that too. Did you try explicitly setting the background color of the documents body and/or to html tag to "transparent"?
Comment 2 Heiner Napp CLA 2013-02-21 10:36:25 EST
(In reply to comment #1)
> I noticed that too. Did you try explicitly setting the background color of
> the documents body and/or to html tag to "transparent"?

No, I did not try it, but thought about it as a workaround.
Comment 3 RĂ¼diger Herrmann CLA 2013-02-22 07:01:34 EST
Just for the record, IE 9 shows the green background as expected.

I'd still regard this as a bug as RAP fails on its promise to look the same on all browsers.
Comment 4 Ivan Furnadjiev CLA 2013-03-05 11:06:16 EST
(In reply to comment #1)
> I noticed that too. Did you try explicitly setting the background color of the
> documents body and/or to html tag to "transparent"?
Fixed with commit eb2385cbcbc3b082ab3db0b140264aae48e7dbef by setting the background-color to transparent in BrowserLCA#BLANK_HTML. Please note that in case of using Browser#setText/setURL you still have to set the background-color to transparent in your html page.