/[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.7 by wakaba, Wed May 30 12:24:50 2007 UTC revision 1.8 by wakaba, Sat Jun 23 02:26:51 2007 UTC
# Line 280  my $entity_char = { Line 280  my $entity_char = {
280    zwnj => "\x{200C}",    zwnj => "\x{200C}",
281  }; # $entity_char  }; # $entity_char
282    
283    ## TODO: Ensure that this table match to <http://html5.org/tools/web-apps-tracker?from=868&to=869>.
284  ## <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-December/thread.html#8562>  ## <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-December/thread.html#8562>
285  my $c1_entity_char = {  my $c1_entity_char = {
286       128, 8364,       128, 8364,
# Line 374  sub parse_string ($$$;$) { Line 375  sub parse_string ($$$;$) {
375      } elsif ($self->{next_input_character} > 0x10FFFF) {      } elsif ($self->{next_input_character} > 0x10FFFF) {
376        $self->{next_input_character} = 0xFFFD; # REPLACEMENT CHARACTER # MUST        $self->{next_input_character} = 0xFFFD; # REPLACEMENT CHARACTER # MUST
377      } elsif ($self->{next_input_character} == 0x0000) { # NULL      } elsif ($self->{next_input_character} == 0x0000) { # NULL
378          !!!parse-error (type => 'NULL');
379    ## TODO: test
380        $self->{next_input_character} = 0xFFFD; # REPLACEMENT CHARACTER # MUST        $self->{next_input_character} = 0xFFFD; # REPLACEMENT CHARACTER # MUST
381      }      }
382    };    };
# Line 444  sub _initialize_tokenizer ($) { Line 447  sub _initialize_tokenizer ($) {
447  ## has completed loading.  If one has, then it MUST be executed  ## has completed loading.  If one has, then it MUST be executed
448  ## and removed from the list.  ## and removed from the list.
449    
450    ## ISSUE: <http://html5.org/tools/web-apps-tracker?from=874&to=876>
451    
452  sub _get_next_token ($) {  sub _get_next_token ($) {
453    my $self = shift;    my $self = shift;
454    if (@{$self->{token}}) {    if (@{$self->{token}}) {
# Line 1538  sub _tokenize_attempt_to_consume_an_enti Line 1543  sub _tokenize_attempt_to_consume_an_enti
1543            $num = 0xFFFD; # REPLACEMENT CHARACTER            $num = 0xFFFD; # REPLACEMENT CHARACTER
1544            ## ISSUE: Why this is not an error?            ## ISSUE: Why this is not an error?
1545          } elsif (0x80 <= $num and $num <= 0x9F) {          } elsif (0x80 <= $num and $num <= 0x9F) {
1546            ## NOTE: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-December/thread.html#8562>            !!!parse-error (type => sprintf 'c1 entity:U+%04X', $num);
           ## ISSUE: Not in the spec yet; parse error?  
1547            $num = $c1_entity_char->{$num};            $num = $c1_entity_char->{$num};
1548          }          }
1549    
# Line 1569  sub _tokenize_attempt_to_consume_an_enti Line 1573  sub _tokenize_attempt_to_consume_an_enti
1573          $code = 0xFFFD; # REPLACEMENT CHARACTER          $code = 0xFFFD; # REPLACEMENT CHARACTER
1574          ## ISSUE: Why this is not an error?          ## ISSUE: Why this is not an error?
1575        } elsif (0x80 <= $code and $code <= 0x9F) {        } elsif (0x80 <= $code and $code <= 0x9F) {
1576          ## NOTE: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-December/thread.html#8562>          !!!parse-error (type => sprintf 'c1 entity:U+%04X', $code);
         ## ISSUE: Not in the spec yet; parse error?  
1577          $code = $c1_entity_char->{$code};          $code = $c1_entity_char->{$code};
1578        }        }
1579                
# Line 2363  sub _tree_construction_main ($) { Line 2366  sub _tree_construction_main ($) {
2366          LI: {          LI: {
2367            ## Step 2            ## Step 2
2368            if ($node->[1] eq 'li') {            if ($node->[1] eq 'li') {
2369                if ($i != -1) {
2370                  !!!parse-error (type => 'end tag missing:'.
2371                                  $self->{open_elements}->[-1]->[1]);
2372                  ## TODO: test
2373                }
2374              splice @{$self->{open_elements}}, $i;              splice @{$self->{open_elements}}, $i;
2375              last LI;              last LI;
2376            }            }
# Line 2406  sub _tree_construction_main ($) { Line 2414  sub _tree_construction_main ($) {
2414          LI: {          LI: {
2415            ## Step 2            ## Step 2
2416            if ($node->[1] eq 'dt' or $node->[1] eq 'dd') {            if ($node->[1] eq 'dt' or $node->[1] eq 'dd') {
2417                if ($i != -1) {
2418                  !!!parse-error (type => 'end tag missing:'.
2419                                  $self->{open_elements}->[-1]->[1]);
2420                  ## TODO: test
2421                }
2422              splice @{$self->{open_elements}}, $i;              splice @{$self->{open_elements}}, $i;
2423              last LI;              last LI;
2424            }            }
# Line 2691  sub _tree_construction_main ($) { Line 2704  sub _tree_construction_main ($) {
2704                    
2705          if ($token->{tag_name} eq 'textarea') {          if ($token->{tag_name} eq 'textarea') {
2706            ## TODO: $self->{form_element} if defined            ## TODO: $self->{form_element} if defined
2707              ## TODO: ignore first LF <http://html5.org/tools/web-apps-tracker?from=866&to=867>
2708            $self->{content_model_flag} = 'RCDATA';            $self->{content_model_flag} = 'RCDATA';
2709          } else {          } else {
2710            $self->{content_model_flag} = 'CDATA';            $self->{content_model_flag} = 'CDATA';
# Line 2714  sub _tree_construction_main ($) { Line 2728  sub _tree_construction_main ($) {
2728              $token->{tag_name} eq $tag_name) {              $token->{tag_name} eq $tag_name) {
2729            ## Ignore the token            ## Ignore the token
2730          } else {          } else {
2731            if ($token->{tag_name} eq 'textarea') {            if ($token->{tag_name} eq 'textarea') { ## TODO: This is incorrect maybe
2732    ## TODO: <http://html5.org/tools/web-apps-tracker?from=866&to=867>
2733              !!!parse-error (type => 'in CDATA:#'.$token->{type});              !!!parse-error (type => 'in CDATA:#'.$token->{type});
2734            } else {            } else {
2735              !!!parse-error (type => 'in RCDATA:#'.$token->{type});              !!!parse-error (type => 'in RCDATA:#'.$token->{type});
# Line 2875  sub _tree_construction_main ($) { Line 2890  sub _tree_construction_main ($) {
2890                  strong => 1, tt => 1, u => 1,                  strong => 1, tt => 1, u => 1,
2891                 }->{$token->{tag_name}}) {                 }->{$token->{tag_name}}) {
2892          $formatting_end_tag->($token->{tag_name});          $formatting_end_tag->($token->{tag_name});
2893    ## TODO: <http://html5.org/tools/web-apps-tracker?from=883&to=884>
2894          return;          return;
2895        } elsif ({        } elsif ({
2896                  caption => 1, col => 1, colgroup => 1, frame => 1,                  caption => 1, col => 1, colgroup => 1, frame => 1,

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24