Changeset 62928 in webkit


Ignore:
Timestamp:
Jul 9, 2010 3:24:27 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-07-09 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Skip leading newlines in <textarea>
https://bugs.webkit.org/show_bug.cgi?id=41947

We would have caught this earlier with the ASSERT.

  • html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::nextToken):

2010-07-09 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Skip leading newlines in <textarea>
https://bugs.webkit.org/show_bug.cgi?id=41947

  • html5lib/runner-expected-html5.txt:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r62926 r62928  
     12010-07-09  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Skip leading newlines in <textarea>
     6        https://bugs.webkit.org/show_bug.cgi?id=41947
     7
     8        * html5lib/runner-expected-html5.txt:
     9
    1102010-07-09  Eric Seidel  <eric@webkit.org>
    211
  • trunk/LayoutTests/html5lib/runner-expected-html5.txt

    r62926 r62928  
    211211resources/tests2.dat: PASS
    212212
    213 resources/tests3.dat:
    214 16
    215 17
    216 18
    217 
    218 Test 16 of 23 in resources/tests3.dat failed. Input:
    219 <!DOCTYPE html><textarea>
    220 </textarea>
    221 Got:
    222 | <!DOCTYPE html>
    223 | <html>
    224 |   <head>
    225 |   <body>
    226 |     <textarea>
    227 |       "
    228 "
    229 Expected:
    230 | <!DOCTYPE html>
    231 | <html>
    232 |   <head>
    233 |   <body>
    234 |     <textarea>
    235 
    236 Test 17 of 23 in resources/tests3.dat failed. Input:
    237 <!DOCTYPE html><textarea>
    238 foo</textarea>
    239 Got:
    240 | <!DOCTYPE html>
    241 | <html>
    242 |   <head>
    243 |   <body>
    244 |     <textarea>
    245 |       "
    246 foo"
    247 Expected:
    248 | <!DOCTYPE html>
    249 | <html>
    250 |   <head>
    251 |   <body>
    252 |     <textarea>
    253 |       "foo"
    254 
    255 Test 18 of 23 in resources/tests3.dat failed. Input:
    256 <!DOCTYPE html><textarea>
    257 
    258 foo</textarea>
    259 Got:
    260 | <!DOCTYPE html>
    261 | <html>
    262 |   <head>
    263 |   <body>
    264 |     <textarea>
    265 |       "
    266 
    267 foo"
    268 Expected:
    269 | <!DOCTYPE html>
    270 | <html>
    271 |   <head>
    272 |   <body>
    273 |     <textarea>
    274 |       "
    275 foo"
     213resources/tests3.dat: PASS
     214
    276215resources/tests4.dat:
    2772163
  • trunk/WebCore/ChangeLog

    r62927 r62928  
     12010-07-09  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Skip leading newlines in <textarea>
     6        https://bugs.webkit.org/show_bug.cgi?id=41947
     7
     8        We would have caught this earlier with the ASSERT.
     9
     10        * html/HTMLTokenizer.cpp:
     11        (WebCore::HTMLTokenizer::nextToken):
     12
    1132010-07-08  Pavel Feldman  <pfeldman@chromium.org>
    214
  • trunk/WebCore/html/HTMLTokenizer.cpp

    r62926 r62928  
    275275    if (m_skipLeadingNewLineForListing) {
    276276        m_skipLeadingNewLineForListing = false;
    277         if (m_state == DataState && cc == '\n')
    278             ADVANCE_TO(DataState);
     277        if (cc == '\n') {
     278            if (m_state == DataState)
     279                ADVANCE_TO(DataState);
     280            if (m_state == RCDATAState)
     281                ADVANCE_TO(RCDATAState);
     282            ASSERT_NOT_REACHED();
     283        }
    279284    }
    280285
Note: See TracChangeset for help on using the changeset viewer.