Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 228983 Details for
Bug 402110
[Button] Background gradient disappears after set and remove background image
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed patch
bug-402110.patch (text/plain), 2.69 KB, created by
Ivan Furnadjiev
on 2013-03-25 05:46:02 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2013-03-25 05:46:02 EDT
Size:
2.69 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/Widget.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/Widget.js >index e9a4e68..115ca72 100644 >--- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/Widget.js >+++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/Widget.js >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright: 2004, 2012 1&1 Internet AG, Germany, http://www.1und1.de, >+ * Copyright: 2004, 2013 1&1 Internet AG, Germany, http://www.1und1.de, > * and EclipseSource > * > * This program and the accompanying materials are made available under the >@@ -3532,6 +3532,9 @@ > imageMgr.show(value); > } > this._styleBackgroundImage( value ); >+ if( !value ) { >+ rwt.html.Style.setBackgroundGradient( this, this.getBackgroundGradient() ); >+ } > }, > > _styleBackgroundImage : function( value ) { >diff --git a/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/WidgetTest.js b/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/WidgetTest.js >index b0c40dc..07c387e 100644 >--- a/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/WidgetTest.js >+++ b/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/WidgetTest.js >@@ -1,6 +1,6 @@ > > /******************************************************************************* >- * Copyright (c) 2011, 2012 EclipseSource and others. >+ * Copyright (c) 2011, 2013 EclipseSource and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -445,6 +445,23 @@ > } > }, > >+ testRemoveBackgroundImageAndRestoreBackgroundGradient : function() { >+ if( rwt.client.Client.supportsCss3() ) { >+ var gradient = [ [ 0, "rgb(255, 0, 255)" ], [ 1, "rgb(0, 255, 0)" ] ]; >+ var widget = this._createWidget(); >+ widget.setBackgroundGradient( gradient ); >+ TestUtil.flush(); >+ widget.setBackgroundImage( "bla.png" ); >+ assertTrue( TestUtil.getCssBackgroundImage( widget.getElement() ).indexOf( "bla.png" ) !== -1 ); >+ TestUtil.flush(); >+ widget.setBackgroundImage( null ); >+ TestUtil.flush(); >+ var result = TestUtil.getCssGradient( widget.getElement() ); >+ assertTrue( result !== "" ); >+ widget.destroy(); >+ } >+ }, >+ > testRenderHorizontalBackgroundGradient : function() { > if( rwt.client.Client.supportsCss3() ) { > var gradient = [ [ 0, "rgb(255, 0, 255)" ], [ 1, "rgb(0, 255, 0)" ] ]; >@@ -737,4 +754,4 @@ > } > } ); > >-}()); >\ No newline at end of file >+}());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 402110
: 228983