Ticket #1441 (assigned defect)
[patch] [cla] ContentPane: fixPathsInCssText issues in MSIE
| Reported by: | robert.coup@… | Owned by: | sfoster |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.3 |
| Component: | Dojox | Version: | 0.3 |
| Severity: | normal | Keywords: | |
| Cc: | robert.coup@… |
Description
MSIE 5.5/6 use the filter/AlphaImageLoader hack to work around their lack of alpha-PNG support. There are three issues with MSIE & dojo.html.fixPathsInCssText - this addresses two of them, and leaves the third as a question:
- When the compressor is run over dojo.style.fixPathsInCssText the function iefixPathsInCssText() should use the rejexTrim, url, etc variables. Problem is that the compressor has renamed them in the outer function to something like _a12 and so you get missing object errors. While this may be a compressor 'feature', it's fixed in the attached patch.
- Valid syntax for the AlphaImageLoader? filter includes:
filter: AlphaImageLoader(src='123.png'); filter: AlphaImageLoader(src='123.png', sizingMethod='crop'); filter: AlphaImageLoader(sizingMethod='crop', src='123.png');
The third case above is not handled by the rejexIe expression. This is fixed in the attached patch.
- AlphaImageLoader? paths are relative to the document/page location, while normal css url() paths are relative to the stylesheet location. Yay for MSIE. Anyway if one uses intern-strings then the paths get broken, because fixPathsInCssText adds the path from the src=' ' to the absolute uri to the stylesheet. The contents of the path src tags aren't related to the stylesheet uri though! Example:
http://host/ hostdir/ page/ <-- Page is served from here when not using compressed JS js/ dojo/ <-- djConfig.baseScriptUri points to here dojo.js widgets/ my.css images/ img1.png images/ img2.png my.css: ... background-image: url('images/img1.png'); filter:AlphaImageLoader(src='widgets/images/img1.png'); ... background-image: url('../images/img2.png'); filter:AlphaImageLoader(src='images/img2.png'); ... Paths get fixed to: background-image: url('http://host/hostdir/page/widgets/images/img1.png'); filter:AlphaImageLoader(src='http://host/hostdir/page/widgets/widgets/images/img1.png'); background-image: url('http://host/hostdir/page/images/img2.png'); filter:AlphaImageLoader(src='http://host/hostdir/page/widgets/images/img2.png');I'm not sure what to do in this case, apart from access the widget's templateCssPath: dojo.uri.dojoUri('../../widgets/my.css'); parameter and using that to figure out which bits to ignore and which not to. Any brighter ideas?
Attachments
Change History
Note: See
TracTickets for help on using
tickets.