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

Bug 402110

Summary: [Button] Background gradient disappears after set and remove background image
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: tbuschto
Version: 2.0   
Target Milestone: 2.1 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed patch none

Description Ivan Furnadjiev CLA 2013-03-01 05:59:55 EST
Reproducible with Controls Demo -> Button tab in Firefox and Chrome. Works fine in IE and Opera. Tested with Firefox 19 and Chrome 26.0.1410.19.
1. Start Controls Demo in FF
2. Select "Background Image" check box - background image appear
3. Deselect "Background Image" check box - background image disappear, but the background gradient is not restored
You have to hover the push buttons in order to get the background gradient back.
Comment 1 Ivan Furnadjiev CLA 2013-03-25 05:46:02 EDT
Created attachment 228983 [details]
Proposed patch

The patch restores the background gradient after the removal of background image. Tim, what do you think? Is the fix ok with you?
Comment 2 Tim Buschtoens CLA 2013-03-27 07:34:06 EDT
I think this should be fixed in _styleBackgroundImage, not _applyBackgroundImage. There should also be a check for CSS3 support (rwt.client.Client.supportsCss3()) to make sure it's not crashing older browser.

Otherwise it seems fine, though I could not apply the patch to my workspace for some reason. I'll run the tests in IE8 after it's pushed to master.
Comment 3 Ivan Furnadjiev CLA 2013-03-27 07:50:05 EDT
Fixed as suggested with commit 7ab2cabb82ecbdaca90f91e52745e843361cb232. Works fine in IE8 as well.