Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 286926 - [Theming] Gradient breaks canvas layout in IE
Summary: [Theming] Gradient breaks canvas layout in IE
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.3 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-18 07:56 EDT by Tim Buschtoens CLA
Modified: 2009-08-19 05:20 EDT (History)
1 user (show)

See Also:


Attachments
possible fix (1.93 KB, patch)
2009-08-18 11:39 EDT, Tim Buschtoens CLA
no flags Details | Diff
Real fix (789 bytes, patch)
2009-08-19 05:04 EDT, Tim Buschtoens CLA
ivan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Buschtoens CLA 2009-08-18 07:56:33 EDT
Reproduce in Controls Demo: "Composite"-Tab -> Button "Background Gradient". 
There might be a connection to the changes in Application.js done for the MultiCellWidget (Attachment 143158 [details]).
Comment 1 Tim Buschtoens CLA 2009-08-18 11:39:48 EDT
Created attachment 144841 [details]
possible fix

Okay, first of all: I don't think this bug has anything to do with the MultiCellWidget. (As i suggested above). I have no idea why this seems to work in IE sometimes, and then not. The problem is that in IE the inner div of the widget (for complex borders) has no size by default. Why Qooxdoo does that, i have no idea. If i set its width and height to 100% (as done in this patch), the gradient works fine. 

HOWEVER: When this patch is applied, the combo box in the "composite"-tab of the controls demo is layouted incorrectly (again, IE only). So we should not commit the changes until that problem is fixed aswell.
Comment 2 Tim Buschtoens CLA 2009-08-18 11:47:04 EDT
Okay, it seems the patch breaks the layout of almost all widgets that have a complex border, so it wasn't just a bug in the combo box. Back to square one!
Comment 3 Tim Buschtoens CLA 2009-08-18 11:57:18 EDT
Now there are two ways we could go: Either find out why setting the inner div to 100% goes so horribly wrong, or find another solution altogether. For exaple we could temporarily enable overflow on the inner div or always use the layout method that is used when gfx-borders are activated, but both are more workaround than actual solutions to the problem.
Comment 4 Tim Buschtoens CLA 2009-08-19 05:04:32 EDT
Created attachment 144926 [details]
Real fix

This should solve the problem for good.

I finally found out why it works sometimes, and sometimes not. Other than most browsers, in IE the inner divs dimension are actually set with the layout flush. As gradients are mostly set BEFORE the divs are created, the layout flush has not yet happend when prepareEnhancedBorder is called. In this cases it worked. If the gradient is after the widget has been layouted, the inner div is not layouted until the dimensions are changed.

The patch simply adds width and height to the queue after prepareEnhancedBorder is called.
Comment 5 Ivan Furnadjiev CLA 2009-08-19 05:19:37 EDT
Commited patch in CVS HEAD.