Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 402110
Collapse All | Expand All

(-)a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/Widget.js (-1 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright: 2004, 2012 1&1 Internet AG, Germany, http://www.1und1.de,
2
 * Copyright: 2004, 2013 1&1 Internet AG, Germany, http://www.1und1.de,
3
 *                       and EclipseSource
3
 *                       and EclipseSource
4
 *
4
 *
5
 * This program and the accompanying materials are made available under the
5
 * This program and the accompanying materials are made available under the
Lines 3532-3537 Link Here
3532
        imageMgr.show(value);
3532
        imageMgr.show(value);
3533
      }
3533
      }
3534
      this._styleBackgroundImage( value );
3534
      this._styleBackgroundImage( value );
3535
      if( !value ) {
3536
        rwt.html.Style.setBackgroundGradient( this, this.getBackgroundGradient() );
3537
      }
3535
    },
3538
    },
3536
3539
3537
    _styleBackgroundImage : function( value ) {
3540
    _styleBackgroundImage : function( value ) {
(-)a/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/WidgetTest.js (-2 / +19 lines)
Lines 1-6 Link Here
1
1
2
/*******************************************************************************
2
/*******************************************************************************
3
 * Copyright (c) 2011, 2012 EclipseSource and others.
3
 * Copyright (c) 2011, 2013 EclipseSource and others.
4
 * All rights reserved. This program and the accompanying materials
4
 * All rights reserved. This program and the accompanying materials
5
 * are made available under the terms of the Eclipse Public License v1.0
5
 * are made available under the terms of the Eclipse Public License v1.0
6
 * which accompanies this distribution, and is available at
6
 * which accompanies this distribution, and is available at
Lines 445-450 Link Here
445
      }
445
      }
446
    },
446
    },
447
447
448
    testRemoveBackgroundImageAndRestoreBackgroundGradient : function() {
449
      if( rwt.client.Client.supportsCss3() ) {
450
        var gradient = [ [ 0, "rgb(255, 0, 255)" ], [ 1, "rgb(0, 255, 0)" ] ];
451
        var widget = this._createWidget();
452
        widget.setBackgroundGradient( gradient );
453
        TestUtil.flush();
454
        widget.setBackgroundImage( "bla.png" );
455
        assertTrue( TestUtil.getCssBackgroundImage( widget.getElement() ).indexOf( "bla.png" ) !== -1 );
456
        TestUtil.flush();
457
        widget.setBackgroundImage( null );
458
        TestUtil.flush();
459
        var result = TestUtil.getCssGradient( widget.getElement() );
460
        assertTrue( result !== "" );
461
        widget.destroy();
462
      }
463
    },
464
448
    testRenderHorizontalBackgroundGradient : function() {
465
    testRenderHorizontalBackgroundGradient : function() {
449
      if( rwt.client.Client.supportsCss3() ) {
466
      if( rwt.client.Client.supportsCss3() ) {
450
        var gradient = [ [ 0, "rgb(255, 0, 255)" ], [ 1, "rgb(0, 255, 0)" ] ];
467
        var gradient = [ [ 0, "rgb(255, 0, 255)" ], [ 1, "rgb(0, 255, 0)" ] ];
Lines 737-740 Link Here
737
  }
754
  }
738
} );
755
} );
739
756
740
}());
757
}());

Return to bug 402110