/[suikacvs]/markup/html/whatpm/Whatpm/HTML.pm.src
Suika

Diff of /markup/html/whatpm/Whatpm/HTML.pm.src

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

revision 1.197 by wakaba, Sat Oct 4 08:29:19 2008 UTC revision 1.198 by wakaba, Sat Oct 4 08:58:02 2008 UTC
# Line 488  sub parse_byte_stream ($$$$;$$) { Line 488  sub parse_byte_stream ($$$$;$$) {
488      if (defined $charset_name) {      if (defined $charset_name) {
489        $charset = Message::Charset::Info->get_by_html_name ($charset_name);        $charset = Message::Charset::Info->get_by_html_name ($charset_name);
490    
       ## ISSUE: Unsupported encoding is not ignored according to the spec.  
491        require Whatpm::Charset::DecodeHandle;        require Whatpm::Charset::DecodeHandle;
492        $buffer = Whatpm::Charset::DecodeHandle::ByteBuffer->new        $buffer = Whatpm::Charset::DecodeHandle::ByteBuffer->new
493            ($byte_stream);            ($byte_stream);
# Line 2485  sub _get_next_token ($) { Line 2484  sub _get_next_token ($) {
2484          !!!cp (160);          !!!cp (160);
2485          $self->{ct}->{name} = chr $self->{nc};          $self->{ct}->{name} = chr $self->{nc};
2486          delete $self->{ct}->{quirks};          delete $self->{ct}->{quirks};
 ## ISSUE: "Set the token's name name to the" in the spec  
2487          $self->{state} = DOCTYPE_NAME_STATE;          $self->{state} = DOCTYPE_NAME_STATE;
2488          !!!next-input-character;          !!!next-input-character;
2489          redo A;          redo A;
# Line 3785  sub _tree_construction_root_element ($) Line 3783  sub _tree_construction_root_element ($)
3783      ## NOTE: Reprocess the token.      ## NOTE: Reprocess the token.
3784      !!!ack-later;      !!!ack-later;
3785      return; ## Go to the "before head" insertion mode.      return; ## Go to the "before head" insertion mode.
   
     ## ISSUE: There is an issue in the spec  
3786    } # B    } # B
3787    
3788    die "$0: _tree_construction_root_element: This should never be reached";    die "$0: _tree_construction_root_element: This should never be reached";
# Line 4715  sub _tree_construction_main ($) { Line 4711  sub _tree_construction_main ($) {
4711                  !!!cp ('t105');                  !!!cp ('t105');
4712                }                }
4713                !!!insert-element ($token->{tag_name}, $token->{attributes}, $token);                !!!insert-element ($token->{tag_name}, $token->{attributes}, $token);
4714                my $meta_el = pop @{$self->{open_elements}}; ## ISSUE: This step is missing in the spec.                my $meta_el = pop @{$self->{open_elements}};
4715    
4716                unless ($self->{confident}) {                unless ($self->{confident}) {
4717                  if ($token->{attributes}->{charset}) {                  if ($token->{attributes}->{charset}) {
# Line 5172  sub _tree_construction_main ($) { Line 5168  sub _tree_construction_main ($) {
5168        } else {        } else {
5169          die "$0: $token->{type}: Unknown token type";          die "$0: $token->{type}: Unknown token type";
5170        }        }
   
           ## ISSUE: An issue in the spec.  
5171      } elsif ($self->{insertion_mode} & BODY_IMS) {      } elsif ($self->{insertion_mode} & BODY_IMS) {
5172            if ($token->{type} == CHARACTER_TOKEN) {            if ($token->{type} == CHARACTER_TOKEN) {
5173              !!!cp ('t150');              !!!cp ('t150');
# Line 6801  sub _tree_construction_main ($) { Line 6795  sub _tree_construction_main ($) {
6795        } else {        } else {
6796          die "$0: $token->{type}: Unknown token type";          die "$0: $token->{type}: Unknown token type";
6797        }        }
   
       ## ISSUE: An issue in spec here  
6798      } else {      } else {
6799        die "$0: $self->{insertion_mode}: Unknown insertion mode";        die "$0: $self->{insertion_mode}: Unknown insertion mode";
6800      }      }
# Line 7067  sub _tree_construction_main ($) { Line 7059  sub _tree_construction_main ($) {
7059          INSCOPE: for (reverse @{$self->{open_elements}}) {          INSCOPE: for (reverse @{$self->{open_elements}}) {
7060            if ($_->[1] & P_EL) {            if ($_->[1] & P_EL) {
7061              !!!cp ('t353');              !!!cp ('t353');
7062    
7063                ## NOTE: |<p><li>|, for example.
7064    
7065              !!!back-token; # <x>              !!!back-token; # <x>
7066              $token = {type => END_TAG_TOKEN, tag_name => 'p',              $token = {type => END_TAG_TOKEN, tag_name => 'p',
7067                        line => $token->{line}, column => $token->{column}};                        line => $token->{line}, column => $token->{column}};
# Line 7472  sub _tree_construction_main ($) { Line 7467  sub _tree_construction_main ($) {
7467          !!!nack ('t401.1'); ## NOTE: |<col/>| or |<frame/>| here is an error.          !!!nack ('t401.1'); ## NOTE: |<col/>| or |<frame/>| here is an error.
7468          !!!next-token;          !!!next-token;
7469          next B;          next B;
7470                  } elsif ($token->{tag_name} eq 'param' or
7471          ## ISSUE: An issue on HTML5 new elements in the spec.                 $token->{tag_name} eq 'source') {
7472            !!!insert-element-t ($token->{tag_name}, $token->{attributes}, $token);
7473            pop @{$self->{open_elements}};
7474    
7475            !!!ack ('t398.5');
7476            !!!next-token;
7477            redo B;
7478        } else {        } else {
7479          if ($token->{tag_name} eq 'image') {          if ($token->{tag_name} eq 'image') {
7480            !!!cp ('t384');            !!!cp ('t384');
# Line 7509  sub _tree_construction_main ($) { Line 7510  sub _tree_construction_main ($) {
7510            !!!ack ('t388.2');            !!!ack ('t388.2');
7511          } elsif ({          } elsif ({
7512                    area => 1, basefont => 1, bgsound => 1, br => 1,                    area => 1, basefont => 1, bgsound => 1, br => 1,
7513                    embed => 1, img => 1, param => 1, spacer => 1, wbr => 1,                    embed => 1, img => 1, spacer => 1, wbr => 1,
                   #image => 1,  
7514                   }->{$token->{tag_name}}) {                   }->{$token->{tag_name}}) {
7515            !!!cp ('t388.1');            !!!cp ('t388.1');
7516            pop @{$self->{open_elements}};            pop @{$self->{open_elements}};
# Line 7578  sub _tree_construction_main ($) { Line 7578  sub _tree_construction_main ($) {
7578          ## up-to-date, though it has same effect as speced.          ## up-to-date, though it has same effect as speced.
7579          if (@{$self->{open_elements}} > 1 and          if (@{$self->{open_elements}} > 1 and
7580              $self->{open_elements}->[1]->[1] & BODY_EL) {              $self->{open_elements}->[1]->[1] & BODY_EL) {
           ## ISSUE: There is an issue in the spec.  
7581            unless ($self->{open_elements}->[-1]->[1] & BODY_EL) {            unless ($self->{open_elements}->[-1]->[1] & BODY_EL) {
7582              !!!cp ('t406');              !!!cp ('t406');
7583              !!!parse-error (type => 'not closed',              !!!parse-error (type => 'not closed',

Legend:
Removed from v.1.197  
changed lines
  Added in v.1.198

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24