--- test/html-webhacc/cc.cgi 2008/02/10 04:08:04 1.35 +++ test/html-webhacc/cc.cgi 2008/02/24 02:17:51 1.37 @@ -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; @@ -213,6 +215,7 @@ } elsif (defined $cssom) { print_structure_dump_cssom_section ($input, $cssom); ## TODO: CSSOM validation + add_error ('structure', {level => 'u'} => $result); } elsif (defined $manifest) { print_structure_dump_manifest_section ($input, $manifest); print_structure_error_manifest_section ($input, $manifest, $result); @@ -387,12 +390,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 @@ -404,7 +403,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 @@ -416,9 +415,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 @@ -493,7 +492,22 @@ capitalize uppercase lowercase none /; $p->{prop_value}->{'white-space'}->{$_} = 1 for qw/ - normal pre nowrap pre-line pre-wrap + 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 @@ -503,7 +517,7 @@ /; $p->{prop_value}->{'table-layout'}->{auto} = 1; $p->{prop_value}->{'table-layout'}->{fixed} = 1; - $p->{prop_value}->{'border-collapse'}->{collapase} = 1; + $p->{prop_value}->{'border-collapse'}->{collapse} = 1; $p->{prop_value}->{'border-collapse'}->{separate} = 1; $p->{prop_value}->{'empty-cells'}->{show} = 1; $p->{prop_value}->{'empty-cells'}->{hide} = 1; @@ -551,6 +565,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}); @@ -575,6 +590,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}) { @@ -801,9 +823,10 @@ unless $input->{nested}; print STDOUT qq[
<$euri>
<$euri>
<$euri>
<$euri2>
<$euri>
<$euri2>
<$euri>
<$euri>