Comments:
1) Since we (apparently) know that setting style on a DOM div is expensive,
would it not be better to re-write your loop to say:
> // restore original display values from CSS cache
> for (var n = 0; n < l; n++) {
> var sprite = sprites[n];
> var display = sprite.__csscache.__LZdivdisplay;
> if (display) {
> sprite.__LZdiv.style.display = display;
> }
> }
so you don't unnecessarily write styles that don't need to be written?
2) Similarly, at the top of this method, you could consult the cache and only
modify the styles of parents that are not already being displayed.
Approved, but address the comments for bonus points. :)
On 2010-05-21, at 01:42, Max Carlson wrote:
> Change 20100520-maxcarlson-8 by maxcarl...@friendly on 2010-05-20 22:36:17 PDT
> in /Users/maxcarlson/openlaszlo/trunk-clean
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Prevent warnings in IE when selecting 'About OpenLaszlo...' in the
> context menu
>
> Bugs Fixed: LPP-9003 - DHTML: right click throws exception (IE8)
>
> Technical Reviewer: ptw
> QA Reviewer: hminsky
>
> Details: Ensure __processHiddenParents() sets to a valid string
>
> Tests: See LPP-9003
>
> Files:
> M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
>
> Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/20100520-maxcarlson-8.tar
>