I'm still thinking about that. Also, I want to improve the layout of master sprites waste less space.
I think I'll wait until after 4.7 to check this in... Henry Minsky wrote: > approved! > > Did you come up with any idea about how you want to enable/disable this > feature? > > On Thu, Nov 19, 2009 at 7:34 PM, Max Carlson <[email protected] > <mailto:[email protected]>> wrote: > > Change 20091118-maxcarlson-s by maxcarl...@bank on 2009-11-18 > 10:55:10 PST > in /Users/maxcarlson/openlaszlo/trunk-clean > for http://svn.openlaszlo.org/openlaszlo/trunk > > Summary: UPDATED: Improve CSS sprites > > Bugs Fixed: LPP-8622 - DHTML: Combine all css sprites into a single > large image > > Technical Reviewer: hminsky > QA Reviewer: ptw > > Details: Updated to fix issue Henry pointed out when compiling an > empty canvas. Added warning when master sprite can't be loaded. > > LzSprite.js - When quirks.use_css_master_sprite is on, store a path > to the master sprite and preload a copy of it. setResource() looks > for a spriteoffset, and where available uses it as the y offset in > the master sprite. Set the CSS y offset in __setBGImage() and > __setFrame(). > > ImageMontageMaker - Refactor to build horizontal or vertical image > strips. Allow spacing between images to be compacted. > > DHTMLWriter - Track all resources added to the app, then build a > single master CSS sprite image. > > Tests: Now, only stretched resources need to be loaded at runtime. > This cuts the number of HTTP requests in half in many cases, e.g. > webtop went from ~144 to ~72 requests with an empty cache. Image > retrieval time is also improved, and the DOM is simpler with fewer > img objects. > > Files: > M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js > M > WEB-INF/lps/server/src/org/openlaszlo/media/ImageMontageMaker.java > M WEB-INF/lps/server/src/org/openlaszlo/utils/FileUtils.java > M WEB-INF/lps/server/src/org/openlaszlo/compiler/DHTMLWriter.java > > Changeset: > http://svn.openlaszlo.org/openlaszlo/patches/20091118-maxcarlson-s.tar > > > > > -- > Henry Minsky > Software Architect > [email protected] <mailto:[email protected]> > > -- Regards, Max Carlson OpenLaszlo.org _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
