Changeset 34787 in webkit


Ignore:
Timestamp:
Jun 24, 2008 9:14:08 PM (16 years ago)
Author:
abarth@webkit.org
Message:

WebCore:

2008-06-24 Adam Barth <abarth@webkit.org>

Reviewed by Darin Adler.

Fix <https://bugs.webkit.org/show_bug.cgi?id=19597>

Correctly parse <!-- </textarea> --> inside a <textarea>, matching
Internet Explorer, Firefox, Opera, and HTML 5.

Tests: fast/parser/comment-in-script-tricky.html

fast/parser/comment-in-style.html
fast/parser/comment-in-textarea.html
fast/parser/comment-in-title.html

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

LayoutTests:

2008-06-24 Adam Barth <abarth@webkit.org>

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=19597

Test that we correctly parse comments containing end tags in CDATA and
RCDATA contexts.

  • fast/parser/comment-in-script-tricky-expected.txt: Added.
  • fast/parser/comment-in-script-tricky.html: Added.
  • fast/parser/comment-in-style.html: Added.
  • fast/parser/comment-in-textarea.html: Added.
  • fast/parser/comment-in-title-expected.txt: Added.
  • fast/parser/comment-in-title.html: Added.
  • platform/mac/fast/parser/comment-in-style-expected.checksum: Added.
  • platform/mac/fast/parser/comment-in-style-expected.png: Added.
  • platform/mac/fast/parser/comment-in-style-expected.txt: Added.
  • platform/mac/fast/parser/comment-in-textarea-expected.checksum: Added.
  • platform/mac/fast/parser/comment-in-textarea-expected.png: Added.
  • platform/mac/fast/parser/comment-in-textarea-expected.txt: Added.
Location:
trunk
Files:
12 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r34786 r34787  
     12008-06-24  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=19597
     6
     7        Test that we correctly parse comments containing end tags in CDATA and
     8        RCDATA contexts.
     9
     10        * fast/parser/comment-in-script-tricky-expected.txt: Added.
     11        * fast/parser/comment-in-script-tricky.html: Added.
     12        * fast/parser/comment-in-style.html: Added.
     13        * fast/parser/comment-in-textarea.html: Added.
     14        * fast/parser/comment-in-title-expected.txt: Added.
     15        * fast/parser/comment-in-title.html: Added.
     16        * platform/mac/fast/parser/comment-in-style-expected.checksum: Added.
     17        * platform/mac/fast/parser/comment-in-style-expected.png: Added.
     18        * platform/mac/fast/parser/comment-in-style-expected.txt: Added.
     19        * platform/mac/fast/parser/comment-in-textarea-expected.checksum: Added.
     20        * platform/mac/fast/parser/comment-in-textarea-expected.png: Added.
     21        * platform/mac/fast/parser/comment-in-textarea-expected.txt: Added.
     22
    1232008-06-24  Dan Bernstein  <mitz@apple.com>
    224
  • trunk/WebCore/ChangeLog

    r34780 r34787  
     12008-06-24  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Fix <https://bugs.webkit.org/show_bug.cgi?id=19597>
     6
     7        Correctly parse <!-- </textarea> --> inside a <textarea>, matching
     8        Internet Explorer, Firefox, Opera, and HTML 5.
     9
     10        Tests: fast/parser/comment-in-script-tricky.html
     11               fast/parser/comment-in-style.html
     12               fast/parser/comment-in-textarea.html
     13               fast/parser/comment-in-title.html
     14
     15        * html/HTMLTokenizer.cpp:
     16        (WebCore::HTMLTokenizer::parseSpecial):
     17
    1182008-06-24  Justin Garcia  <justin.garcia@apple.com>
    219
  • trunk/WebCore/html/HTMLTokenizer.cpp

    r34722 r34787  
    318318        UChar ch = *src;
    319319
    320         if (!scriptCodeResync && !brokenComments && !state.inTextArea() && !state.inXmp() && ch == '-' && scriptCodeSize >= 3 && !src.escaped() && scriptCode[scriptCodeSize-3] == '<' && scriptCode[scriptCodeSize-2] == '!' && scriptCode[scriptCodeSize-1] == '-') {
     320        if (!scriptCodeResync && !brokenComments && !state.inXmp() && ch == '-' && scriptCodeSize >= 3 && !src.escaped() && scriptCode[scriptCodeSize-3] == '<' && scriptCode[scriptCodeSize-2] == '!' && scriptCode[scriptCodeSize-1] == '-') {
    321321            state.setInComment(true);
    322322            state = parseComment(src, state);
Note: See TracChangeset for help on using the changeset viewer.