patch.ben.fkSY.tgz
Description: Binary data
Change change.XXXXXXXXX.HsDQbQRS.txt by [EMAIL PROTECTED] /Users/ben/ src/svnchanges/ on 2006-09-18 12:16:42 PDT
Summary: Add support for external stylesheet files. Refactored CSSHandler, put guts of style sheet compilation into StyleSheetCompiler.
New Features: stylesheet tag can reference external file, multiple stylesheet tags allowed
Bugs Fixed: LPP-2638 <stylesheet> tag should have src= attribute Technical Reviewer: wolff (in person), ptw (pending) QA Reviewer: mgregor (pending) Doc Reviewer: frisco (pending) Documentation: The stylesheet tag can either link to an external file, or specify thestylesheet inline. See test/style/stylesheetelement-test.lzx for examples
of each usage. Release Notes: Details:Previously, CSSHandler was a singleton. This only worked really correctly when there was just one stylesheet. We now want to support multiple stylesheet tags and external stylesheets; to meet this requirement, I refactored CSSHandler into a temporary utility object to parse CSS.
Most of the work of emitting script to build runtime css objects has been moved into StyleSheetCompiler.java. Now the stylesheet element works more like other elements; when the compiler hits a stylesheet element, it parses it and immediately writes script for it. This makes the implementation more flexible; it supports mulitple external and inline stylesheets, while preserving lexical order.
Extraneous support for compile-time CSS was removed from CSSHandler.java; there had been lots of leftover code in it from the which has not been used since we moved away from CSS-as-preprocessor.
I removed the cssfile attribute from canvas, and updated all the tests to work with this change.
This work was undertaken specifically to support diamond developer requests.
Tests:http://localhost:8080/trunk-csscompiler/test/style/compiler/ stylesheetelement-test.lzx?debug=true http://localhost:8080/trunk-csscompiler/test/style/compiler/external- only.lzx?debug=true http://localhost:8080/trunk-csscompiler/test/style/constraints/ constraint-test.lzx?debug=true http://localhost:8080/trunk-csscompiler/test/style/specificity/ applicability.lzx?debug=true http://localhost:8080/trunk-csscompiler/test/style/errors/ badcanvasattr.lzx (expected compiler warning) http://localhost:8080/trunk-csscompiler/test/style/errors/ cssfilenotfound.lzx (expected compiler error)
Files: M test/style/elementselector/main.lzx M test/style/idselector/main.lzx M test/style/descendantselector/descendantselector-test.lzx A test/style/compiler/external1.css A test/style/compiler/external2.css M test/style/compiler/stylesheetelement-test.lzx A test/style/compiler/external-only.lzx M test/style/errors/cssfilenotfound.lzx M WEB-INF/lps/server/src/org/openlaszlo/css/CSSHandler.javaM WEB-INF/lps/server/src/org/openlaszlo/compiler/ CanvasCompiler.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/ CompilationEnvironment.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.javaM WEB-INF/lps/server/src/org/openlaszlo/compiler/ StyleSheetCompiler.java
_______________________________________________ Laszlo-dev mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
