/[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.238 by wakaba, Sun Sep 6 09:53:29 2009 UTC revision 1.239 by wakaba, Sun Sep 6 10:17:38 2009 UTC
# Line 4986  sub _tree_construction_main ($) { Line 4986  sub _tree_construction_main ($) {
4986          next B;          next B;
4987        }        }
4988      } elsif ($token->{type} == END_TAG_TOKEN) {      } elsif ($token->{type} == END_TAG_TOKEN) {
4989        if ($token->{tag_name} eq 'body') {        if ($token->{tag_name} eq 'body' or $token->{tag_name} eq 'html') {
4990    
4991          ## 1. If not "have an element in scope":          ## 1. If not "have an element in scope":
4992          ## "has a |body| element in scope"          ## "has a |body| element in scope"
# Line 5003  sub _tree_construction_main ($) { Line 5003  sub _tree_construction_main ($) {
5003              }              }
5004            }            }
5005    
5006            ## NOTE: |<marquee></body>|, |<svg><foreignobject></body>|            ## NOTE: |<marquee></body>|, |<svg><foreignobject></body>|,
5007              ## and fragment cases.
5008    
5009            !!!parse-error (type => 'unmatched end tag',            !!!parse-error (type => 'unmatched end tag',
5010                            text => $token->{tag_name}, token => $token);                            text => $token->{tag_name}, token => $token);
5011            ## NOTE: Ignore the token.            ## Ignore the token.  (</body> or </html>)
5012            !!!next-token;            !!!next-token;
5013            next B;            next B;
5014          } # INSCOPE          } # INSCOPE
# Line 5030  sub _tree_construction_main ($) { Line 5031  sub _tree_construction_main ($) {
5031    
5032          ## 3. Switch the insertion mode.          ## 3. Switch the insertion mode.
5033          $self->{insertion_mode} = AFTER_BODY_IM;          $self->{insertion_mode} = AFTER_BODY_IM;
5034          !!!next-token;          if ($token->{tag_name} eq 'body') {
         next B;  
       } elsif ($token->{tag_name} eq 'html') {  
         ## TODO: Update this code.  It seems that the code below is not  
         ## up-to-date, though it has same effect as speced.  
         if (@{$self->{open_elements}} > 1 and  
             $self->{open_elements}->[1]->[1] == BODY_EL) {  
           unless ($self->{open_elements}->[-1]->[1] == BODY_EL) {  
             !!!cp ('t406');  
             !!!parse-error (type => 'not closed',  
                             text => $self->{open_elements}->[1]->[0]  
                                 ->manakai_local_name,  
                             token => $token);  
           } else {  
             !!!cp ('t407');  
           }  
           $self->{insertion_mode} = AFTER_BODY_IM;  
           ## reprocess  
           next B;  
         } else {  
           !!!cp ('t408');  
           !!!parse-error (type => 'unmatched end tag',  
                           text => $token->{tag_name}, token => $token);  
           ## Ignore the token  
5035            !!!next-token;            !!!next-token;
5036            next B;          } else { # html
5037              ## Reprocess.
5038          }          }
5039            next B;
5040        } elsif ({        } elsif ({
5041                  ## NOTE: End tags for non-phrasing flow content elements                  ## NOTE: End tags for non-phrasing flow content elements
5042    

Legend:
Removed from v.1.238  
changed lines
  Added in v.1.239

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24