/[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.203 by wakaba, Sat Oct 4 17:16:02 2008 UTC revision 1.204 by wakaba, Sun Oct 5 05:59:35 2008 UTC
# Line 3466  sub _construct_tree ($) { Line 3466  sub _construct_tree ($) {
3466    ## When an interactive UA render the $self->{document} available    ## When an interactive UA render the $self->{document} available
3467    ## to the user, or when it begin accepting user input, are    ## to the user, or when it begin accepting user input, are
3468    ## not defined.    ## not defined.
   
   ## Append a character: collect it and all subsequent consecutive  
   ## characters and insert one Text node whose data is concatenation  
   ## of all those characters. # MUST  
3469        
3470    !!!next-token;    !!!next-token;
3471    
# Line 4358  sub _tree_construction_main ($) { Line 4354  sub _tree_construction_main ($) {
4354      }      }
4355    }; # $insert_to_foster    }; # $insert_to_foster
4356    
4357    ## NOTE: When a character is inserted, if the last node that was    ## NOTE: Insert a character (MUST): When a character is inserted, if
4358    ## inserted by the parser is a Text node and the character has to be    ## the last node that was inserted by the parser is a Text node and
4359    ## inserted after that node, then the character is appended to the    ## the character has to be inserted after that node, then the
4360    ## Text node.  However, if any other node is inserted by the parser,    ## character is appended to the Text node.  However, if any other
4361    ## then a new Text node is created and the character is appended as    ## node is inserted by the parser, then a new Text node is created
4362    ## that Text node.  If I'm not wrong, there are only two cases where    ## and the character is appended as that Text node.  If I'm not
4363    ## this occurs.  One is the case where an element node is inserted    ## wrong, for a parser with scripting disabled, there are only two
4364    ## to the |head| element.  This is covered by using the    ## cases where this occurs.  One is the case where an element node
4365      ## is inserted to the |head| element.  This is covered by using the
4366    ## |$self->{head_element_inserted}| flag.  Another is the case where    ## |$self->{head_element_inserted}| flag.  Another is the case where
4367    ## an element or comment is inserted into the |table| subtree while    ## an element or comment is inserted into the |table| subtree while
4368    ## foster parenting happens.  This is covered by using the [2] flag    ## foster parenting happens.  This is covered by using the [2] flag
4369    ## of the |$open_tables| structure.  All other cases are handled    ## of the |$open_tables| structure.  All other cases are handled
4370    ## simply by calling |manakai_append_text| method.    ## simply by calling |manakai_append_text| method.
4371    
4372      ## TODO: |<body><script>document.write("a<br>");
4373      ## document.body.removeChild (document.body.lastChild);
4374      ## document.write ("b")</script>|
4375    
4376    B: while (1) {    B: while (1) {
4377      if ($token->{type} == DOCTYPE_TOKEN) {      if ($token->{type} == DOCTYPE_TOKEN) {
4378        !!!cp ('t73');        !!!cp ('t73');

Legend:
Removed from v.1.203  
changed lines
  Added in v.1.204

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24