--- test/html-webhacc/cc.cgi 2008/02/10 07:35:23 1.36
+++ test/html-webhacc/cc.cgi 2008/03/11 14:10:11 1.38
@@ -132,6 +132,8 @@
} elsif ($err->{level} eq 'u' or $err->{level} eq 'unsupported') {
$result->{$layer}->{unsupported}++;
$result->{unsupported} = 1;
+ } elsif ($err->{level} eq 'i') {
+ #
} else {
$result->{$layer}->{must}++;
$result->{$layer}->{score_max} -= 2;
@@ -296,12 +298,8 @@
my $onerror = sub {
my (%opt) = @_;
my ($type, $cls, $msg) = get_text ($opt{type}, $opt{level});
- if ($opt{column} > 0) {
- print STDOUT qq[
Line $opt{line} column $opt{column}\n];
- } else {
- $opt{line} = $opt{line} - 1 || 1;
- print STDOUT qq[Line $opt{line}\n];
- }
+ print STDOUT qq[], get_error_label ($input, \%opt),
+ qq[];
$type =~ tr/ /-/;
$type =~ s/\|/%7C/g;
$msg .= qq[ [Description]];
@@ -388,12 +386,8 @@
require Whatpm::CSS::Parser;
my $p = Whatpm::CSS::Parser->new;
-# if ($parse_mode eq 'q') {
-# $p->{unitless_px} = 1;
-# $p->{hashless_color} = 1;
-# }
-
$p->{prop}->{$_} = 1 for qw/
+ alignment-baseline
background background-attachment background-color background-image
background-position background-position-x background-position-y
background-repeat border border-bottom border-bottom-color
@@ -405,7 +399,7 @@
border-style border-top border-top-color border-top-style border-top-width
border-width bottom
caption-side clear clip color content counter-increment counter-reset
- cursor direction display empty-cells float font
+ cursor direction display dominant-baseline empty-cells float font
font-family font-size font-size-adjust font-stretch
font-style font-variant font-weight height left
letter-spacing line-height
@@ -417,9 +411,9 @@
padding padding-bottom padding-left padding-right padding-top
page page-break-after page-break-before page-break-inside
position quotes right size table-layout
- text-align text-decoration text-indent text-transform
+ text-align text-anchor text-decoration text-indent text-transform
top unicode-bidi vertical-align visibility white-space width widows
- word-spacing z-index
+ word-spacing writing-mode z-index
/;
$p->{prop_value}->{display}->{$_} = 1 for qw/
block clip inline inline-block inline-table list-item none
@@ -496,6 +490,21 @@
$p->{prop_value}->{'white-space'}->{$_} = 1 for qw/
normal pre nowrap pre-line pre-wrap -moz-pre-wrap
/;
+ $p->{prop_value}->{'writing-mode'}->{$_} = 1 for qw/
+ lr rl tb lr-tb rl-tb tb-rl
+ /;
+ $p->{prop_value}->{'text-anchor'}->{$_} = 1 for qw/
+ start middle end
+ /;
+ $p->{prop_value}->{'dominant-baseline'}->{$_} = 1 for qw/
+ auto use-script no-change reset-size ideographic alphabetic
+ hanging mathematical central middle text-after-edge text-before-edge
+ /;
+ $p->{prop_value}->{'alignment-baseline'}->{$_} = 1 for qw/
+ auto baseline before-edge text-before-edge middle central
+ after-edge text-after-edge ideographic alphabetic hanging
+ mathematical
+ /;
$p->{prop_value}->{'text-decoration'}->{$_} = 1 for qw/
none blink underline overline line-through
/;
@@ -552,6 +561,7 @@
push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{nested};
my $p = get_css_parser ();
+ $p->init;
$p->{onerror} = sub {
my (%opt) = @_;
my ($type, $cls, $msg) = get_text ($opt{type}, $opt{level});
@@ -576,6 +586,13 @@
$p->{href} = $input->{uri};
$p->{base_uri} = $input->{base_uri};
+# if ($parse_mode eq 'q') {
+# $p->{unitless_px} = 1;
+# $p->{hashless_color} = 1;
+# }
+
+## TODO: Make $input->{s} a ref.
+
my $s = \$input->{s};
my $charset;
unless ($input->{is_char_string}) {
@@ -802,9 +819,10 @@
unless $input->{nested};
print STDOUT qq[- Explicit entries
];
+ my $i = 0;
for my $uri (@{$manifest->[0]}) {
my $euri = htescape ($uri);
- print STDOUT qq[<$euri> ];
+ print STDOUT qq[<$euri> ];
}
print STDOUT qq[- Fallback entries
-
@@ -813,14 +831,14 @@
for my $uri (sort {$a cmp $b} keys %{$manifest->[1]}) {
my $euri = htescape ($uri);
my $euri2 = htescape ($manifest->[1]->{$uri});
- print STDOUT qq[
<$euri> |
- <$euri2> | ];
+ print STDOUT qq[
<$euri> |
+ <$euri2> | ];
}
print STDOUT qq[- Online whitelist
];
for my $uri (@{$manifest->[2]}) {
my $euri = htescape ($uri);
- print STDOUT qq[<$euri> ];
+ print STDOUT qq[<$euri> ];
}
print STDOUT qq[];
@@ -1115,8 +1133,12 @@
}
if (defined $err->{index}) {
- $r .= ' ' if length $r;
- $r .= 'Index ' . (0+$err->{index});
+ if (length $r) {
+ $r .= ', Index ' . (0+$err->{index});
+ } else {
+ $r .= "Index "
+ . (0+$err->{index}) . '';
+ }
}
if (defined $err->{value}) {
@@ -1144,6 +1166,8 @@
} elsif ($err->{level} eq 'u' or $err->{level} eq 'unsupported') {
$r = qq[Not
supported: ];
+ } elsif ($err->{level} eq 'i') {
+ $r = qq[Information: ];
} else {
my $elevel = htescape ($err->{level});
$r = qq[$elevel:
@@ -1429,4 +1453,4 @@
=cut
-## $Date: 2008/02/10 07:35:23 $
+## $Date: 2008/03/11 14:10:11 $