The previous version of the code allowed the incoming value of `c` to be `null`. As written now, that will blow up if it goes down the non-rgba-capable path.
It seems to me the real correct solution is to define lz.colors.transparent as a constant [LzColorUtils.internalfromcoloralpha(0,0)], and use that everywhere instead of `-1` or `null`. But if we're not going to take the time to do that, you either need to prove that this code can never be called with `null` or handle `null`. Also, the Debug message I wrote is pretty terse, you have a better way of phrasing the need to check capabilities elsewhere don't you? Maybe there is even a subroutine that prints a standard capabilities message? On 2010-11-30, at 04:16, Max Carlson wrote: > Change maxcarlson-20101129-JGB by [email protected] on 2010-11-29 > 16:59:35 PST > in /Users/maxcarlson/openlaszlo/trunk-clean > for http://svn.openlaszlo.org/openlaszlo/trunk > > Summary: UPDATED: Explicitly handle transparent color values from the > compiler, correctly strip alpha from colors when rgba isn't supported > > Bugs Fixed: LPP-9547 - Got IE browser error "Invalid property value " at > LFCdhtml.js > > Technical Reviewer: ptw > QA Reviewer: yfang > > Details: Updated to address Tucker's comments: > > Not approved. > > You should use LzColorUtils.colorfrominternal and alphafrominternal rather > than hard-coding the tests. > > Done! > > Otherwise, The summary sez it all... > > Tests: See LPP-9547 > > Files: > M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js > > Changeset: > http://svn.openlaszlo.org/openlaszlo/patches/maxcarlson-20101129-JGB.tar
