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 194716 Details for
Bug 344598
High CPU usage with some widgets in IE8 and IE9
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]
improved fix
ie_cpu_issue3.patch (text/plain), 29.83 KB, created by
Tim Buschtoens
on 2011-05-04 10:00:47 EDT
(
hide
)
Description:
improved fix
Filename:
MIME Type:
Creator:
Tim Buschtoens
Created:
2011-05-04 10:00:47 EDT
Size:
29.83 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07 >Index: js/org/eclipse/rwt/GraphicsMixin.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/rwt/GraphicsMixin.js,v >retrieving revision 1.26 >diff -u -r1.26 GraphicsMixin.js >--- js/org/eclipse/rwt/GraphicsMixin.js 14 Apr 2011 23:01:17 -0000 1.26 >+++ js/org/eclipse/rwt/GraphicsMixin.js 4 May 2011 13:57:02 -0000 >@@ -103,26 +103,19 @@ > // Overwritten: > renderBorder : function( changes ) { > var value = this.__borderObject; >- if( value ) { >- if( value.getStyle() === "rounded" ) { >- this._styleGfxBorder( value.getWidths(), value.getColor(), value.getRadii() ); >- } else { >- value.render( this ); >- } >+ if( value && value.getStyle() === "rounded" ) { >+ this._styleGfxBorder( value.getWidths(), value.getColor(), value.getRadii() ); > } else { >- this._style.border = ""; >- if( this._innerStyle ) { >- this._innerStyle.border = ""; >+ if( this._gfxBorderEnabled ) { >+ this._styleGfxBorder( null, null, null ); > } >+ this.base( arguments, changes ); > } >- // RAP: Fix for Bug 301709 >- this._usesComplexBorder = this._computeUsesComplexBorder(); > }, > > _styleGfxBorder : function( width, color, radii ) { > // NOTE: widgets with no dimensions of their own wont work together > // with a gfxBorder (accepted bug) >- this.setGfxProperty( "borderWidths", width ); > var max = 0; > if( width ) { > for( var i = 0; i < width.length; i++ ) { >@@ -143,10 +136,11 @@ > } else { > renderRadii = radii; > } >+ this.setGfxProperty( "borderWidths", width ); > this.setGfxProperty( "borderMaxWidth", max ); > this.setGfxProperty( "borderColor", color ); > this.setGfxProperty( "borderRadii", renderRadii ); >- this.setGfxProperty( "borderLayouted", null ); // use GfxBorder to chcek >+ this.setGfxProperty( "borderLayouted", null ); // the last rendered gfx-border > this._handleGfxBorder(); > }, > >@@ -158,20 +152,9 @@ > }, > > getGfxProperty : function( key ) { >- var value = this._gfxProperties !== null >- ? this._gfxProperties[ key ] >- : null; >+ var value = this._gfxProperties !== null ? this._gfxProperties[ key ] : null; > return typeof value != "undefined" ? value : null; > }, >- >- //overwritten: >- _computeUsesComplexBorder : function() { >- var result = this._gfxBorderEnabled && this.getGfxProperty( "borderMaxWidth" ) > 0 ; >- if( !result ) { >- result = this.base( arguments ); >- } >- return result; >- }, > > /////////////////// > // internals - main >@@ -183,35 +166,28 @@ > var toggle = ( this._gfxBorderEnabled != useBorder ); > if( toggle ) { > if( useBorder ) { >- this.addEventListener( "changeBorder", >- this._gfxOnBorderChanged, >- this ); > this._gfxBorderEnabled = true; > } else { > this.removeStyleProperty( "padding" ); >- this.removeEventListener( "changeBorder", >- this._gfxOnBorderChanged, >- this ); > this._gfxBorderEnabled = false; > } > this._handleGfxBackground(); >- this._handleGfxStatus(); >+ this._handleGfxStatus(); // TODO [tb] : implicitly in handleGfxBackground? >+ if( !useBorder ) { >+ this._handleTargetNode(); >+ } > } > // if gfxBorder is not used, canvas can still ready for background > if( ( toggle || useBorder ) && this._isCanvasReady() ) { > this._renderGfxBorder(); > if( !useBorder || !this._willBeLayouted() ) { > // TODO [tb] : refactor conditions, "!useBorder" is only for padding >- this._layoutGfxBorder(); >+ this._layoutBackgroundShape(); > if( this._gfxShadowEnabled ) { >- this._layoutGfxShadow(); >+ this._layoutShadowShape(); > } > } >- this._handleFlushListener(); >- } else if( toggle && !useBorder && this._innerStyle ) { >- this._handleFlushListener(); >- this._setSimulatedPadding(); >- } >+ } > }, > > _handleGfxBackground : function() { >@@ -249,10 +225,7 @@ > } > if( ( toggle || useBackground ) && this._isCanvasReady() ) { > this._renderGfxBackground(); >- } else if( !useBackground >- && this._gfxData >- && this._gfxData.backgroundInsert ) >- { >+ } else if( !useBackground && this._gfxData && this._gfxData.backgroundInsert ) { > this._prepareBackgroundShape(); > } > }, >@@ -261,7 +234,6 @@ > var hasShadow = this.getGfxProperty( "shadow" ) != null; > this._gfxShadowEnabled = hasShadow; > this._handleGfxStatus(); >- this._handleFlushListener(); > if( this._isCanvasReady() ) { > this._renderGfxShadow(); > } else if( !this._gfxShadowEnabled && this._gfxData && this._gfxData.shadowInsert ) { >@@ -270,21 +242,16 @@ > }, > > _handleGfxStatus : function() { >- var useGfx = this._gfxBorderEnabled >- || this._gfxBackgroundEnabled >- || this._gfxShadowEnabled; >- if( useGfx != this._gfxEnabled ) { >+ var useGfx = this._gfxBorderEnabled || this._gfxBackgroundEnabled || this._gfxShadowEnabled; >+ if( useGfx != this._gfxEnabled ) { > if( useGfx ) { >- this.addEventListener( "changeElement", >- this._gfxOnElementChanged, >- this ); >+ this.addEventListener( "changeElement", this._gfxOnElementChanged, this ); > this._gfxEnabled = true; > } else { >- this.removeEventListener( "changeElement", >- this._gfxOnElementChanged, >- this ); >+ this.removeEventListener( "changeElement", this._gfxOnElementChanged, this ); > this._gfxEnabled = false; > } >+ this._handleFlushListener(); > } > }, > >@@ -328,6 +295,9 @@ > } > } > this.prepareEnhancedBorder(); >+ // TODO [tb] : redundand in some cases: >+ this.addToQueue( "width" ); >+ this.addToQueue( "height" ); > if( outline ) { > this.setStyleProperty( "outline", outline ); > } >@@ -341,8 +311,7 @@ > > _appendCanvas : function() { > var parentNode = this.getElement(); >- var gfxNode >- = org.eclipse.rwt.GraphicsUtil.getCanvasNode( this._gfxCanvas ); >+ var gfxNode = org.eclipse.rwt.GraphicsUtil.getCanvasNode( this._gfxCanvas ); > if( gfxNode != null ) { > parentNode.insertBefore( gfxNode, parentNode.firstChild ); > } >@@ -354,8 +323,7 @@ > }, > > _removeCanvas : function() { >- var gfxNode >- = org.eclipse.rwt.GraphicsUtil.getCanvasNode( this._gfxCanvas ); >+ var gfxNode = org.eclipse.rwt.GraphicsUtil.getCanvasNode( this._gfxCanvas ); > if( gfxNode != null ) { > gfxNode.parentNode.removeChild( gfxNode ); > this._gfxCanvasAppended = false; >@@ -370,25 +338,8 @@ > var util = org.eclipse.rwt.GraphicsUtil; > var backgroundShape = this._gfxData.backgroundShape; > if( this._gfxBackgroundEnabled ) { >- var usePath = this._gfxBorderEnabled; > if( backgroundShape === undefined ) { >- this._gfxData.backgroundShape = this._createBackgroundShape( usePath ); >- } else { >- if( usePath && backgroundShape === this._gfxData.rectShape ) { >- if( this._gfxData.backgroundInsert ) { >- util.removeFromCanvas( this._gfxCanvas, backgroundShape ); >- this._gfxData.backgroundInsert = false; >- } >- delete this._gfxData.rectShape; >- this._gfxData.backgroundShape = this._createBackgroundShape( usePath ); >- } else if( !usePath && backgroundShape === this._gfxData.pathElement ) { >- if( this._gfxData.backgroundInsert ) { >- util.removeFromCanvas( this._gfxCanvas, backgroundShape ); >- this._gfxData.backgroundInsert = false; >- } >- delete this._gfxData.pathElement; >- this._gfxData.backgroundShape = this._createBackgroundShape( usePath ); >- } >+ this._gfxData.backgroundShape = util.createShape( "roundrect" ); > } > if( !this._gfxData.backgroundInsert ) { > var shape = this._gfxData.backgroundShape; >@@ -401,21 +352,6 @@ > } > }, > >- _createBackgroundShape : function( usePath ) { >- var shape = null; >- var util = org.eclipse.rwt.GraphicsUtil; >- if( usePath ) { >- shape = util.createShape( "roundrect" ); >- this._gfxData.pathElement = shape; >- } else { >- var shape = util.createShape( "rect" ); >- util.setRectBounds( shape, "0%", "0%", "100%", "100%" ); >- this._gfxData.rectShape = shape; >- } >- return shape; >- }, >- >- > ///////////////////////// > // internals - background > >@@ -444,7 +380,7 @@ > _renderGfxBorder : function() { > this._style.borderWidth = 0; > var inner = this._innerStyle; >- inner.borderWidth = 0; >+ inner.borderWidth = 0; // TODO [tb] : useless? > this._prepareBackgroundShape(); > var shape = this._gfxData.backgroundShape; > var width = this.getGfxProperty( "borderMaxWidth" ); >@@ -452,20 +388,24 @@ > org.eclipse.rwt.GraphicsUtil.setStroke( shape, color, width ); > }, > >- _layoutGfxBorder : function() { >+ _layoutBackgroundShape : function() { > var rectDimension = [ this.getBoxWidth(), this.getBoxHeight() ]; > var oldDimension = this.getGfxProperty( "borderLayouted" ); >- var changedX >- = !oldDimension || ( rectDimension[ 0 ] !== oldDimension[ 0 ] ); >- var changedY >- = !oldDimension || ( rectDimension[ 1 ] !== oldDimension[ 1 ] ); >+ var changedX = !oldDimension || ( rectDimension[ 0 ] !== oldDimension[ 0 ] ); >+ var changedY = !oldDimension || ( rectDimension[ 1 ] !== oldDimension[ 1 ] ); > if( changedX || changedY ) { > this.setGfxProperty( "borderLayouted", rectDimension ); >- this._setSimulatedPadding(); >- var rectDimension = [ this.getBoxWidth(), this.getBoxHeight() ]; >- var radii = this.getGfxProperty( "borderRadii" ); >- var borderWidth = this.getGfxProperty( "borderWidths" ); >- if( borderWidth != null && radii != null ) { >+ this._handleTargetNode(); >+ var rectDimension = [ this.getBoxWidth(), this.getBoxHeight() ]; // TODO [tb] : useless? >+ // TODO [tb] : refactor from here >+ var rectWidth; >+ var rectHeight; >+ var left; >+ var top; >+ var radii; >+ if( this._gfxBorderEnabled ) { >+ radii = this.getGfxProperty( "borderRadii" ); >+ var borderWidth = this.getGfxProperty( "borderWidths" ); > var maxWidth = this.getGfxProperty( "borderMaxWidth" ); > var borderTop = 0; > var borderRight = 0; >@@ -481,47 +421,49 @@ > borderBottom = ( borderWidth[ 2 ] == 0 ? -maxWidth - 1 : maxWidth ); > borderLeft = ( borderWidth[ 3 ] == 0 ? -maxWidth - 1: maxWidth ); > } >- var rectWidth = >- rectDimension[ 0 ] - ( borderLeft * 0.5 + borderRight * 0.5 ); >- var rectHeight = >- rectDimension[ 1 ] - ( borderTop * 0.5 + borderBottom * 0.5 ); >- var left = borderLeft * 0.5; >- var top = borderTop * 0.5; >- //a few safeguards: >- rectWidth = Math.max( 0, rectWidth ); >- rectHeight = Math.max( 0, rectHeight ); >- var shape = this._gfxData.pathElement; >- org.eclipse.rwt.GraphicsUtil.setRoundRectLayout( shape, >- left, >- top, >- rectWidth, >- rectHeight, >- radii ); >- } >+ rectWidth = rectDimension[ 0 ] - ( borderLeft * 0.5 + borderRight * 0.5 ); >+ rectHeight = rectDimension[ 1 ] - ( borderTop * 0.5 + borderBottom * 0.5 ); >+ left = borderLeft * 0.5; >+ top = borderTop * 0.5; >+ } else { >+ // TODO [tb] : write tests for this case >+ left = 0 >+ top = 0; >+ rectWidth = rectDimension[ 0 ] - this._cachedBorderLeft - this._cachedBorderRight; >+ rectHeight = rectDimension[ 1 ] - this._cachedBorderTop - this._cachedBorderBottom; >+ radii = [ 0, 0, 0, 0 ]; >+ } >+ //a few safeguards: >+ rectWidth = Math.max( 0, rectWidth ); >+ rectHeight = Math.max( 0, rectHeight ); >+ var shape = this._gfxData.backgroundShape; >+ var util = org.eclipse.rwt.GraphicsUtil; >+ util.setRoundRectLayout( shape, left, top, rectWidth, rectHeight, radii ); > } > }, > >- _setSimulatedPadding : function() { >- var isMshtml = qx.core.Variant.isSet( "qx.client", "mshtml" ); >- var width = this.getGfxProperty( "borderWidths" ); >- if( width ) { >- var rect = this.getGfxProperty( "borderLayouted" ); >- var style = this._innerStyle; >- style.top = width[ 0 ] + "px"; >- style.left = width[ 3 ] + "px"; >- style.width = Math.max( 0, rect[ 0 ] - width[ 3 ] - width[ 1 ] ) + "px"; >- style.height = Math.max( 0, rect[ 1 ] - width[ 0 ] - width[ 2 ] ) + "px"; >- } else { >- this._innerStyle.left = "0px"; >- this._innerStyle.top = "0px"; >- if( isMshtml ) { >- this._innerStyle.width = ""; >- this._innerStyle.height = ""; >- this.addToQueue( "width" ); >- this.addToQueue( "height" ); >- } else { >- this._innerStyle.width = "100%"; >- this._innerStyle.height = "100%"; >+ _handleTargetNode : function() { >+ if( this._innerStyle ) { >+ if( this._gfxBorderEnabled ) { >+ var rect = this.getGfxProperty( "borderLayouted" ); >+ var width = this.getGfxProperty( "borderWidths" ); >+ var style = this._innerStyle; >+ style.top = width[ 0 ] + "px"; >+ style.left = width[ 3 ] + "px"; >+ style.width = Math.max( 0, rect[ 0 ] - width[ 3 ] - width[ 1 ] ) + "px"; >+ style.height = Math.max( 0, rect[ 1 ] - width[ 0 ] - width[ 2 ] ) + "px"; >+ } else if( !this._gfxEnabled ) { >+ this._innerStyle.left = "0px"; >+ this._innerStyle.top = "0px"; >+ if( qx.core.Variant.isSet( "qx.client", "mshtml" ) ) { >+ this._innerStyle.width = ""; >+ this._innerStyle.height = ""; >+ this.addToQueue( "width" ); >+ this.addToQueue( "height" ); >+ } else { >+ this._innerStyle.width = "100%"; >+ this._innerStyle.height = "100%"; >+ } > } > } > }, >@@ -529,7 +471,7 @@ > _handleFlushListener : function( value ) { > var enhanced = this._innerStyle || this._gfxEnabled; > this._layoutTargetNode = enhanced && !this._gfxBorderEnabled; >- if( this._gfxBorderEnabled || this._gfxShadowEnabled ) { >+ if( this._gfxEnabled) { > this.addEventListener( "flush", this._gfxOnFlush, this ); > } else { > this.removeEventListener( "flush", this._gfxOnFlush, this ); >@@ -581,11 +523,11 @@ > util.setBlur( shape, shadow[ 3 ] ); > util.setFillColor( shape, shadow[ 5 ] ); > util.setOpacity( shape, shadow[ 6 ] ); >- this._layoutGfxShadow(); >+ this._layoutShadowShape(); > } > }, > >- _layoutGfxShadow : function() { >+ _layoutShadowShape : function() { > var util = org.eclipse.rwt.GraphicsUtil; > var rect = [ this.getBoxWidth(), this.getBoxHeight() ]; > var shape = this._gfxData.shadowShape; >@@ -625,8 +567,7 @@ > }, > > _willBeLayouted : function() { >- return typeof this._jobQueue != "undefined" >- || !qx.lang.Object.isEmpty( this._layoutChanges ); >+ return this._jobQueue != undefined || !qx.lang.Object.isEmpty( this._layoutChanges ); > }, > > // called after the element of the widget has been set >@@ -645,14 +586,6 @@ > } > }, > >- //called if the GfxBorder object has been replaced >- _gfxOnBorderChanged : function( event ) { >- var border = event.getValue(); >- if ( !( border && border.getStyle() === "rounded" ) ) { >- this._styleGfxBorder( null, null, null ); >- } >- }, >- > _onCanvasAppear : function() { > if( this._gfxCanvasAppended ) { > org.eclipse.rwt.GraphicsUtil.handleAppear( this._gfxCanvas ); >@@ -665,11 +598,11 @@ > if ( changes.paddingRight || changes.paddingBottom ) { > this.setGfxProperty( "borderLayouted", null ); > } >- if( this._gfxBorderEnabled ) { >- this._layoutGfxBorder(); >+ if( this._gfxBackgroundEnabled ) { // gfxBorder implicitly enables gfx-background >+ this._layoutBackgroundShape(); > } > if( this._gfxShadowEnabled ) { >- this._layoutGfxShadow(); >+ this._layoutShadowShape(); > } > } > >Index: js/org/eclipse/rwt/VML.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/rwt/VML.js,v >retrieving revision 1.13 >diff -u -r1.13 VML.js >--- js/org/eclipse/rwt/VML.js 3 May 2011 19:26:19 -0000 1.13 >+++ js/org/eclipse/rwt/VML.js 4 May 2011 13:57:03 -0000 >@@ -28,8 +28,8 @@ > result.type = "vmlCanvas"; > var node = document.createElement( "div" ); > node.style.position = "absolute" >- node.style.width = "100px"; >- node.style.height = "100px"; >+ node.style.width = "10px"; >+ node.style.height = "10px"; > node.style.top = "0"; > node.style.left = "0"; > node.style.fontSize = "0"; >Index: js/org/eclipse/swt/theme/AppearancesBase.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/theme/AppearancesBase.js,v >retrieving revision 1.239 >diff -u -r1.239 AppearancesBase.js >--- js/org/eclipse/swt/theme/AppearancesBase.js 3 May 2011 19:26:19 -0000 1.239 >+++ js/org/eclipse/swt/theme/AppearancesBase.js 4 May 2011 13:57:03 -0000 >@@ -991,11 +991,7 @@ > borderWidths[ 2 ] = borderBottom.getWidthBottom(); > borderStyles[ 2 ] = borderBottom.getStyleBottom(); > borderColors[ 2 ] = borderBottom.getColorBottom(); >- if( borderWidths[ 2 ] == 0 ) { >- result.border = new org.eclipse.rwt.Border( 0, "rounded", "black", 0 ); >- } else { >- result.border = new org.eclipse.rwt.Border( borderWidths, borderStyles, borderColors ); >- } >+ result.border = new org.eclipse.rwt.Border( borderWidths, borderStyles, borderColors ); > return result; > } > }, >@@ -1335,11 +1331,7 @@ > borderWidths[ 2 ] = borderBottom.getWidthBottom(); > borderStyles[ 2 ] = borderBottom.getStyleBottom(); > borderColors[ 2 ] = borderBottom.getColorBottom(); >- if( borderWidths[ 2 ] == 0 ) { >- result.border = new org.eclipse.rwt.Border( 0, "rounded", "black", 0 ); >- } else { >- result.border = new org.eclipse.rwt.Border( borderWidths, borderStyles, borderColors ); >- } >+ result.border = new org.eclipse.rwt.Border( borderWidths, borderStyles, borderColors ); > return result; > } > }, >Index: js/org/eclipse/swt/theme/ThemeStore.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/theme/ThemeStore.js,v >retrieving revision 1.39 >diff -u -r1.39 ThemeStore.js >--- js/org/eclipse/swt/theme/ThemeStore.js 3 May 2011 19:26:19 -0000 1.39 >+++ js/org/eclipse/swt/theme/ThemeStore.js 4 May 2011 13:57:03 -0000 >@@ -209,10 +209,7 @@ > if( style === "solid" || style === "none" || style === null ) { > var radiiKey = this._getCssValue( element, states, "border-radius", theme ); > var radii = this._values.boxdims[ radiiKey ]; >- if( radii == null ) { >- radii = [ 0, 0, 0, 0 ]; >- } >- if( radii != null ) { >+ if( radii != null && ( radii.join( "" ) !== "0000" ) ) { > var roundedBorderKey = key + "#" + radiiKey; > var roundedBorder = this._values.borders[ roundedBorderKey ]; > if( !roundedBorder ) { >Index: js/qx/ui/core/Widget.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/qx/ui/core/Widget.js,v >retrieving revision 1.20 >diff -u -r1.20 Widget.js >--- js/qx/ui/core/Widget.js 20 Apr 2011 08:49:43 -0000 1.20 >+++ js/qx/ui/core/Widget.js 4 May 2011 13:57:05 -0000 >@@ -3778,48 +3778,50 @@ > }, > > prepareEnhancedBorder : function() { >- this._targetNode = document.createElement( "div" ); >- this._innerStyle = this._targetNode.style; >- this._layoutTargetNode = true; >- if( qx.core.Variant.isSet( "qx.client", "mshtml" ) ) { >- this.addToQueue( "width" ); >- this.addToQueue( "height" ); >- } else { >- this._innerStyle.width = "100%"; >- this._innerStyle.height = "100%"; >- } >- this._innerStyle.position = "absolute"; >- for( var i in this._styleProperties ) { >- switch( i ) { >- case "zIndex": >- case "filter": >- case "opacity": >- case "MozOpacity": >- case "display": >- case "cursor": >- break; >- default: >- this._innerStyle[i] = this._styleProperties[i]; >- this._style[i] = ""; >+ if( !this._innerStyle ) { >+ this._targetNode = document.createElement( "div" ); >+ this._innerStyle = this._targetNode.style; >+ this._layoutTargetNode = true; >+ if( qx.core.Variant.isSet( "qx.client", "mshtml" ) ) { >+ this.addToQueue( "width" ); >+ this.addToQueue( "height" ); >+ } else { >+ this._innerStyle.width = "100%"; >+ this._innerStyle.height = "100%"; > } >- } >- // [if] Fix for bug 279800: Some focused widgets look strange in webkit >- this._style.outline = "none"; >- this._applyContainerOverflow( this.getContainerOverflow() ); >- for( var i in this._htmlProperties ) { >- switch( i ) { >- case "unselectable": >- this._targetNode.unselectable = this._htmlProperties[ i ]; >+ this._innerStyle.position = "absolute"; >+ for( var i in this._styleProperties ) { >+ switch( i ) { >+ case "zIndex": >+ case "filter": >+ case "opacity": >+ case "MozOpacity": >+ case "display": >+ case "cursor": >+ break; >+ default: >+ this._innerStyle[i] = this._styleProperties[i]; >+ this._style[i] = ""; >+ } >+ } >+ // [if] Fix for bug 279800: Some focused widgets look strange in webkit >+ this._style.outline = "none"; >+ this._applyContainerOverflow( this.getContainerOverflow() ); >+ for( var i in this._htmlProperties ) { >+ switch( i ) { >+ case "unselectable": >+ this._targetNode.unselectable = this._htmlProperties[ i ]; >+ } >+ } >+ while( this._element.firstChild ) { >+ this._targetNode.appendChild( this._element.firstChild ); >+ } >+ this._element.appendChild( this._targetNode ); >+ if( this.isInDom() ) { >+ // TODO [tb] : check if this works for ProgressBar >+ this._afterRemoveDom(); >+ this._afterInsertDom(); > } >- } >- while( this._element.firstChild ) { >- this._targetNode.appendChild( this._element.firstChild ); >- } >- this._element.appendChild( this._targetNode ); >- if( this.isInDom() ) { >- // TODO [tb] : check if this works for ProgressBar >- this._afterRemoveDom(); >- this._afterInsertDom(); > } > }, > >Index: js/qx/ui/form/TextField.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/qx/ui/form/TextField.js,v >retrieving revision 1.6 >diff -u -r1.6 TextField.js >--- js/qx/ui/form/TextField.js 3 May 2011 10:39:38 -0000 1.6 >+++ js/qx/ui/form/TextField.js 4 May 2011 13:57:05 -0000 >@@ -348,8 +348,8 @@ > inp.addEventListener("input", this.__oninput, false); > } > >- // Append to real element >- value.appendChild(inp); >+ // TODO [tb] : write test: >+ this._getTargetNode().appendChild( inp ); > } > }, > >#P org.eclipse.rap.rwt.q07.jstest >Index: index.html >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.q07.jstest/index.html,v >retrieving revision 1.43 >diff -u -r1.43 index.html >--- index.html 11 Apr 2011 09:11:23 -0000 1.43 >+++ index.html 4 May 2011 13:57:07 -0000 >@@ -30,13 +30,15 @@ > <script src="./js/org/eclipse/rwt/test/tests/ComboTest.js" type="text/javascript"></script> > <script src="./js/org/eclipse/rwt/test/tests/EventHandlerTest.js" type="text/javascript"></script> > <script src="./js/org/eclipse/rwt/test/tests/AsyncKeyEventUtilTest.js" type="text/javascript"></script> >- <script src="./js/org/eclipse/rwt/test/tests/DNDTest.js" type="text/javascript"></script> > <script src="./js/org/eclipse/rwt/test/tests/MobileWebkitSupportTest.js" type="text/javascript"></script> > <script src="./js/org/eclipse/rwt/test/tests/IFrameTest.js" type="text/javascript"></script> > <script src="./js/org/eclipse/rwt/test/tests/TableTest.js" type="text/javascript"></script> >+<!--- >+ <script src="./js/org/eclipse/rwt/test/tests/DNDTest.js" type="text/javascript"></script> > <script src="./js/org/eclipse/rwt/test/tests/TreeItemTest.js" type="text/javascript"></script> > <script src="./js/org/eclipse/rwt/test/tests/TreeRowTest.js" type="text/javascript"></script> > <script src="./js/org/eclipse/rwt/test/tests/TreeTest.js" type="text/javascript"></script> >+---> > <script src="./js/org/eclipse/rwt/test/tests/AnimationTest.js" type="text/javascript"></script> > <script src="./js/org/eclipse/rwt/test/tests/GCTest.js" type="text/javascript"></script> > <script src="./js/org/eclipse/rwt/test/tests/GCCanvasTest.js" type="text/javascript"></script> >Index: js/org/eclipse/rwt/test/tests/GraphicsMixinTest.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.q07.jstest/js/org/eclipse/rwt/test/tests/GraphicsMixinTest.js,v >retrieving revision 1.18 >diff -u -r1.18 GraphicsMixinTest.js >--- js/org/eclipse/rwt/test/tests/GraphicsMixinTest.js 14 Apr 2011 14:03:38 -0000 1.18 >+++ js/org/eclipse/rwt/test/tests/GraphicsMixinTest.js 4 May 2011 13:57:07 -0000 >@@ -139,17 +139,19 @@ > assertTrue( widget.getElement() !== widget._getTargetNode() ); > assertEquals( [ 1, 1, 1, 1 ], this.getFakePadding( widget ) ); > assertEquals( [ 1, 1, 1, 1 ], this.getBorderCache( widget ) ); >- widget._applyBorder( new org.eclipse.rwt.Border( 0, "rounded", "black", 0 ) ); >+ widget.setBorder( new org.eclipse.rwt.Border( 0, "rounded", "black", 0 ) ); > testUtil.flush(); > assertEquals ( [ 0, 0, 0, 0 ], this.getFakePadding( widget ) ); > assertEquals ( [ 0, 0, 0, 0 ], this.getBorderCache( widget ) ); >- widget._applyBorder( new org.eclipse.rwt.Border( [ 4, 0, 3, 0 ], "rounded", "black", 0 ) ); >+ widget.setBorder( new org.eclipse.rwt.Border( [ 4, 0, 3, 0 ], "rounded", "black", 0 ) ); > testUtil.flush(); > assertEquals ( [ 4, 0, 3, 0 ], this.getFakePadding( widget ) ); > assertEquals ( [ 4, 0, 3, 0 ], this.getBorderCache( widget ) ); > widget.setBackgroundGradient( this.gradient ); > widget.setBorder( null ); > testUtil.flush(); >+ // NOTE: since the layouting for targetNode is queued in the first flush, a second is needed >+ testUtil.flush(); > assertEquals ( [ 0, 0, 0, 0 ], this.getBorderCache( widget ) ); > assertEquals ( [ 0, 0, 0, 0 ], this.getFakePadding( widget ) ); > widget.destroy(); >@@ -720,6 +722,7 @@ > testUtil.flush(); > assertTrue( this.widgetContainsCanvas( widget ) ); > widget.setBorder( null ); >+ testUtil.flush(); > assertFalse( this.widgetContainsCanvas( widget ) ); > widget.setWidth( 400 ); > testUtil.flush(); >@@ -754,6 +757,8 @@ > var result = new org.eclipse.swt.widgets.Shell(); > result.addToDocument(); > result.setBackgroundColor( null ); >+ result.setBackgroundGradient( null ); >+ result.setBorder( null ); > result.setShadow( null ); > result.open(); > qx.ui.core.Widget.flushGlobalQueues(); >@@ -773,9 +778,7 @@ > }, > > usesGfxBorder : function( widget ) { >- return widget._gfxBorderEnabled >- && this.widgetContainsCanvas( widget ) >- && widget._gfxData.backgroundShape == widget._gfxData.pathElement; >+ return widget._gfxBorderEnabled && this.widgetContainsCanvas( widget ); > }, > > usesGfxBackground : function( widget ) {
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 344598
:
194619
|
194627
|
194713
| 194716