[webkit-changes] cvs commit: WebCore/khtml/html htmltokenizer.cpp

Adele adele at opensource.apple.com
Tue Aug 9 14:45:47 PDT 2005


adele       05/08/09 14:45:46

  Modified:    .        Tag: Safari-2-0-branch ChangeLog
               khtml/html Tag: Safari-2-0-branch htmltokenizer.cpp
  Log:
          Merged fix from TOT to Safari-2-0-branch
  
      2005-06-14  David Hyatt  <hyatt at apple.com>
  
          The behavior of <pre> is broken so that the newline
          is not always properly being eaten after the open of the tag.  In addition we were eating the first newline
          after all other tags.  This patch stops eating newlines after other tags and refines the behavior for
          pre to catch all cases.
  
          Reviewed by sullivan
  
          Test cases added: fast/text/whitespace/030.html
  
          * khtml/html/htmltokenizer.cpp:
          (khtml::HTMLTokenizer::parseTag):
          (khtml::HTMLTokenizer::write):
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4104.2.103 +19 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4104.2.102
  retrieving revision 1.4104.2.103
  diff -u -r1.4104.2.102 -r1.4104.2.103
  --- ChangeLog	9 Aug 2005 18:46:12 -0000	1.4104.2.102
  +++ ChangeLog	9 Aug 2005 21:45:28 -0000	1.4104.2.103
  @@ -1,5 +1,24 @@
   2005-08-09  Adele Peterson  <adele at apple.com>
   
  +        Merged fix from TOT to Safari-2-0-branch
  +
  +    2005-06-14  David Hyatt  <hyatt at apple.com>
  +
  +        The behavior of <pre> is broken so that the newline
  +        is not always properly being eaten after the open of the tag.  In addition we were eating the first newline
  +        after all other tags.  This patch stops eating newlines after other tags and refines the behavior for 
  +        pre to catch all cases.
  +        
  +        Reviewed by sullivan
  +
  +        Test cases added: fast/text/whitespace/030.html
  +
  +        * khtml/html/htmltokenizer.cpp:
  +        (khtml::HTMLTokenizer::parseTag):
  +        (khtml::HTMLTokenizer::write):
  +
  +2005-08-09  Adele Peterson  <adele at apple.com>
  +
           change by Justin to fix build error.
   
           * khtml/editing/htmlediting.cpp:
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.84.6.3  +3 -9      WebCore/khtml/html/htmltokenizer.cpp
  
  Index: htmltokenizer.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/htmltokenizer.cpp,v
  retrieving revision 1.84.6.2
  retrieving revision 1.84.6.3
  diff -u -r1.84.6.2 -r1.84.6.3
  --- htmltokenizer.cpp	5 Aug 2005 18:01:21 -0000	1.84.6.2
  +++ htmltokenizer.cpp	9 Aug 2005 21:45:45 -0000	1.84.6.3
  @@ -62,7 +62,6 @@
   using DOM::DOMString;
   using DOM::DOMStringImpl;
   using DOM::DocumentImpl;
  -using DOM::FORBIDDEN;
   using DOM::Node;
   using DOM::emptyAtom;
   using DOM::endTagRequirement;
  @@ -1384,6 +1383,7 @@
   
               switch( tagID ) {
               case ID_PRE:
  +                discard = LFDiscard; // Discard the first LF after we open a pre.
                   break;
               case ID_SCRIPT:
                   if (beginTag) {
  @@ -1436,11 +1436,7 @@
                   plaintext = beginTag;
                   break;
               }
  -            
  -            if (beginTag && endTagRequirement(tagID) == FORBIDDEN)
  -                // Don't discard LFs since this element has no end tag.
  -                discard = NoneDiscard;
  -                
  +
               return; // Finished parsing tag!
           }
           } // end switch
  @@ -1630,10 +1626,8 @@
   
               if ( pending ) {
                   // pre context always gets its spaces/linefeeds
  -                if (script || (!parser->selectMode() && (!parser->noSpaces() || dest > buffer ))) {
  +                if (script || (!parser->selectMode() && (!parser->noSpaces() || dest > buffer )))
                       addPending();
  -                    discard = AllDiscard; // So we discard the first LF after the open tag.
  -                }
                   // just forget it
                   else
                       pending = NonePending;
  
  
  



More information about the webkit-changes mailing list