/[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.196 by wakaba, Sat Oct 4 07:58:58 2008 UTC revision 1.197 by wakaba, Sat Oct 4 08:29:19 2008 UTC
# Line 7064  sub _tree_construction_main ($) { Line 7064  sub _tree_construction_main ($) {
7064          }          }
7065    
7066          ## 5. (a) has a |p| element in scope          ## 5. (a) has a |p| element in scope
         ## ISSUE: Is this step really necessary?  
7067          INSCOPE: for (reverse @{$self->{open_elements}}) {          INSCOPE: for (reverse @{$self->{open_elements}}) {
7068            if ($_->[1] & P_EL) {            if ($_->[1] & P_EL) {
7069              !!!cp ('t353');              !!!cp ('t353');
# Line 7144  sub _tree_construction_main ($) { Line 7143  sub _tree_construction_main ($) {
7143          }          }
7144    
7145          ## 5. (a) has a |p| element in scope          ## 5. (a) has a |p| element in scope
         ## ISSUE: Is this step really necessary?  
7146          INSCOPE: for (reverse @{$self->{open_elements}}) {          INSCOPE: for (reverse @{$self->{open_elements}}) {
7147            if ($_->[1] & P_EL) {            if ($_->[1] & P_EL) {
7148              !!!cp ('t353.1');              !!!cp ('t353.1');
# Line 7616  sub _tree_construction_main ($) { Line 7614  sub _tree_construction_main ($) {
7614    
7615                  applet => 1, button => 1, marquee => 1, object => 1,                  applet => 1, button => 1, marquee => 1, object => 1,
7616                 }->{$token->{tag_name}}) {                 }->{$token->{tag_name}}) {
7617            ## NOTE: Code for <li> start tags includes "as if </li>" code.
7618            ## Code for <dt> or <dd> start tags includes "as if </dt> or
7619            ## </dd>" code.
7620    
7621          ## has an element in scope          ## has an element in scope
7622          my $i;          my $i;
7623          INSCOPE: for (reverse 0..$#{$self->{open_elements}}) {          INSCOPE: for (reverse 0..$#{$self->{open_elements}}) {
# Line 7774  sub _tree_construction_main ($) { Line 7776  sub _tree_construction_main ($) {
7776          ## NOTE: As normal, except </p> implies <p> and ...          ## NOTE: As normal, except </p> implies <p> and ...
7777    
7778          ## has an element in scope          ## has an element in scope
7779            my $non_optional;
7780          my $i;          my $i;
7781          INSCOPE: for (reverse 0..$#{$self->{open_elements}}) {          INSCOPE: for (reverse 0..$#{$self->{open_elements}}) {
7782            my $node = $self->{open_elements}->[$_];            my $node = $self->{open_elements}->[$_];
# Line 7784  sub _tree_construction_main ($) { Line 7787  sub _tree_construction_main ($) {
7787            } elsif ($node->[1] & SCOPING_EL) {            } elsif ($node->[1] & SCOPING_EL) {
7788              !!!cp ('t411.1');              !!!cp ('t411.1');
7789              last INSCOPE;              last INSCOPE;
7790              } elsif ($node->[1] & END_TAG_OPTIONAL_EL) {
7791                ## NOTE: |END_TAG_OPTIONAL_EL| includes "p"
7792                !!!cp ('t411.2');
7793                #
7794              } else {
7795                !!!cp ('t411.3');
7796                $non_optional ||= $node;
7797                #
7798            }            }
7799          } # INSCOPE          } # INSCOPE
7800    
7801          if (defined $i) {          if (defined $i) {
7802            if ($self->{open_elements}->[-1]->[0]->manakai_local_name            ## 1. Generate implied end tags
7803                    ne $token->{tag_name}) {            #
7804    
7805              ## 2. If current node != "p", parse error
7806              if ($non_optional) {
7807              !!!cp ('t412.1');              !!!cp ('t412.1');
7808              !!!parse-error (type => 'not closed',              !!!parse-error (type => 'not closed',
7809                              text => $self->{open_elements}->[-1]->[0]                              text => $non_optional->[0]->manakai_local_name,
                                 ->manakai_local_name,  
7810                              token => $token);                              token => $token);
7811            } else {            } else {
7812              !!!cp ('t414.1');              !!!cp ('t414.1');
7813            }            }
7814    
7815              ## 3. Pop
7816            splice @{$self->{open_elements}}, $i;            splice @{$self->{open_elements}}, $i;
7817          } else {          } else {
7818            !!!cp ('t413.1');            !!!cp ('t413.1');

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24