Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359665 - Background transparent don't work in IE
Summary: Background transparent don't work in IE
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows 7
: P1 major (vote)
Target Milestone: 1.5 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-02 12:54 EDT by Iancu Ciprian CLA
Modified: 2012-01-24 05:02 EST (History)
2 users (show)

See Also:


Attachments
Image that describe the background problem (49.21 KB, image/png)
2011-10-02 12:54 EDT, Iancu Ciprian CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iancu Ciprian CLA 2011-10-02 12:54:02 EDT
Build Identifier: Indigo

I'm using RAP 1.5 M2 and when i try to open the business demo in IE i see that there are transparency issues on the status bar and on the perspective selector.
I'm using IE7/IE8/IE9 both in quirks mode. In normal mode i get some javascript errors and layout breaks in other areas, like menu, etc.

In quirks mode all works fine except transparency.

This was working in RAP 1.4.

From what i've found on internet is that IE browser has some issues with background-color:transparent

Reproducible: Always
Comment 1 Iancu Ciprian CLA 2011-10-02 12:54:59 EDT
Created attachment 204428 [details]
Image that describe the background problem
Comment 2 Ivan Furnadjiev CLA 2011-10-02 13:01:47 EDT
More over I got a JavaScript error in the IE console:
SCRIPT5022: Could not apply border to child [object org.eclipse.swt.widgets.Composite] VML._copyData: source or target missing!
Comment 3 Tim Buschtoens CLA 2011-10-04 12:06:33 EDT
The black background issue is fixed in CVS HEAD, simply adjusting VML.js to recognize color "transparent".

The js-error i could not yet fix, even though i tried the entire day. What i know for now is that the problem is that "_isInDom" field is true while it should not, but no idea why. As far as i can tell its never set to true in the wrong situation, and its always set back to false if it needs to be. There was a bug that did not set it back properly, but i fixed that and the error is still there. One more scary thing i noticed is that in IE sometimes element.parentElement is null while element.parentNode is not (its a document fragment). I'm not sure what it means, but i fixed the only case of parentNode beeing used in Widget.js as a precaution. I also slightly improved errorhandling, so that the application crashes properly now, not working slightly.
Comment 4 Tim Buschtoens CLA 2011-10-04 12:08:33 EDT
here's  pice of code that checks whether or not _isInDom is set correctly:

if( this._isInDom && !(this instanceof qx.ui.core.ClientDocument) && ( !this._element.parentElement || this._element.parentElement.nodeName == "#document-fragment" || !this.getParent() || !this.getParent().isInDom() ) ) {
  throw "wrong _isInDom value";
}
Comment 5 Tim Buschtoens CLA 2011-10-05 07:57:25 EDT
I FINALLY managed to test and fix the javascript error. Here is how it happend:
- One widget (in this case propably the CTabFolder) is already visible, without any enhanced borders.
- One of the children of the widget (in this case propably CTabItem) is either added or made visible in the same call as the widget gets an enhanced border.
- In CSS3 based browser this is no problem at all, since enhanced borders are not neeed. 
- In SVG/VML based browser _prepareEnhancedBrowser is called. Since it removed and then readds the widgets children, its calling _afterInsertDom on all displayable children. The assumption is that all "displayable" children are already in DOM, which is not the case since layout queue comes before display queue. So a false "insertDom" event is fired.
- For SVG nothing much happens on "insertDom", but for VML (IE) _copyData is called to re-render some properties of vml-shapes. This produces an error, since the shape can not be fully accessed while not in DOM.

Fixed in CVS HEAD by checking if the widgets node is actually connected to its parent before calling _afterInsertDom.
Comment 6 Tim Buschtoens CLA 2011-10-05 08:05:37 EDT
I'm not sure what triggered the error (the actual bug has probably been there for at least a year), but this is a possible candidate for the 1.4.2 release. (The second fix, not the "transparent" as a color fix. That one is definitely protocol only.) On the other hand, if no one ever got that error before it may not be possible to appear in pre-protocol RAP.
Comment 7 Ivan Furnadjiev CLA 2012-01-24 04:12:39 EST
Tim, you mark this bug as "sr142?". Do you have a patch for the maintenance branch?
Comment 8 Tim Buschtoens CLA 2012-01-24 05:02:44 EST
Since the js-error was never reported to happen 1.4, we should not risk changing something so low-level for a SR.