- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Tue, 17 Apr 2007 11:42:13 -0400
- To: public-css-testsuite@w3.org
- Message-ID: <4624EAD5.6070404@inkedblade.net>
I've just checked in an 'xhtml1print' format in addition to the 'html4' and 'xhtml1' formats we already have. This format is the same as 'xhtml1' except - it adds an additional <style> element to set @page headers so it's easier to tell which printout belongs to which test - it automatically converts all PNG images, which few printers natively support, to JPEG, which they are required to support by the XHTML Print Profile For the build scripts, this creates an additional dependency on ImageMagick and the Perl-based 'rename' command. This new format was a request from the print community via Melinda Grant (HP). I've attached a patch with the changes, in case anyone wants to review them. Some tests were had to be changed slightly because they used transparent images. (JPEG doesn't support transparency.) ~fantasai
? dist Index: Makefile =================================================================== RCS file: /sources/public/CSS/CSS2.1-test-suite/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- Makefile 12 Oct 2006 00:06:13 -0000 1.7 +++ Makefile 17 Apr 2007 15:26:20 -0000 @@ -20,11 +20,20 @@ # rm -rf dist/ mkdir dist + mkdir dist/html4 + mkdir dist/xhtml1 + mkdir dist/xhtml1print # # generate the tests in all supported formats, along with support files # perl generate.pl tests/*.xht - cp -Lrv tests/support dist/support + cp -Lrv tests/support dist/html4/support + cp -Lrv tests/support dist/xhtml1/support + cp -Lrv tests/support dist/xhtml1print/support + find dist/xhtml1print/support -iname '*.png' | xargs -I FILENAME convert FILENAME -background white -flatten -quality 90 FILENAME.jpg + find dist/xhtml1print/support -iname '*.png.jpg' | xargs rename s/png.jpg/jpg/ + find dist/xhtml1print/support -iname '*.png' | xargs rm -rf + find dist/xhtml1print -iname '*.xht' -o -iname '*.css' | xargs perl -pi -e 's/\.png/\.jpg/g' cp README.dist dist/README # # empty staging area again @@ -33,4 +42,4 @@ # # report number of tests now included (XHTML1.1 variants only) # - ls dist/*.xht | wc -l \ No newline at end of file + ls dist/xhtml1/*.xht | wc -l Index: generate.pl =================================================================== RCS file: /sources/public/CSS/CSS2.1-test-suite/generate.pl,v retrieving revision 1.5 diff -u -r1.5 generate.pl --- generate.pl 12 Oct 2006 00:37:36 -0000 1.5 +++ generate.pl 17 Apr 2007 15:26:20 -0000 @@ -27,13 +27,15 @@ use parser; use format::xhtml1; use format::html4; +use format::xhtml1print; foreach my $file (@ARGV) { $file =~ m/^tests\/(.+)\.xht$/os; my $root = $1; my $tree = parser::parsefile($file); - save("dist/$root.xht", format::xhtml1::output($tree)); - save("dist/$root.htm", format::html4::output($tree)); + save("dist/xhtml1/$root.xht", format::xhtml1::output($tree)); + save("dist/html4/$root.htm", format::html4::output($tree)); + save("dist/xhtml1print/$root.xht", format::xhtml1print::output($tree,$root)); # XXX remember something about the tests } Index: raw-tests/css1tests/css1test414h.xml =================================================================== RCS file: /sources/public/CSS/CSS2.1-test-suite/raw-tests/css1tests/css1test414h.xml,v retrieving revision 1.1 diff -u -r1.1 css1test414h.xml --- raw-tests/css1tests/css1test414h.xml 2 Dec 2004 16:06:44 -0000 1.1 +++ raw-tests/css1tests/css1test414h.xml 17 Apr 2007 15:26:20 -0000 @@ -13,7 +13,7 @@ <body> <p>The word "fail" should not appear below, just a green block.</p> <div class="test"> - <img src="support/1x1-transparent.png" alt="FAIL: You need image support for this test." class="left"/> + <img src="support/1x1-white.png" alt="FAIL: You need image support for this test." class="left"/> <img src="support/1x1-green.png" alt="FAIL: You need image support for this test." class="right"/> <span> FAIL </span> </div> Index: raw-tests/css1tests/css1test5502a.xml =================================================================== RCS file: /sources/public/CSS/CSS2.1-test-suite/raw-tests/css1tests/css1test5502a.xml,v retrieving revision 1.1 diff -u -r1.1 css1test5502a.xml --- raw-tests/css1tests/css1test5502a.xml 2 Dec 2004 16:06:44 -0000 1.1 +++ raw-tests/css1tests/css1test5502a.xml 17 Apr 2007 15:26:20 -0000 @@ -6,11 +6,11 @@ body { color: navy; } div { font: 10px/1 Ahem; width: 200px; color: orange; } img { vertical-align: bottom; } - .zero {margin-right: 0; text-align: right; background-color: brown;} - .one {margin-right: 0.5in; text-align: right; background-color: brown;} - .two {margin-right: 48px; text-align: right; background-color: brown;} - .three {margin-right: 4.8em; text-align: right; background-color: brown;} - .four {margin-right: 24%; text-align: right; background-color: brown;} + .zero {margin-right: 0; text-align: right; background-color: maroon;} + .one {margin-right: 0.5in; text-align: right; background-color: maroon;} + .two {margin-right: 48px; text-align: right; background-color: maroon;} + .three {margin-right: 4.8em; text-align: right; background-color: maroon;} + .four {margin-right: 24%; text-align: right; background-color: maroon;} ]]></style> </head> <body> Index: raw-tests/css1tests/css1test5504a.xml =================================================================== RCS file: /sources/public/CSS/CSS2.1-test-suite/raw-tests/css1tests/css1test5504a.xml,v retrieving revision 1.1 diff -u -r1.1 css1test5504a.xml --- raw-tests/css1tests/css1test5504a.xml 2 Dec 2004 16:06:44 -0000 1.1 +++ raw-tests/css1tests/css1test5504a.xml 17 Apr 2007 15:26:20 -0000 @@ -6,11 +6,11 @@ body { color: navy; } div { font: 10px/1 Ahem; width: 200px; color: orange; } img { vertical-align: bottom; } - .zero {margin-left: 0; text-align: left; background-color: brown;} - .one {margin-left: 0.5in; text-align: left; background-color: brown;} - .two {margin-left: 48px; text-align: left; background-color: brown;} - .three {margin-left: 4.8em; text-align: left; background-color: brown;} - .four {margin-left: 24%; text-align: left; background-color: brown;} + .zero {margin-left: 0; text-align: left; background-color: maroon;} + .one {margin-left: 0.5in; text-align: left; background-color: maroon;} + .two {margin-left: 48px; text-align: left; background-color: maroon;} + .three {margin-left: 4.8em; text-align: left; background-color: maroon;} + .four {margin-left: 24%; text-align: left; background-color: maroon;} ]]></style> </head> <body> Index: raw-tests/css1tests/css1test5505a.xml =================================================================== RCS file: /sources/public/CSS/CSS2.1-test-suite/raw-tests/css1tests/css1test5505a.xml,v retrieving revision 1.1 diff -u -r1.1 css1test5505a.xml --- raw-tests/css1tests/css1test5505a.xml 2 Dec 2004 16:06:44 -0000 1.1 +++ raw-tests/css1tests/css1test5505a.xml 17 Apr 2007 15:26:20 -0000 @@ -6,11 +6,11 @@ body { color: navy; } div { font: 10px/1 Ahem; width: 200px; color: orange; } img { vertical-align: bottom; } - .zero {margin: 0; background-color: brown;} - .one {margin: 0.25in; background-color: brown;} - .two {margin: 24px; background-color: brown;} - .three {margin: 2.4em; background-color: brown;} - .four {margin: 12%; background-color: brown;} + .zero {margin: 0; background-color: maroon;} + .one {margin: 0.25in; background-color: maroon;} + .two {margin: 24px; background-color: maroon;} + .three {margin: 2.4em; background-color: maroon;} + .four {margin: 12%; background-color: maroon;} ]]></style> </head> <body> @@ -18,7 +18,7 @@ <div> <p class="zero"> <img src="support/swatch-white.png" alt="" height="10" width="24" - />x<img src="support/1x1-transparent.png" alt="" height="10" width="142" + />x<img src="support/1x1-maroon.png" alt="" height="10" width="142" /><img src="support/swatch-white.png" alt="" height="10" width="24"/> </p> <p class="one"> @@ -35,7 +35,7 @@ </p> <p class="zero"> <img src="support/swatch-white.png" alt="" height="10" width="24" - />x<img src="support/1x1-transparent.png" alt="" height="10" width="142" + />x<img src="support/1x1-maroon.png" alt="" height="10" width="142" /><img src="support/swatch-white.png" alt="" height="10" width="24"/> </p> </div> Index: raw-tests/css1tests/css1test5509d.xml =================================================================== RCS file: /sources/public/CSS/CSS2.1-test-suite/raw-tests/css1tests/css1test5509d.xml,v retrieving revision 1.1 diff -u -r1.1 css1test5509d.xml --- raw-tests/css1tests/css1test5509d.xml 2 Dec 2004 16:06:44 -0000 1.1 +++ raw-tests/css1tests/css1test5509d.xml 17 Apr 2007 15:26:20 -0000 @@ -12,6 +12,6 @@ <body> <p>The next two bars should be identical:</p> <div class="test"> TEST </div> - <div class="control"> <img src="support/1x1-transparent.png" alt=""/>TEST </div> + <div class="control"> <img src="support/1x1-navy.png" alt=""/>TEST </div> </body> </html>
Attachments
- application/x-perl attachment: xhtml1print.pm
Received on Tuesday, 17 April 2007 15:42:39 UTC