Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362112 - [Forms] Form's header causes its children not to render properly
Summary: [Forms] Form's header causes its children not to render properly
Status: CLOSED INVALID
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-26 13:36 EDT by Setya Nugdjaja CLA
Modified: 2011-10-27 10:45 EDT (History)
1 user (show)

See Also:


Attachments
Form Without Text in RAP (4.48 KB, image/png)
2011-10-26 13:40 EDT, Setya Nugdjaja CLA
no flags Details
Form With Text in RAP (5.21 KB, image/png)
2011-10-26 13:41 EDT, Setya Nugdjaja CLA
no flags Details
Form With Text in RCP (5.62 KB, image/png)
2011-10-26 13:42 EDT, Setya Nugdjaja CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Setya Nugdjaja CLA 2011-10-26 13:36:18 EDT
Build Identifier: 

SashForm's children are not rendered properly if SashForm's parent is a Form with text.

Reproducible: Always

Steps to Reproduce:
Reproduce with the following steps:

1. Apply the following snippets:

@Override
public void createPartControl(Composite parent)
{

Form form = toolkit.createForm(parent);
//form.setText("Form");
	  
form.getBody().setLayout(GridLayoutFactory.fillDefaults().extendedMargins(8, 8, 8, 5).create());
form.getBody().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
	
ScrolledPageBook pageBook = toolkit.createPageBook(form.getBody(), SWT.NONE);
pageBook.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
	  
Composite page = pageBook.createPage("firstPage");	  
page.setLayout(GridLayoutFactory.fillDefaults().create());
	  
SashForm sash = new SashForm(page, SWT.HORIZONTAL);
sash.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
sash.setSashWidth(5);
	
Composite client = toolkit.createComposite(sash, SWT.BORDER);
client.setLayout(GridLayoutFactory.fillDefaults().spacing(SWT.DEFAULT, 10).extendedMargins(3, 0, 0, 10).create());
client.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
	  
SashForm sash2 = new SashForm(sash, SWT.VERTICAL);
sash2.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
sash2.setSashWidth(5);
	  
client = toolkit.createComposite(sash2, SWT.BORDER);
client.setLayout(GridLayoutFactory.fillDefaults().spacing(1, 1).extendedMargins(3, 0, 0, 10).create());
client.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
	  
client = toolkit.createComposite(sash2, SWT.BORDER);
client.setLayout(GridLayoutFactory.fillDefaults().spacing(1, 1).extendedMargins(3, 3, 0, 10).create());
client.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
sash2.setWeights(new int[] {40, 50});
	  
sash.setWeights(new int[]{30, 70});
	  
pageBook.showPage("firstPage");

}

2. Now unremove code to set Form's text.
3. See that the SashForm's children is missing their bottom border.

The above snippets works in RCP.
Comment 1 Setya Nugdjaja CLA 2011-10-26 13:40:46 EDT
Created attachment 206007 [details]
Form Without Text in RAP
Comment 2 Setya Nugdjaja CLA 2011-10-26 13:41:44 EDT
Created attachment 206008 [details]
Form With Text in RAP
Comment 3 Setya Nugdjaja CLA 2011-10-26 13:42:16 EDT
Created attachment 206009 [details]
Form With Text in RCP
Comment 4 Setya Nugdjaja CLA 2011-10-26 13:47:21 EDT
I mean 'unremark' on step 2
Comment 5 Ivan Furnadjiev CLA 2011-10-27 01:03:20 EDT
Setya, which version of RAP are you using? Could this be related to text size determination? Does browser reload fixes the problem?
Comment 6 Setya Nugdjaja CLA 2011-10-27 06:14:58 EDT
Ivan,

I'm using 1.4.0-M5.

The bug is actually reproducible in Eclipse internal browses, but when I tried in Chrome & Firefox recentlyjj it worked OK.

But you're right, in the internal browser reloading it fixes the problem.

But I have another snippet in which the bug is reproducible under Chrome & Firefox which I'll submit as soon as it ready.

Regards,

Setya
Comment 7 Ivan Furnadjiev CLA 2011-10-27 06:40:21 EDT
Setya, in 1.4 release and later in current development 1.5 stream (CVS HEAD) we did a lot of text size determination improvements. Could you try your code with 1.4 SR1 or latest nightly build?
Comment 8 Setya Nugdjaja CLA 2011-10-27 08:04:31 EDT
Ivan,

At least I can confirm that the bug is still there in 1.4.0, but so far I haven't switched to 1.4.0 yet since some of my unit tests throws error:

Javascript error occurred:

TypeError: Result of expression 'this._rows' [null] is not an object.

But this is another case I guess.

I'll report here with the test result in another version.

Regards,

Setya
Comment 9 Setya Nugdjaja CLA 2011-10-27 08:59:27 EDT
Ivan,

The bug still exists in 1.4.1

We have problem using 1.5.0 target since there're some incompatibilities.

Regards,

Setya
Comment 10 Ivan Furnadjiev CLA 2011-10-27 09:47:44 EDT
As I can't reproduce it with current CVS HEAD and both internal and external (Firefox, IE) browsers, I'll be waiting for your snippet.
Comment 11 Setya Nugdjaja CLA 2011-10-27 10:12:03 EDT
Ivan,

Do I need to open separate bug ? as I don't think it's caused by Form's header text, but by TableViewer having too many rows.

As for the above snippet, did you try it with Eclipse's internal browser?

Regards,

Setya
Comment 12 Ivan Furnadjiev CLA 2011-10-27 10:23:36 EDT
(In reply to comment #11)
> Do I need to open separate bug ? as I don't think it's caused by Form's header
> text, but by TableViewer having too many rows.

If you think that this bug related to Form header is invalid, please close it as such. For a different issue with TableViewer please open a separate bug.

> As for the above snippet, did you try it with Eclipse's internal browser?
Yes... I'm. But please note that I tested it with current CVS HEAD after the bug 270397 (standard rendering in IE) has been fixed. Maybe this is related.
Comment 13 Setya Nugdjaja CLA 2011-10-27 10:45:01 EDT
> If you think that this bug related to Form header is invalid, please close it
> as such. For a different issue with TableViewer please open a separate bug.

OK

> > As for the above snippet, did you try it with Eclipse's internal browser?
> Yes... I'm. But please note that I tested it with current CVS HEAD after the
> bug 270397 (standard rendering in IE) has been fixed. Maybe this is related.

I tried under 1.4.1 on Linux.

Regards,

Setya