WebCore:
authorbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jan 2007 21:57:23 +0000 (21:57 +0000)
committerbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jan 2007 21:57:23 +0000 (21:57 +0000)
commit46ce4afdae14b7dce70b1dee4c9245e06cc9222d
tree3e125ebd242a6ce5112b52d95b59b28a3155fd89
parentecece4b716f917cbdc4819b7c685a1a844bd8853
WebCore:
        Reviewed by Maciej and Darin.

        Fix for <rdar://problem/4702420> REGRESSION: Null characters need
        to be stripped from text nodes (townhall.com)

        This was a regression from the fix for <rdar://problem/3727939>
        Safari strips \0 characters from HTML tags making them valid, which
        was fixed with r12652. We still need to strip null characters in
        text nodes.

        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::write): No behavior change here, this is
        just to make Darin happy.
        (WebCore::HTMLTokenizer::processToken): Call into StringImpl's new
        createStrippingNull function instead of the normal StringImpl
        constructor.
        * platform/StringImpl.cpp:
        (WebCore::StringImpl::createStrippingNull): Strip null.
        * platform/StringImpl.h:

LayoutTests:
        Reviewed by Maciej and Darin.

        New layout tests and some updates results for the fix for <rdar://
        problem/4702420> REGRESSION: Null characters need to be stripped
        from text nodes (townhall.com)

        * fast/dom/stripNullFromTextNodes-expected.checksum: Added.
        * fast/dom/stripNullFromTextNodes-expected.png: Added.
        * fast/dom/stripNullFromTextNodes-expected.txt: Added.
        * fast/dom/stripNullFromTextNodes.html: Added.
        * fast/js/null-char-in-string-expected.txt: New results.
        * fast/text/stripNullFromText-expected.checksum: Added.
        * fast/text/stripNullFromText-expected.png: Added.
        * fast/text/stripNullFromText-expected.txt: Added.
        * fast/text/stripNullFromText.html: Added.
        * tables/mozilla/images/adforce_imgis_com-expected.txt: New
        results.
        * tables/mozilla_expected_failures/images/adforce_imgis_com-
        expected.checksum: Removed. This is the same test as the one above.
        The same test was in two places.
        * tables/mozilla_expected_failures/images/adforce_imgis_com-
        expected.png: Removed.
        * tables/mozilla_expected_failures/images/adforce_imgis_com-
        expected.txt: Removed.
        * tables/mozilla_expected_failures/images/adforce_imgis_com.html:
        Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/stripNullFromTextNodes-expected.checksum [new file with mode: 0644]
LayoutTests/fast/dom/stripNullFromTextNodes-expected.png [new file with mode: 0644]
LayoutTests/fast/dom/stripNullFromTextNodes-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/stripNullFromTextNodes.html [new file with mode: 0644]
LayoutTests/fast/js/null-char-in-string-expected.txt
LayoutTests/fast/text/stripNullFromText-expected.checksum [new file with mode: 0644]
LayoutTests/fast/text/stripNullFromText-expected.png [new file with mode: 0644]
LayoutTests/fast/text/stripNullFromText-expected.txt [new file with mode: 0644]
LayoutTests/fast/text/stripNullFromText.html [new file with mode: 0644]
LayoutTests/tables/mozilla/images/adforce_imgis_com-expected.txt
LayoutTests/tables/mozilla_expected_failures/images/adforce_imgis_com-expected.checksum [deleted file]
LayoutTests/tables/mozilla_expected_failures/images/adforce_imgis_com-expected.png [deleted file]
LayoutTests/tables/mozilla_expected_failures/images/adforce_imgis_com-expected.txt [deleted file]
LayoutTests/tables/mozilla_expected_failures/images/adforce_imgis_com.html [deleted file]
WebCore/ChangeLog
WebCore/html/HTMLTokenizer.cpp
WebCore/platform/StringImpl.cpp
WebCore/platform/StringImpl.h
WebKit/WebKit.xcodeproj/project.pbxproj