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

Bug 345096

Summary: [Shell] JavaScript error in IE when using custom variant
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: 1.4 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Ivan Furnadjiev CLA 2011-05-09 03:54:19 EDT
Use the attached style sheet to reproduce:
Shell-Titlebar.myWorkbenchShellTitle {
	color: white;
	background-color: rgb(27, 19, 114);
	background-image: none;
	padding: 2px 5px 2px;
	margin: 0px;
	height: 50px;
	font: bold 30px verdana, arial, sans-serif;
	border: none;
	border-radius: 0px;
}
Attach the "myWorkbenchShellTitle" custom variant to the Shell. Run the app in IE9 (runs fine in other browsers and without custom variant). The following JavaScript error appears:
Could not evaluate javascript response:

Error: [object Error]

  Script: var req = org.eclipse.swt.Request.getInstance();req.setRequestCounter( "0" );qx.theme.manager.Meta.getInstance().setTheme( org.eclipse.swt.theme.Custom_90669af0 );org.eclipse.swt.Request.getInstance().setTimeoutPage( "The server session timed out.Please click here to restart the session." );var wm = org.eclipse.swt.WidgetManager.getInstance();var w = new org.eclipse.swt.widgets.Shell();wm.add( w, "w2", true );w.addToDocument();w.addState( "rwt_TITLE" );w.setShowMinimize( true );w.setAllowMinimize( true );w.setShowMaximize( true );w.setAllowMaximize( true );w.setShowClose( true );w.setAllowClose( true );w.setResizable( true, true, true, true );w.initialize();w.addState( "variant_myWorkbenchShellTitle" );w.setCaption( "Application Tester" );w.open();w.setActive( true );w.setMinWidth( 80 );w.setMinHeight( 26 );w.setSpace( 10, 800, 10, 600 );w.setTabIndex( -1 );w.setVisibility( true );var w = new org.eclipse.rwt.widgets.Button( "push" );wm.add( w, "w3", true );wm.setParent( w, "w2" );w.addState( "rwt_PUSH" );w.setSpace( 5, 75, 55, 20 );w.setZIndex( 300 );w.setTabIndex( 1 );w.setText( "Open Dialog" );w.setHasSelectionListener( true );var w = wm.findWidgetById( "w2" );w.setActiveControl( wm.findWidgetById( "w3" ) );org.eclipse.swt.WidgetManager.getInstance().focus( "w3" );org.eclipse.swt.FontSizeCalculation.probe( [ [ -785380485, "!#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy", [ "Verdana", "Lucida Sans", "Arial", "Helvetica", "sans-serif" ], 12, false, false ] ] );org.eclipse.swt.FontSizeCalculation.measureStrings( [ [ -1583284997, "Open Dialog", [ "Verdana", "Lucida Sans", "Arial", "Helvetica", "sans-serif" ], 12, false, false, -1 ] ] );
  message: Unable to get value of the property 'backgroundShape': object is null or undefined
  description: Unable to get value of the property 'backgroundShape': object is null or undefined
  number: -2146823281
  name: TypeError
  Debug: on
  Request: rwt_initialize=true&startup=rap.bugs.application.tester.application-tester-application&w4t_width=1550&w4t_height=625&w1.bounds.width=1550&w1.bounds.height=625&w1.dpi.x=96&w1.dpi.y=96&w1.colorDepth=32&w1.cursorLocation.x=0&w1.cursorLocation.y=0&uiRoot=w1
  Phase: 2
Comment 1 Ivan Furnadjiev CLA 2011-05-09 05:15:33 EDT
Fixed in CVS HEAD by checking for existance of _gfxData object in GraphicsMixin.