/[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.221 by wakaba, Sun Jul 26 10:56:23 2009 UTC revision 1.222 by wakaba, Sun Aug 16 03:41:52 2009 UTC
# Line 3850  sub _tree_construction_main ($) { Line 3850  sub _tree_construction_main ($) {
3850                     tbody => 1, tfoot => 1, thead => 1,                     tbody => 1, tfoot => 1, thead => 1,
3851                     tr => 1, td => 1, th => 1,                     tr => 1, td => 1, th => 1,
3852                    }->{$token->{tag_name}})) {                    }->{$token->{tag_name}})) {
3853            ## TODO: The type below is not good - <select> is replaced by </select>  
3854            !!!parse-error (type => 'not closed', text => 'select',            ## 1. Parse error.
3855                            token => $token);            if ($token->{tag_name} eq 'select') {
3856            ## NOTE: As if the token were </select> (<select> case) or                !!!parse-error (type => 'select in select', ## XXX: documentation
3857            ## as if there were </select> (otherwise).                                token => $token);
3858            ## have an element in table scope            } else {
3859                !!!parse-error (type => 'not closed', text => 'select',
3860                                token => $token);
3861              }
3862    
3863              ## 2./<select>-1. Unless "have an element in table scope" (select):
3864            my $i;            my $i;
3865            INSCOPE: for (reverse 0..$#{$self->{open_elements}}) {            INSCOPE: for (reverse 0..$#{$self->{open_elements}}) {
3866              my $node = $self->{open_elements}->[$_];              my $node = $self->{open_elements}->[$_];
# Line 3870  sub _tree_construction_main ($) { Line 3875  sub _tree_construction_main ($) {
3875            } # INSCOPE            } # INSCOPE
3876            unless (defined $i) {            unless (defined $i) {
3877              !!!cp ('t280');              !!!cp ('t280');
3878              !!!parse-error (type => 'unmatched end tag',              if ($token->{tag_name} eq 'select') {
3879                              text => 'select', token => $token);                ## NOTE: This error would be raised when
3880              ## Ignore the token                ## |select.innerHTML = '<select>'| is executed; in this
3881                  ## case two errors, "select in select" and "unmatched
3882                  ## end tags" are reported to the user, the latter might
3883                  ## be confusing but this is what the spec requires.
3884                  !!!parse-error (type => 'unmatched end tag',
3885                                  text => 'select',
3886                                  token => $token);
3887                }
3888                ## Ignore the token.
3889              !!!nack ('t280.1');              !!!nack ('t280.1');
3890              !!!next-token;              !!!next-token;
3891              next B;              next B;
3892            }            }
3893    
3894              ## 3. Otherwise, as if there were <select>:
3895                                
3896            !!!cp ('t281');            !!!cp ('t281');
3897            splice @{$self->{open_elements}}, $i;            splice @{$self->{open_elements}}, $i;

Legend:
Removed from v.1.221  
changed lines
  Added in v.1.222

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24