/[pub]/test/html-webhacc/WebHACC/Language/CSS.pm
Suika

Diff of /test/html-webhacc/WebHACC/Language/CSS.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by wakaba, Mon Jul 21 08:39:12 2008 UTC revision 1.9 by wakaba, Sat Aug 16 08:37:12 2008 UTC
# Line 13  sub generate_syntax_error_section ($) { Line 13  sub generate_syntax_error_section ($) {
13        
14    my $out = $self->output;    my $out = $self->output;
15        
16      $self->result->layer_uncertain ('charset');
17    
18    $out->start_section (role => 'parse-errors');    $out->start_section (role => 'parse-errors');
19    $out->start_error_list (role => 'parse-errors');    $out->start_error_list (role => 'parse-errors');
20      $self->result->layer_applicable ('syntax');
21    
22    my $input = $self->input;    my $input = $self->input;
23    my $result = $self->result;    my $result = $self->result;
# Line 28  sub generate_syntax_error_section ($) { Line 31  sub generate_syntax_error_section ($) {
31      }      }
32      $result->add_error (%opt, layer => 'syntax');      $result->add_error (%opt, layer => 'syntax');
33    };    };
34    $p->{href} = $input->{uri};    $p->{href} = $input->url;
35    $p->{base_uri} = $input->{base_uri};    $p->{base_uri} = $input->{base_uri};
36    
37  #  if ($parse_mode eq 'q') {  #  if ($parse_mode eq 'q') {
# Line 41  sub generate_syntax_error_section ($) { Line 44  sub generate_syntax_error_section ($) {
44    my $s = \$input->{s};    my $s = \$input->{s};
45    my $charset;    my $charset;
46    unless ($input->{is_char_string}) {    unless ($input->{is_char_string}) {
47        $self->result->layer_uncertain ('encode');
48      require Encode;      require Encode;
49      if (defined $input->{charset}) {## TODO: IANA->Perl      if (defined $input->{charset}) {## TODO: IANA->Perl
50        $charset = $input->{charset};        $charset = $input->{charset};
# Line 67  sub generate_structure_dump_section ($) Line 71  sub generate_structure_dump_section ($)
71    
72    my $out = $self->output;    my $out = $self->output;
73    
74    $out->start_section (role => 'reserialized');    $out->start_section (role => 'reformatted');
75    
76    $out->start_code_block;    $out->start_code_block;
77    $out->text ($self->{structure}->css_text);    $out->text ($self->{structure}->css_text);
# Line 77  sub generate_structure_dump_section ($) Line 81  sub generate_structure_dump_section ($)
81  } # generate_structure_dump_section  } # generate_structure_dump_section
82    
83  sub generate_structure_error_section ($) {  sub generate_structure_error_section ($) {
84    my $self = shift;  ## NOTE: The content of this method is commented out, since a CSSOM
85    ## tree would contain no error that affect conformance, AFAICT.
86    my $out = $self->output;  ## The plan is that we could someday implement "semantic" checking for CSSOM
87    ## trees, like "this color and this background color is too resemble such that
88    $out->start_section (role => 'structure-errors');  ## a user might not be able to read the text".  Such errors do not affect
89    $out->start_error_list (role => 'structure-errors');  ## conformance, in any way.
90    #  my $self = shift;
91    $self->result->add_error (level => 'u',  #
92                              layer => 'structure',  #  my $out = $self->output;
93                              input => $self->input,  #
94                              type => 'CSSOM validation not supported');  #  $out->start_section (role => 'structure-errors');
95    #  $out->start_error_list (role => 'structure-errors');
96    $out->end_error_list (role => 'structure-errors');  #  $self->result->layer_applicable ('structure');
97    $out->end_section;  #
98    #  $self->result->add_error (level => 'u',
99    #                            layer => 'structure',
100    #                            input => $self->input,
101    #                            type => 'CSSOM validation not supported');
102    #
103    #  $out->end_error_list (role => 'structure-errors');
104    #  $out->end_section;
105  } # generate_structure_error_section  } # generate_structure_error_section
106    
107  sub get_css_parser () {  sub get_css_parser () {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.9

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24