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 196330 Details for
Bug 346683
[Theming] Can't update border-radius at runtime
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]
Fix
Bug-346683.patch (text/plain), 4.31 KB, created by
Ivan Furnadjiev
on 2011-05-23 08:58:49 EDT
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2011-05-23 08:58:49 EDT
Size:
4.31 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07 >Index: js/org/eclipse/rwt/Border.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/rwt/Border.js,v >retrieving revision 1.3 >diff -u -r1.3 Border.js >--- js/org/eclipse/rwt/Border.js 5 May 2011 15:53:58 -0000 1.3 >+++ js/org/eclipse/rwt/Border.js 23 May 2011 12:56:40 -0000 >@@ -88,16 +88,20 @@ > if( widget._innerStyle ) { > widget._innerStyle.border = ""; > } >- try{ >+ this._resetRadii( widget ); >+ this._resetComplexBorder( widget ); >+ }, >+ >+ _resetRadii : function( widget ) { >+ try { > for( var i = 0; i < 4; i++ ) { > widget._style[ this._BORDERRADII[ i ] ] = ""; > } > } catch( ex ) { >- //ignore >+ // ignore for browser without radii support > } >- this._resetComplexBorder( widget ); > }, >- >+ > _resetComplexBorder : qx.core.Variant.select("qx.client", { > "gecko" : function( widget ) { > var statics = org.eclipse.rwt.Border >@@ -122,6 +126,7 @@ > }, > > members : { >+ > _setColor : function( value ) { > if( typeof value === "string" ) { > this._singleColor = value; >@@ -268,6 +273,7 @@ > > _renderSimpleBorder : function( widget ) { > org.eclipse.rwt.Border._resetComplexBorder( widget ); >+ org.eclipse.rwt.Border._resetRadii( widget ); > var style = widget._style; > var statics = org.eclipse.rwt.Border > for( var i = 0; i < 4; i++ ) { >@@ -277,9 +283,10 @@ > } > }, > >- _renderComplexBorder : qx.core.Variant.select("qx.client", { >+ _renderComplexBorder : qx.core.Variant.select( "qx.client", { > "gecko" : function( widget ) { > var statics = org.eclipse.rwt.Border >+ statics._resetRadii( widget ); > var style = widget._style; > for( var i = 0; i < 4; i++ ) { > style[ statics._EDGEWIDTH[ i ] ] = ( this._widths[ i ] || 0 ) + "px"; >@@ -295,6 +302,7 @@ > }, > "default" : function( widget ) { > var statics = org.eclipse.rwt.Border >+ statics._resetRadii( widget ); > var outer = widget._style; > var inner = widget._innerStyle; > for( var i = 0; i < 4; i++ ) { >#P org.eclipse.rap.rwt.q07.jstest >Index: js/org/eclipse/rwt/test/tests/BorderTest.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.q07.jstest/js/org/eclipse/rwt/test/tests/BorderTest.js,v >retrieving revision 1.6 >diff -u -r1.6 BorderTest.js >--- js/org/eclipse/rwt/test/tests/BorderTest.js 14 Apr 2011 14:03:38 -0000 1.6 >+++ js/org/eclipse/rwt/test/tests/BorderTest.js 23 May 2011 12:56:41 -0000 >@@ -331,6 +331,39 @@ > } > }, > >+ testRemoveRadiiWithSimpleBorder : function() { >+ // NOTE: Tests for non-css3 browser are in GraphicsMixinTest >+ if( org.eclipse.rwt.Client.supportsCss3() ) { >+ var radii = [ 0, 1, 2, 3 ]; >+ var border = new org.eclipse.rwt.Border( 3, "rounded", "#FF00FF", [ 0, 1, 2, 3 ] ); >+ var widget = this._createWidget(); >+ widget.setBorder( border ); >+ testUtil.flush(); >+ var simpleBorder = new org.eclipse.rwt.Border( 3, "solid", "#FF00FF" ); >+ widget.setBorder( simpleBorder ); >+ testUtil.flush(); >+ assertEquals( [ 0, 0, 0, 0 ], this._getBorderRadii( widget._style ) ); >+ border.dispose(); >+ } >+ }, >+ >+ testRemoveRadiiWithComplexBorder : function() { >+ // NOTE: Tests for non-css3 browser are in GraphicsMixinTest >+ if( org.eclipse.rwt.Client.supportsCss3() ) { >+ var radii = [ 0, 1, 2, 3 ]; >+ var border = new org.eclipse.rwt.Border( 3, "rounded", "#FF00FF", [ 0, 1, 2, 3 ] ); >+ var widget = this._createWidget(); >+ widget.setBorder( border ); >+ testUtil.flush(); >+ var colorOuter = [ "#FF00EF", "#FF00EE", "#FF0EFF", "#FFE0FF" ]; >+ var colorInner = [ "#DD00EF", "#DD00EE", "#DD0EFF", "#DDE0FF" ]; >+ var complexBorder = new org.eclipse.rwt.Border( 2, "complex", colorOuter, colorInner ); >+ widget.setBorder( complexBorder ); >+ testUtil.flush(); >+ assertEquals( [ 0, 0, 0, 0 ], this._getBorderRadii( widget._style ) ); >+ border.dispose(); >+ } >+ }, > > ////////////// > // helper
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 346683
:
196310
| 196330